Package fr.soleil.comete.widget

Examples of fr.soleil.comete.widget.IFrame


  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "ampli";
    }

    NumberScalarSpinner f = new NumberScalarSpinner();
    f.setSize(300, 300);
    f.setPreferredSize(f.getSize());
    f.setDeviceName(tmpDeviceName);
    f.setToolTipText(tmpDeviceName + "/" + tmpAttributeName);
    f.setEntityName(tmpAttributeName);
    f.setEnabled(true);
    f.setEditable(true);
    f.setConfirmation(false);
    f.initDAO();

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here


   * Main class, so you can have an example. You can put your own attribute
   * names in parameter
   */
  public static void main(final String[] args) {

    final IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    } else {
      tmpDeviceName = "tango/tangotest/titan";
      // tmpAttributeName = "string_scalar";
      tmpAttributeName = "State";
    }

    final StringScalarTextField f = new StringScalarTextField();
    f.setDeviceName(tmpDeviceName);
    f.setEntityName(tmpAttributeName);
    f.setEnabled(true);
    f.setEditable(true);
    f.setConfirmation(true);
    f.initDAO();

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "boolean_scalar";
    }

    BooleanScalarComboBox f = new BooleanScalarComboBox();
    f.setSize(300, 300);
    f.setPreferredSize(f.getSize());
    f.setDeviceName(tmpDeviceName);
    f.setToolTipText(tmpDeviceName + "/" + tmpAttributeName);
    f.setEntityName(tmpAttributeName);
    f.setEnabled(true);
    f.setStateEnabled(false);
    f.setConfirmation(true);
    f.initDAO();

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

   * Main class, so you can have an example. You can put your own attribute
   * names in parameter
   */
  public static void main(final String[] args) {

    final IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    } else {
      tmpDeviceName = "tango/tangotest/spjz_01.01";
      tmpAttributeName = "double_image_ro";
    }

    final NumberImageViewer f = new NumberImageViewer();

    final IImageViewerListener listener = new IImageViewerListener() {

      @Override
      public void selectedPointChanged(final Point point) {
        System.out.println("selectedPointChanged=" + point);
      }

      @Override
      public void selectedValueChanged(final Number y) {
        System.out.println("selectedValueChanged=" + y);
      }

      @Override
      public void selectedXChanged(final Number x) {
        System.out.println("selectedXChanged=" + x);
      }

      @Override
      public void selectedYChanged(final Number y) {
        System.out.println("selectedYChanged=" + y);
      }

      @Override
      public void valueChanged(final NumberMatrix value) {
        System.out.println("valueChanged=" + value);
      }
    };

    f.addImageViewerListener(listener);
    f.setDeviceName(tmpDeviceName);
    f.setEntityName(tmpAttributeName);
    f.initDAO();

    /*
     * f.addRoi(new CometeRoi("MyRoi1", IRoi.RECTANGLE, 10, 90, 90, 80, 50,
     * CometeColor.BLUE)); f.addRoi(new CometeRoi("MyRoi2", IRoi.RECTANGLE,
     * 10, 100, 100, 90, 60, CometeColor.GREEN));
     */

    f.addRoi("MyRoi1,RecTANGLE, 10, 90, 90, 80, 50,BLACK");
    f.addRoi("MyRoi2,RECTANGLE, 10, 100, 100, 90, 60,GREEN");
    f.addRoi("MyRoi3,OVAL, 10, 130, 180, 30, 80,GREEN");
    f.addRoi("MyRoi4,point, 10, 20, 80, 10, 10,yellow");
    // Bad Color
    f.addRoi("MyRoi11,RecTANGLE, 10, 90, 90, 80, 50,BLsssUE");
    // Bad Shape
    f.addRoi("MyRoi111,bla, 10, 90, 90, 80, 50,blue");
    // Bad number of value
    f.addRoi("MyRoi1111,RecTANGLE, 10, 90, 90, 80, 50");

    // Roi modification
    f.addRoi("MyRoi2,RECTANGLE, 10, 200, 200, 90, 60,GREEN");

    // Roi deletion
    f.addRoi("MyRoi4,NONE, 10, 130, 180, 30, 80,GREEN");

    f.setShowRoiInformationTable(true);

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

   * Main class, so you can have an example. You can put your own attribute
   * names in parameter
   */
  public static void main(final String[] args) {

    final IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    } else {
      tmpDeviceName = "tango/tangotest/spjz_01.01";
      tmpAttributeName = "double_image_ro";
    }

    final NumberImageViewer f = new NumberImageViewer();

    final IImageViewerListener listener = new IImageViewerListener() {

      @Override
      public void selectedPointChanged(final Point point) {
        System.out.println("selectedPointChanged=" + point);
      }

      @Override
      public void selectedValueChanged(final Number y) {
        System.out.println("selectedValueChanged=" + y);
      }

      @Override
      public void selectedXChanged(final Number x) {
        System.out.println("selectedXChanged=" + x);
      }

      @Override
      public void selectedYChanged(final Number y) {
        System.out.println("selectedYChanged=" + y);
      }

      @Override
      public void valueChanged(final NumberMatrix value) {
        System.out.println("valueChanged=" + value);
      }
    };

    f.addImageViewerListener(listener);
    f.setDeviceName(tmpDeviceName);
    f.setEntityName(tmpAttributeName);
    f.initDAO();

    /*
     * f.addRoi(new CometeRoi("MyRoi1", IRoi.RECTANGLE, 10, 90, 90, 80, 50,
     * CometeColor.BLUE)); f.addRoi(new CometeRoi("MyRoi2", IRoi.RECTANGLE,
     * 10, 100, 100, 90, 60, CometeColor.GREEN));
     */

//    f.addRoi("MyRoi1,RecTANGLE, 10, 90, 90, 80, 50,BLACK");
//    f.addRoi("MyRoi2,RECTANGLE, 10, 100, 100, 90, 60,GREEN");
//    f.addRoi("MyRoi3,OVAL, 10, 130, 180, 30, 80,GREEN");
//    f.addRoi("MyRoi4,point, 10, 20, 80, 10, 10,yellow");
//    // Bad Color
//    f.addRoi("MyRoi11,RecTANGLE, 10, 90, 90, 80, 50,BLsssUE");
//    // Bad Shape
//    f.addRoi("MyRoi111,bla, 10, 90, 90, 80, 50,blue");
//    // Bad number of value
//    f.addRoi("MyRoi1111,RecTANGLE, 10, 90, 90, 80, 50");
//
//    // Roi modification
//    f.addRoi("MyRoi2,RECTANGLE, 10, 200, 200, 90, 60,GREEN");
//
//    // Roi deletion
//    f.addRoi("MyRoi4,NONE, 10, 130, 180, 30, 80,GREEN");

    String[] roiList = new String[] {"MyRoiList,100,100,100,100"};
        f.setRoiList(roiList);
    f.setShowRoiInformationTable(true);

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    f.clearDAO();
    f.initDAO();
    //f.setShowRoiInformationTable(false);
   
  }
View Full Code Here

    /**
     * Main class, so you can have an example. You can put your own attribute names in parameter
     */
    public static void main(String[] args) {

        IFrame frame = CometeWidgetFactory.createFrame();
        String tmpDeviceName = null;
        String tmpAttributeName = null;
        if (args != null && args.length > 1) {
            tmpDeviceName = args[0];
            tmpAttributeName = args[1];
        }
        else {
            tmpDeviceName = "tango/tangotest/spjz_01.01";
            tmpAttributeName = "ampli";
        }

        NumberScalarInput f = new NumberScalarInput();
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());
        f.setDeviceName(tmpDeviceName);
        f.setEntityName(tmpAttributeName);
        f.setUserEnabled(true);
        f.setEditable(true);
        f.setConfirmation(true);

        f.setBackgroundButton(Color.GREEN);
        f.setBackgroundTextField(Color.RED);

        f.initDAO();

        frame.setContentPane(f);
        frame.setSize(640, 480);
        frame.setTitle(f.getClass().getName());
        frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
View Full Code Here

  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "ampli";
    }

    NumberScalarProgressBar f = new NumberScalarProgressBar();
    f.setSize(300, 300);
    f.setPreferredSize(f.getSize());
    f.setDeviceName(tmpDeviceName);
    f.setToolTipText(tmpDeviceName + "/" + tmpAttributeName);
    f.setEntityName(tmpAttributeName);
    f.setEnabled(true);
    f.setConfirmation(false);
    f.initDAO();

    frame.setContentPane(f);
    frame.setSize(640, 480);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();

    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "boolean_scalar";
    }

    BooleanCheckbox widget = new BooleanCheckbox();
    widget.setSize(300, 300);
    widget.setDeviceName(tmpDeviceName);
    widget.setEntityName(tmpAttributeName);
    widget.setEnabled(true);
    widget.setStateEnabled(false);
    widget.setConfirmation(true);
    widget.initDAO();

    frame.setContentPane(widget);
    frame.setSize(640, 480);
    frame.setTitle(widget.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "double_image_ro";
    }

    NumberImageTable widget = new NumberImageTable();
    INumberTableListener listener = new INumberTableListener(){

      @Override
      public void selectedColumnChanged(int col) {
        System.out.println("selectedColumnChanged="+col);
      }

      @Override
      public void selectedRowChanged(int col) {
        System.out.println("selectedRowChanged="+col);

      }

      @Override
      public void selectedValueChanged(Number value) {
        System.out.println("selectedValueChanged="+value);

      }


      @Override
      public void selectedPointChanged(Point point) {
        System.out.println("selectedPointChanged="+point);
      }

      @Override
      public void valueChanged(IMatrix matrix) {

        System.out.println("valueChanged="+ matrix);

      }
    };

    widget.addNumberTableListener(listener);
    widget.setSize(300, 300);
    widget.setDeviceName(tmpDeviceName);
    widget.setEntityName(tmpAttributeName);
    widget.initDAO();

    frame.setContentPane(widget);
    frame.setSize(640, 480);
    frame.setTitle(widget.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

  /**
   * Main class, so you can have an example. You can put your own attribute names in parameter
   */
  public static void main(String[] args) {

    IFrame frame = CometeWidgetFactory.createFrame();
    String tmpDeviceName = null;
    String tmpAttributeName = null;
    if (args != null && args.length > 1) {
      tmpDeviceName = args[0];
      tmpAttributeName = args[1];
    }
    else {
      tmpDeviceName = "tango/tangotest/titan";
      tmpAttributeName = "ampli";
    }

    NumberScalarPeriodicTable f = new NumberScalarPeriodicTable();
    f.setSize(1300, 1000);
    f.setPreferredSize(f.getSize());
    f.setDeviceName(tmpDeviceName);
    f.setEntityName(tmpAttributeName);
    f.setEnabled(true);
    f.initDAO();

    frame.setContentPane(f);
    frame.setTitle(f.getClass().getName());
    frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
  }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.widget.IFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.