Package javax.swing

Examples of javax.swing.JRadioButton


    public final static String TrueString = "true";
    public final static String FalseString = "false";

    public TrueFalsePropertyEditor() {
        trueButton = new JRadioButton(TrueString);
        falseButton = new JRadioButton(FalseString);
    }
View Full Code Here


* true or false as a string when queried.
*/
public class OnOffPropertyEditor extends TrueFalsePropertyEditor {

    public OnOffPropertyEditor() {
        trueButton = new JRadioButton("On");
        falseButton = new JRadioButton("Off");
    }
View Full Code Here

                        setMode(PROFILE);
                    }
                }
            };

            JRadioButton profileModeButton = new JRadioButton("Profile");
            profileModeButton.addActionListener(al);
            profileModeButton.setActionCommand(profileCommand);
            JRadioButton losModeButton = new JRadioButton("LOS");
            losModeButton.addActionListener(al);
            losModeButton.setActionCommand(losCommand);

            modes.add(profileModeButton);
            modes.add(losModeButton);

            switch (mode) {
            case LOS:
                losModeButton.setSelected(true);
                break;
            case PROFILE:
            default:
                profileModeButton.setSelected(true);
            }
View Full Code Here

        int x = 0;
       
        for (DcModule module : modules) {
            ImageIcon icon = module.getIcon32() == null ? module.getIcon16() : module.getIcon32();
            icon = icon == null ? IconLibrary._icoModuleTypeProperty32 : icon;
            JRadioButton radioButton = ComponentFactory.getRadioButton(module.getLabel(), icon, "" + module.getIndex());
           
            radioButton.addActionListener(this);
            radioButton.addItemListener(new SelectModuleAction());
            buttonGroup.add(radioButton);
            panelModules.add(radioButton, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
                    ,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                     new Insets( 0, 5, 5, 5), 0, 0));
           
View Full Code Here

        int y = 0;
        int x = 0;
       
        for (DcModule module : DcModules.getModules()) {
            if (module.isSelectableInUI() && module.isTopModule()) {
                JRadioButton rb = ComponentFactory.getRadioButton(module.getLabel(), module.getIcon32(), "" + module.getIndex());
                rb.addMouseListener(new ModuleSelectionListener());
                bg.add(rb);
               
                components.put(module.getIndex(), rb);
               
                add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
View Full Code Here

            }
        }         
       
        setLayout(Layout.getGBL());
       
        JRadioButton rbPlainMod = ComponentFactory.getRadioButton(
                DcResources.getText("lblPlainModule"),  IconLibrary._icoModuleTypePlain, "" + _OTHERMODULE);
        JRadioButton rbMediaMod = ComponentFactory.getRadioButton(
                DcResources.getText("lblMediaModule"),  IconLibrary._icoModuleTypeMedia, "" + _MEDIAMODULE);
        JRadioButton rbPropertyMod = ComponentFactory.getRadioButton(
                DcResources.getText("lblPropertyModule"), IconLibrary._icoModuleTypeProperty32, "" + _PROPERTYMODULE);
        JRadioButton rbAssociateMod = ComponentFactory.getRadioButton(
                DcResources.getText("lblAssociateModule"), IconLibrary._icoModuleTypeAssociate, "" + _ASSOCIATEMODULE);
       
        rbPlainMod.addMouseListener(new ModuleTypeSelectionListener());
        rbMediaMod.addMouseListener(new ModuleTypeSelectionListener());
        rbPropertyMod.addMouseListener(new ModuleTypeSelectionListener());
        rbAssociateMod.addMouseListener(new ModuleTypeSelectionListener());
       
        buttonGroup.add(rbPlainMod);
        buttonGroup.add(rbMediaMod);
        buttonGroup.add(rbPropertyMod);
        buttonGroup.add(rbAssociateMod);
View Full Code Here

        int x = 0;
       
        for (ItemImporter reader : ItemImporters.getInstance().getImporters(wizard.getModuleIdx())) {
          readers.add(reader);

          JRadioButton rb = ComponentFactory.getRadioButton(reader.getName(), reader.getIcon(), reader.getKey());
            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));
           
            if (y == 1)
                rb.setSelected(true);
        }
    }
View Full Code Here

        int y = 0;
        int x = 0;
       
        for (DcModule module : getModules()) {
            if (isModuleAllowed(module)) {
                JRadioButton rb = ComponentFactory.getRadioButton(module.getLabel(), module.getIcon16(), "" + module.getIndex());
                rb.addMouseListener(new ModuleSelectionListener());
                bg.add(rb);
               
                components.put(module.getIndex(), rb);
               
                add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
View Full Code Here

           
            if ( module.isTopModule() &&
                !module.isAbstract() &&
                !module.isParentModule() && !module.isChildModule()) {
               
                JRadioButton rb = ComponentFactory.getRadioButton(
                        module.getName(), module.getIcon16(), "" + module.getIndex());

                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

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

TOP

Related Classes of javax.swing.JRadioButton

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.