Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.Frame


    /**
     * 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 = new 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.02";
            tmpAttributeName = "ampli";
        }

        final NumberScalarInputCometeV2 f = new NumberScalarInputCometeV2();
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());

        f.setDeviceName(tmpDeviceName);
        f.setEntityName(tmpAttributeName);
        f.setConfirmation(false);
        f.setStateEnabled(false);
        // f.setTextButton("Mon Texte");
        f.setBackgroundButton(Color.BLUE);
        f.setBackgroundTextField(Color.RED);

        f.addWidgetListener(new IWidgetListener() {

            @Override
            public void booleanDataChanged(final boolean value) {
                System.out.println("booleanDataChanged " + value);
            }

            @Override
            public void booleanValueChanged(final boolean value) {
                System.out.println("booleanValueChanged " + value);
            }

            @Override
            public void doubleDataChanged(final double value) {
                System.out.println("doubleDataChanged " + value);
            }

            @Override
            public void doubleValueChanged(final double value) {
                System.out.println("doubleValueChanged " + value);
            }

            @Override
            public void stringDataChanged(final String value) {
                System.out.println("stringDataChanged " + value);
            }

            @Override
            public void stringValueChanged(final String value) {
                System.out.println("stringValueChanged " + value);
            }
        });
        f.initDAO();

        frame.setContentPane(f);
        frame.setSize(640, 480);
        frame.setTitle(f.getClass().getName());
        frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);

        new Thread() {
            @Override
            public void run() {
                try {
View Full Code Here




    public static void main(String[] args) {

        IFrame frame = new Frame();
        DataSourceProducerProvider.pushNewProducer(TangoRefreshingManager.class);
        SourceListenerTest sourceTest = new SourceListenerTest();

        final JPanel f = sourceTest.initPanel();
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());
        f.setEnabled(true);

        frame.setTitle("TextField Test");
        frame.setContentPane(f);
        frame.setSize(500, 200);
        frame.setTitle(f.getClass().getName());
        frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);

    }
View Full Code Here

//        return table;
//    }

    public static void main(String[] args) {

        IFrame frame = new Frame();
        DataSourceProducerProvider.pushNewProducer(TangoRefreshingManager.class);

        AbstractTable<?> table = createNumberMatrix();

        final JPanel f = initMatrixPanel(table);
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());
        f.setEnabled(true);

        frame.setTitle("NumberField Test");
        frame.setContentPane(f);
        frame.setSize(500, 200);
        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 = new 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";

        }

        final NumberImageViewerCometeV2 f = new NumberImageViewerCometeV2();
        f.setDeviceName(tmpDeviceName);
        f.setEntityName(tmpAttributeName);
        f.setUserEnabled(true);
        f.setConfirmation(true);

        f.setCleanOnDataSetting(false); // to keep roi when data change
        f.addRoi("MyRoi1,RecTANGLE, 10, 10, 10, 80, 50,BLACK");
        f.addRoi("MyRoi2,RECTANGLE, 10, 100, 100, 90, 60,GREEN");

        f.initDAO();

        frame.setContentPane(f);
        frame.setSize(640, 480);
        frame.setTitle(f.getClass().getName());
        frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);

        // new Thread() {
        // @Override
        // public void run() {
        // try {
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 = new Frame();
        String[] xAttributeNameList = null;
        String[] yAttributeNameList = null;
        if (args != null && args.length > 1) {
            xAttributeNameList = new String[] { args[0] };
            yAttributeNameList = new String[] { args[1] };
        }
        else {
            xAttributeNameList = new String[] { "tango/tangotest/titan/float_spectrum_ro",
                    "tango/tangotest/titan/float_spectrum" };
            yAttributeNameList = new String[] { "tango/tangotest/titan/float_spectrum_ro",
                    "tango/tangotest/titan/double_spectrum" };
        }

        DualNumberSpectrumViewer f = new DualNumberSpectrumViewer();
        f.setXAttributeNameList(xAttributeNameList);
        f.setYAttributeNameList(yAttributeNameList);
        f.setColorArrayList(new Color[] { Color.BLUE, Color.RED });
        f.setMarkerStyleList(new int[] { IChartViewer.MARKER_BOX });
        f.setMarkerSizeList(new int[] { 5 });
        f.setDataArrayLineWidth(new int[] { 2 });
        f.setY1GridStyle(IChartViewer.STYLE_LONG_DASH);
        f.setY1GridVisible(true);
        f.initDAO();

        f.addChartViewerListener(new IChartViewerListener() {
            @Override
            public void chartViewerChanged(ChartViewerEvent event) {
                StringBuilder builder = new StringBuilder("chartViewerChanged:");
                builder.append("\n\tPoint: ").append(Arrays.toString(event.getSelectedPoint()));
                builder.append("\n\tIndex: ").append(event.getSelectedIndex());
                builder.append("\n\tViewId: ").append(event.getViewId());
                builder.append("\n\tReason: ").append(event.getReason());
                System.out.println(builder.toString());
            }
        });

        frame.setContentPane(f);
        frame.setSize(640, 600);
        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 = new Frame();
        String tmpDeviceName = null;
        String tmpAttributeName = null;
        if (args != null && args.length > 1) {
            tmpDeviceName = args[0];
            tmpAttributeName = args[1];
        }
        else {
            tmpDeviceName = "tango/tangotest/titan";
            tmpAttributeName = "long_scalar";
        }

        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

        return panel;
    }

    public static void main(String[] args) {

        IFrame frame = new Frame();
        DataSourceProducerProvider.pushNewProducer(TangoRefreshingManager.class);

        final JPanel f = initPanel();
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());
        f.setEnabled(true);

        frame.setTitle("MultiField Test");
        frame.setContentPane(f);
        frame.setSize(500, 200);
        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 = new Frame();
    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";
    }

    final NumberScalarSlider f = new NumberScalarSlider();
    f.setSize(300, 300);
    f.setPreferredSize(f.getSize());
    f.setDeviceName(tmpDeviceName);
    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

        return panel;
    }

    public static void main(String[] args) {
        IFrame frame = new Frame();

        final JPanel f = initPanel();
        f.setSize(300, 300);
        f.setPreferredSize(f.getSize());
        f.setEnabled(true);

        frame.setTitle("Label Test");
        frame.setContentPane(f);
        frame.setSize(500, 200);
        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 = new Frame();
        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";
        }

        StringScalarTextField f = new StringScalarTextField();
        f.setDeviceName(tmpDeviceName);
        f.setEntityName(tmpAttributeName);
        f.setUserEnabled(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

TOP

Related Classes of fr.soleil.comete.swing.Frame

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.