Package javax.swing

Examples of javax.swing.ButtonGroup.clearSelection()


    JToggleButton viewBtn = new JToggleButton(IconUtils.createImageIcon(ICON_CLASS_PATH + "Cube.png"));
    this.logoLabel = new JLabel(IconUtils.createImageIcon(IMAGE_CLASS_PATH + "xgenerator.png"));
    this.logoLabel.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        buttonGroup.clearSelection();
        logoLabel.requestFocusInWindow();
      }
    });
   
    homeBtn.setText("首页");
View Full Code Here


        //Select the right transformer
        int index = 0;
        for (String elmtType : controller.getElementTypes()) {
            ButtonGroup g = buttonGroups.get(index);
            boolean active = model == null ? false : model.getCurrentElementType().equals(elmtType);
            g.clearSelection();
            Transformer t = model.getCurrentTransformer(elmtType);
            String selected = model == null ? "" : controller.getUI(t).getDisplayName();
            for (Enumeration<AbstractButton> btns = g.getElements(); btns.hasMoreElements();) {
                AbstractButton btn = btns.nextElement();
                btn.setVisible(active);
View Full Code Here

                //Select the right transformer
                int index = 0;
                for (String elmtType : AppearanceUIController.ELEMENT_CLASSES) {
                    ButtonGroup g = buttonGroups.get(index);
                    boolean active = model.getSelectedElementClass().equals(elmtType);
                    g.clearSelection();
                    TransformerCategory c = model.getSelectedCategory();
                    String selected = c.getDisplayName();
                    for (Enumeration<AbstractButton> btns = g.getElements(); btns.hasMoreElements();) {
                        AbstractButton btn = btns.nextElement();
                        btn.setVisible(active);
View Full Code Here

                for (String elmtType : AppearanceUIController.ELEMENT_CLASSES) {
                    for (TransformerCategory c : controller.getCategories(elmtType)) {
                        ButtonGroup g = buttonGroups.get(index);

                        boolean active = model.getSelectedElementClass().equals(elmtType) && model.getSelectedCategory().equals(c);
                        g.clearSelection();
                        TransformerUI t = model.getSelectedTransformerUI();

                        for (Enumeration<AbstractButton> btns = g.getElements(); btns.hasMoreElements();) {
                            AbstractButton btn = btns.nextElement();
                            btn.setVisible(active);
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.