Examples of addActionListener()


Examples of javax.swing.JMenuItem.addActionListener()

      if(last.isDirectoryNode() && last.getChildCount() > 0) {
        item = new JMenuItem(isExpanded(path) ? mLocalizer.msg("collapse", "Collapse") : mLocalizer.msg("expand", "Expand"));
        item.setFont(item.getFont().deriveFont(Font.BOLD));

        item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if(isExpanded(path)) {
              collapsePath(path);
            } else {
              expandPath(path);
View Full Code Here

Examples of javax.swing.JPasswordField.addActionListener()

                                             SimpleAttributeSet.EMPTY);
            }
            passwordField.setDocument(document);

            // ActionPerformed
            passwordField.addActionListener(new ActionListener() {

                public void actionPerformed(final ActionEvent event) {
                    view.actionPerformed(event);
                }
View Full Code Here

Examples of javax.swing.JRadioButton.addActionListener()

    mSettingsPn.add(new JLabel(mLocalizer.msg("whichBrowser", "which browser")), cc.xyw(2,7,7));

    JRadioButton useDefault = new JRadioButton(mLocalizer.msg("defaultWebbrowser", "Default Webbrowser"));
    useDefault.setSelected(Settings.propUserDefinedWebbrowser.getString() == null);
    useDefault.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        updateInputFields();
      }
    });
View Full Code Here

Examples of javax.swing.JRadioButtonMenuItem.addActionListener()

    if(MainFrame.getInstance().getProgramTableModel().getDate().equals(date)) {
      item.setFont(item.getFont().deriveFont(Font.BOLD));
    }

    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().goTo(date);
      }
    });
    return item;
View Full Code Here

Examples of javax.swing.JTextField.addActionListener()

        field.setMinimumSize(new Dimension(40, 18));
        field.setHorizontalAlignment(JTextField.RIGHT);
        field.setToolTipText(i18n.get(this,
                "intervalField.tooltip",
                "Value for interval between rings."));
        field.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                updateInterval(((JTextField) (ae.getSource())).getText());
            }
        });
        // Users forget to hit Enter, which is required for an action event,
View Full Code Here

Examples of javax.swing.JToggleButton.addActionListener()

      // add the main perspective first
      String titleM = m_mainKFPerspective.getPerspectiveTitle();
      Icon icon = m_mainKFPerspective.getPerspectiveIcon();
      JToggleButton tBut = new JToggleButton(titleM, icon, true);
      tBut.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          KFPerspective current = (KFPerspective)m_perspectiveHolder.getComponent(0);
          current.setActive(false);
          m_perspectiveHolder.remove(0);
          m_perspectiveHolder.add((JComponent)m_perspectives.get(0),
View Full Code Here

Examples of javax.swing.JToggleButton.ToggleButtonModel.addActionListener()

        compGroup.addButton(buttonComp1);
        compGroup.addButton(buttonComp2);


        ToggleButtonModel dataModel1 = buttonComp1.getToggleButtonModel();
        dataModel1.addActionListener(this);
        dataModel1.addItemListener(this);

        ToggleButtonModel dataModel2 = buttonComp2.getToggleButtonModel();
        dataModel2.addActionListener(this);
        dataModel2.addItemListener(this);
View Full Code Here

Examples of javax.swing.Timer.addActionListener()

            {
                // Wait 1 sec and remove the progress bar from the main panel.
                Timer progressBarTimer = new Timer(1 * 1000, null);

                progressBarTimer.setRepeats(false);
                progressBarTimer.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e)
                    {
                        mainPanel.remove(progressBar);
                        mainPanel.add(readyLabel, BorderLayout.SOUTH);
                        mainPanel.revalidate();
View Full Code Here

Examples of javax.swing.plaf.basic.BasicArrowButton.addActionListener()

            public void actionPerformed(ActionEvent e) {
                arrowButtonDownAction(e);
            }
        };
        arrowButtonUp.addActionListener(arrowButtonUpAction);
        arrowButtonDown.addActionListener(arrowButtonDownAction);
        jPanel3.add(arrowButtonDown, java.awt.BorderLayout.EAST);
        jPanel3.add(arrowButtonUp, java.awt.BorderLayout.WEST);
        jPanel3.add(targetLabel, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);
View Full Code Here

Examples of javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener()

    BasicComboBoxEditor e = new BasicComboBoxEditor();
    JTextField tf = (JTextField) e.getEditorComponent();
    ActionListener[] listeners = tf.getActionListeners();
    harness.check(listeners.length, 0);
   
    e.addActionListener(this);
    listeners = tf.getActionListeners();
    harness.check(listeners.length, 1);
    harness.check(listeners[0], this);
   
    e.removeActionListener(this);
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.