Examples of JRadioButton


Examples of javax.swing.JRadioButton

   
    @Override
    public void setModule(XmlModule module) {
        super.setModule(module);
       
        JRadioButton component = getRadioButton(module.getIndex());
        component.setVisible(false);
    }
View Full Code Here

Examples of javax.swing.JRadioButton

   
    @Override
    public void setModule(XmlModule module) {
        super.setModule(module);
       
        JRadioButton rb = (JRadioButton) fields.get(module.getIndex());
        rb.setVisible(false);
    }
View Full Code Here

Examples of javax.swing.JRadioButton

           
            if (!module.isAbstract() &&
                 module.isTopModule() &&
                !module.isParentModule() && !module.isChildModule()) {

                JRadioButton rb = ComponentFactory.getRadioButton(
                        module.getName(), module.getIcon16(), "" + module.getIndex());

                fields.put(module.getIndex(), rb);
               
                rb.addItemListener(new ModuleSelectionListener());
                bg.add(rb);
                add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
                   ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                    new Insets( 0, 5, 5, 5), 0, 0));
               
View Full Code Here

Examples of javax.swing.JRadioButton

                        setDtedLevel(newLevel);
                    }
                }
            };

            JRadioButton level0 = new JRadioButton("Level 0");
            level0.addActionListener(al);
            level0.setActionCommand(level0Command);
            JRadioButton level1 = new JRadioButton("Level 1");
            level1.addActionListener(al);
            level1.setActionCommand(level1Command);
            JRadioButton level2 = new JRadioButton("Level 2");
            level2.addActionListener(al);
            level2.setActionCommand(level2Command);

            levels.add(level0);
            levels.add(level1);
            levels.add(level2);

            switch (getDtedLevel()) {
            case 2:
                level2.setSelected(true);
                break;
            case 1:
                level1.setSelected(true);
                break;
            case 0:
View Full Code Here

Examples of javax.swing.JRadioButton

            palette = javax.swing.Box.createVerticalBox();
            uomButtonGroup = new javax.swing.ButtonGroup();
            jPanel1 = new JPanel();
            jPanel2 = new JPanel();
            jPanel3 = new JPanel();
            kmRadioButton = new JRadioButton();
            meterRadioButton = new JRadioButton();
            nmRadioButton = new JRadioButton();
            mileRadioButton = new JRadioButton();

            jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS));

            jPanel2.setBorder(new javax.swing.border.TitledBorder("Unit Of Measure"));
            kmRadioButton.setText("KM");
            kmRadioButton.setToolTipText("Kilometers");
            uomButtonGroup.add(kmRadioButton);
            jPanel3.add(kmRadioButton);

            meterRadioButton.setText("M");
            meterRadioButton.setToolTipText("Meters");
            uomButtonGroup.add(meterRadioButton);
            jPanel3.add(meterRadioButton);

            nmRadioButton.setText("NM");
            nmRadioButton.setToolTipText("Nautical Miles");
            uomButtonGroup.add(nmRadioButton);
            jPanel3.add(nmRadioButton);

            mileRadioButton.setText("Mile");
            mileRadioButton.setToolTipText("Statute Miles");
            uomButtonGroup.add(mileRadioButton);
            jPanel3.add(mileRadioButton);

            jPanel2.add(jPanel3);

            jPanel1.add(jPanel2);

            palette.add(jPanel1);

            java.awt.event.ActionListener al = new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    String ac = e.getActionCommand();

                    if (ac.equalsIgnoreCase(UnitOfMeasureProperty)) {
                        JRadioButton jrb = (JRadioButton) e.getSource();
                        setUnitOfMeasure(jrb.getText());
                        doPrepare();
                    } else {
                        com.bbn.openmap.util.Debug.error("Unknown action command \""
                                + ac
                                + "\" in GraticuleLayer.actionPerformed().");
View Full Code Here

Examples of javax.swing.JRadioButton

                        //                      cache.setSubframeInfo(dfsi);
                    }
                }
            };

            JRadioButton level0 = new JRadioButton("Level 0");
            level0.addActionListener(al);
            level0.setActionCommand(level0Command);
            JRadioButton level1 = new JRadioButton("Level 1");
            level1.addActionListener(al);
            level1.setActionCommand(level1Command);
            JRadioButton level2 = new JRadioButton("Level 2");
            level2.addActionListener(al);
            level2.setActionCommand(level2Command);

            levels.add(level0);
            levels.add(level1);
            levels.add(level2);

            switch (dtedLevel) {
            case 2:
                level2.setSelected(true);
                break;
            case 1:
                level1.setSelected(true);
                break;
            case 0:
View Full Code Here

Examples of javax.swing.JRadioButton

       
        public OptionPanel() {
            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
           
            Box box = Box.createHorizontalBox();
            box.add(rbStatic = new JRadioButton(resources.getString("static"),true));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbDynamic = new JRadioButton(resources.getString("dynamic"),false));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            ButtonGroup bg = new ButtonGroup();
            bg.add(rbStatic);
View Full Code Here

Examples of javax.swing.JRadioButton

      section.add(box);
     
      box = Box.createHorizontalBox();
      box.add(new JLabel(resources.getString("Orientation")));
      box.add(Box.createHorizontalGlue());
      box.add(hSeriesOrientation = new JRadioButton(resources.getString("Horizontal")));
      box.add(vSeriesOrientation = new JRadioButton(resources.getString("Vertical")));
      hSeriesOrientation.setSelected(plot.getOrientation() == PlotOrientation.HORIZONTAL);
      vSeriesOrientation.setSelected(plot.getOrientation() == PlotOrientation.VERTICAL);
      ButtonGroup bg = new ButtonGroup();
      bg.add(hSeriesOrientation);
      bg.add(vSeriesOrientation);
      section.add(box);
     
      content.add(section);

      pcbxcurves.setEditable(true);
      Color noCurveColor = pcurvecolor.getBackground();
      pcurvecolor.setFocusPainted(false);

      CategoryItemRenderer renderer = plot.getRenderer();
      int n = dst.getRowCount();
      for (int i=0; i<n; ++i) {
        DataSource ds = (DataSource)mapperSources.get(i);
        if (ds==null) ds = dst.getSource(i); // take the datasource associated with this series by default
        pcbxcurves.addItem(new CbxEntry(i,dst.getName(i),(Color)renderer.getSeriesPaint(i),ds,(ColorMapper)mappers.get(i)));
      }
      pcbxeditortf = (JTextField)pcbxcurves.getEditor().getEditorComponent();
      pupdateForEntry(pcbxcurves.getSelectedItem());
     
      pcbxcurves.addPopupMenuListener(new PopupMenuListener() {
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
          peditLocked = true;
        }
        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
          peditLocked = false;
        }
        public void popupMenuCanceled(PopupMenuEvent e) {
          peditLocked = false;
        }
      });

      pcbxcurves.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==ItemEvent.DESELECTED) pactiveEntry = null;
          else pupdateForEntry(e.getItem());
        }
      });

      pcbxeditortf.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateName();
        }
        public void removeUpdate(DocumentEvent e) {
          updateName();
        }
        public void changedUpdate(DocumentEvent e) {
          updateName();
        }
        public void updateName() {
          if ((peditLocked) || (pactiveEntry == null)) return;
          pactiveEntry.name = pcbxeditortf.getText();
        }
      });

      pcurvecolor.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (pactiveEntry==null) return;

            DynamicColorChooser dialog = new DynamicColorChooser(
                    null, resources.getString("ChooseAColor"),null ,pactiveEntry.color,pactiveEntry.source,pactiveEntry.mapper);


            dialog.pack();
            dialog.setVisible(true);

            if (dialog.isOk()){
                pactiveEntry.color = dialog.getColor();
                pactiveEntry.source = dialog.getSource();
                pactiveEntry.mapper = dialog.getMapper();
                pupdateForEntry(pactiveEntry);
            }
        }
      });

      pcurvedelete.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if (pactiveEntry==null) return;
          pcbxcurves.removeItem(pactiveEntry);
        }
      });

     
      section=Box.createVerticalBox();
      section.setBorder(BorderFactory.createTitledBorder(resources.getString("Categories")));

      box = Box.createHorizontalBox();
      box.add(new JLabel(resources.getString("LabelsOrientation")));
      box.add(Box.createHorizontalGlue());
      box.add(hLabelOrientation = new JRadioButton(resources.getString("Horizontal")));
      box.add(vLabelOrientation = new JRadioButton(resources.getString("Vertical")));
      CategoryLabelPosition clp = vSeriesOrientation.isSelected() ? plot.getDomainAxis().getCategoryLabelPositions().getLabelPosition(RectangleEdge.BOTTOM) : plot.getDomainAxis().getCategoryLabelPositions().getLabelPosition(RectangleEdge.LEFT);
      boolean vertical = clp.getAngle() != 0;
      hLabelOrientation.setSelected(!vertical);
      vLabelOrientation.setSelected(vertical);
      bg = new ButtonGroup();
View Full Code Here

Examples of javax.swing.JRadioButton

    timeRefFormat= new JLabel(resources.getString("refTime"));
    timeRefFormat.setFont(new Font("Dialog", Font.PLAIN,12));
    add(timeRefFormat, gbc);
    gbc.gridy++;

    timeRefIsRelative = new JRadioButton(resources.getString("relative"));
    timeRefIsAbsolute = new JRadioButton(resources.getString("absolute"));
    timeRefIsRelative.setSelected(true);//by default.

    timeRefIsRelative.addActionListener(this);
    timeRefIsAbsolute.addActionListener(this);
View Full Code Here

Examples of javax.swing.JRadioButton

            if (showName) add(box);
           
            box = Box.createHorizontalBox();
            box.add(new JLabel(NodeResourcesManager.resources.getString("DisplayMode")));
            box.add(Box.createHorizontalGlue());
            box.add(rbShading = new JRadioButton(NodeResourcesManager.resources.getString("Shading"), mode==SHADING_MODE));
            box.add(rbFlat = new JRadioButton(NodeResourcesManager.resources.getString("Flat"), mode==SHADING_MODE));
            box.add(rbFilled = new JRadioButton(NodeResourcesManager.resources.getString("Filled"), mode==FILLED_MODE));
            box.add(rbWireframe = new JRadioButton(NodeResourcesManager.resources.getString("Wireframe"), mode==WIREFRAME_MODE));
            ButtonGroup bg = new ButtonGroup();
            bg.add(rbShading);
            bg.add(rbFlat);
            bg.add(rbFilled);
            bg.add(rbWireframe);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.