Package javax.swing

Examples of javax.swing.JToggleButton.doClick()


                calendar.add(Calendar.DAY_OF_MONTH, deltaDays);
               
                if (calendar.get(Calendar.MONTH) == getDisplayedMonth()) {
                    int newDay = calendar.get(Calendar.DAY_OF_MONTH);
                    JToggleButton newFocus = dayButtons.get(newDay - 1);
                    newFocus.doClick(0);
                }
            }
        }
    }
   
View Full Code Here


        splitPane.setLeftComponent(pTree);
        splitPane.setRightComponent(tabbedPane);
        add(splitPane);

        model.reload("com.ardor3d.example");
        btExpand.doClick();
        lStatus.setText("Examples: " + model.getSize());

        tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {

            public void valueChanged(final TreeSelectionEvent e) {
View Full Code Here

    }

    public void showSection(int index) {
        JToggleButton button = buttons.get(index);
        if (!button.isSelected()) {
            button.doClick();
        }
    }

    /**
     * Assigns <code>CTRL-1</code> as shortcut for the first section, <code>CTRL-2</code> as
View Full Code Here

    for (Enumeration<javax.swing.AbstractButton> e = swatchesGroup.getElements(); e.hasMoreElements();) {
      JToggleButton swatch = (JToggleButton) e.nextElement();
      Color color = swatch.getBackground();
      if (closestColor.equals(color)) {
        swatch.doClick();
      }
    }
  }

  /// Interface Creation
View Full Code Here

    // Why does (e.getModifiers()) return 16 instead of
    // 503 which is equal to MouseEvent.MOUSE_PRESSED
    // Thus (e.getModifiers() & MouseEvent.MOUSE_PRESSED) should return 503?
    if ((e.getModifiers() & MouseEvent.MOUSE_PRESSED) == 16) {
      selectedSwatch.doClick();
    }
  }

  public void mouseExited(MouseEvent e) {
    JToggleButton selectedSwatch = (JToggleButton) e.getSource();
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.