jDraw tool

Hello,

I never used TANGO jDraw tool before and I want to develop an GUI using that. I am using ATK Swing parameter to make my application but when i am trying to generate "JAVA Code Generator" from view menu I am getting an error like "error during java code generation. No such file or directory available".

Someone can help me please. smile

Thank you.
Hello,

The "Java code generation" tools from JDraw can be used if you want to produce a standalone java code which not use Tango ATK to draw a synoptic but not all object types are supported.

The usual way to display a Tango synoptic is to use the SynopticAppli.


java -DTANGO_HOST=your_tango_host fr.esrf.tangoatk.widget.jdraw.SimpleSynopticAppli synoptic_filename

Or if you want to integrate a synoptic within a java application, you can use the TangoSynopticHandler ATK component.



import fr.esrf.tangoatk.widget.jdraw.TangoSynopticHandler;
import fr.esrf.tangoatk.widget.util.*;

  ErrorHistory errWin = new ErrorHistory();

  //..

  JPanel myPanel = new JPanel();
  myPanel.setLayout(new BorderLayout());

  TangoSynopticHandler tangoSynoptic = new TangoSynopticHandler();
  tangoSynoptic.setErrorHistoryWindow(myErrWin);
  try {
    tangoSynoptic.setSynopticFileName(jdwFileName);
  } catch (Exception e) {
    JOptionPane.showMessageDialog(this,"Failed to load the synoptic\n"+e.getMessage());
  }
  myPanel.add(tangoSynoptic,BorderLayout.CENTER);

  //..

  // Example function to display the error history
  public void actionPerformed(ActionEvent e) {
    Object src = e.getSource();
    if (src == viewErrorMenuItem) {
      ATKGraphicsUtils.centerFrameOnScreen(errWin);
      errWin.setVisible(true);
    }
  }
  

Hope this helps…
Edited 9 years ago
 
Register or login to create to post a reply.