Package simtools.ui

Examples of simtools.ui.GridBagPanel


        return _result;
    }
   
    private void createPanel(){
        Result r=new Result();
        _panel=new GridBagPanel();
        _panel.addOnCurrentRow(new JLabel("Radius")); // TODO i18N
        _panel.addOnCurrentRow(_tfR=new JTextField(""+r.radius,PointsDialog.NDIGIT));
        _panel.carriageReturn();
        _panel.addOnCurrentRow(new JLabel("Height")); // TODO i18N
        _panel.addOnCurrentRow(_tfH=new JTextField(""+r.height,PointsDialog.NDIGIT));
View Full Code Here


                }
                enableFontChoosers(!cbSameFont.isSelected());
            }
        };
        // Add panel
        GridBagPanel textArrayPanel = new GridBagPanel();
        textArrayPanel.addOnCurrentRow(cbx, 2);
        textArrayPanel.addOnCurrentRow(bcelladd);
        textArrayPanel.addOnCurrentRow(bcelldelete);
        textArrayPanel.carriageReturn();
        textArrayPanel.addOnCurrentRow(cards, 1, true, true, true);
        textArrayPanel.addOnCurrentRow(cbSameFont);
        textArrayPanel.carriageReturn();
        return textArrayPanel;
    }
View Full Code Here

     * @see jsynoptic.builtin.SimpleShape.PropertiesPanel#createContent()
     */
    public JComponent createContent() {
        displayFirstArrow = new JCheckBox(resources.getString("displayFirstArrow"));
        displayLastArrow = new JCheckBox(resources.getString("displayLastArrow"));
        GridBagPanel connectionPanel = new GridBagPanel(resources.getString("Connection"));
        connectionPanel.addOnCurrentRow(displayFirstArrow);
        connectionPanel.addOnCurrentRow(displayLastArrow);
        return connectionPanel;
    }
View Full Code Here

    public Primitive getResult(){
        return _result;
    }
   
    private void createPanel(){
        _panel=new GridBagPanel();
        if(_primitiveClass==Sphere.class){
            _divisions=16;
            _panel.addOnCurrentRow(new JLabel("Radius")); // TODO i18N
            _panel.addOnCurrentRow(_tfX=new JTextField(""+_radius,PointsDialog.NDIGIT));
            _panel.carriageReturn();
View Full Code Here

        ButtonGroup bg = new ButtonGroup();
        bg.add(rbfull);
        bg.add(rbpie);
        bg.add(rbchord);
        bg.add(rbopen);
        GridBagPanel typePanel = new GridBagPanel();
        typePanel.addOnCurrentRow(ltype);
        typePanel.addOnCurrentRow(rbfull);
        typePanel.addOnCurrentRow(rbpie);
        typePanel.addOnCurrentRow(rbchord);
        typePanel.addOnCurrentRow(rbopen);
        typePanel.carriageReturn();
        // start angle
        GridBagPanel startAnglePanel = new GridBagPanel(resources.getString("StartAngle"));
        lunitstart = new JLabel(resources.getString("Unit:"));
        rbdegstart = new JRadioButton(resources.getString("Degree"), true);
        rbradstart = new JRadioButton(resources.getString("Radian"), false);
        bg = new ButtonGroup();
        bg.add(rbdegstart);
        bg.add(rbradstart);
        rbfixedstart = new JRadioButton(resources.getString("FixedValue:"));
        nfstart = new NumberField(0.0);
        dstreestart = FilteredSourceTree.getFromPool("PropertiesPanel0");
        dstreestart.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
            }
        });
        rbsourcestart = new ActionRadioButton(resources.getString("UseDataSource")) {
            public void stateChanged(ChangeEvent e) {
                nfstart.setEnabled(!isSelected());
                dstreestart.setEnabled(isSelected());
                updateWarnings();
            }
        };
        bg = new ButtonGroup();
        bg.add(rbfixedstart);
        bg.add(rbsourcestart);
        // end angle
        GridBagPanel endAnglePanel = new GridBagPanel(resources.getString("EndAngle"));
        lunitend = new JLabel(resources.getString("Unit:"));
        rbdegend = new JRadioButton(resources.getString("Degree"), true);
        rbradend = new JRadioButton(resources.getString("Radian"), false);
        bg = new ButtonGroup();
        bg.add(rbdegend);
        bg.add(rbradend);
        rbfixedend = new JRadioButton(resources.getString("FixedValue:"));
        nfend = new NumberField(0.0);
        dstreeend = FilteredSourceTree.getFromPool("PropertiesPanel1");
        dstreeend.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
            }
        });
        rbsourceend = new ActionRadioButton(resources.getString("UseDataSource")) {
            public void stateChanged(ChangeEvent e) {
                nfend.setEnabled(!isSelected());
                dstreeend.setEnabled(isSelected());
                updateWarnings();
            }
        };
        bg = new ButtonGroup();
        bg.add(rbfixedend);
        bg.add(rbsourceend);
        rbsourcestart.apply();
        rbsourceend.apply();
        rbfull.apply();
        // Create panel
        GridBagPanel unitPanel = new GridBagPanel();
        unitPanel.addOnCurrentRow(lunitstart);
        unitPanel.addOnCurrentRow(rbdegstart);
        unitPanel.addOnCurrentRow(rbradstart);
        unitPanel.carriageReturn();
        startAnglePanel.addOnCurrentRow(unitPanel, 1, false, false, true);
        startAnglePanel.addOnCurrentRow(rbfixedstart);
        startAnglePanel.addOnCurrentRow(nfstart, 2, true, false, true);
        startAnglePanel.addOnCurrentRow(rbsourcestart, 3);
        startAnglePanel.carriageReturn();
        startAnglePanel.addOnCurrentRow(dstreestart, 3, true, true, true);
        GridBagPanel eunitPanel = new GridBagPanel();
        eunitPanel.addOnCurrentRow(lunitend);
        eunitPanel.addOnCurrentRow(rbdegend);
        eunitPanel.addOnCurrentRow(rbradend);
        eunitPanel.carriageReturn();
        endAnglePanel.addOnCurrentRow(eunitPanel, 1, false, false, true);
        endAnglePanel.addOnCurrentRow(rbfixedend);
        endAnglePanel.addOnCurrentRow(nfend, 2, true, false, true);
        endAnglePanel.addOnCurrentRow(rbsourceend, 3);
        endAnglePanel.carriageReturn();
        endAnglePanel.addOnCurrentRow(dstreeend, 3, true, true, true);
        GridBagPanel ellipsePanel = new GridBagPanel(resources.getString("Ellipse"));
        ellipsePanel.addOnCurrentRow(typePanel, 1, false, false, true);
        ellipsePanel.addOnCurrentRow(startAnglePanel, 4, true, true, false);
        ellipsePanel.addOnCurrentRow(endAnglePanel, 4, true, true, true);
        return ellipsePanel;
    }
View Full Code Here

TOP

Related Classes of simtools.ui.GridBagPanel

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.