Package java.awt.event

Examples of java.awt.event.ActionListener.actionPerformed()


                  if (c != 0)
                  { // ignore null chars
                     ActionListener action = triggeredActions.get((char) c);
                     if (action != null)
                     {
                        action.actionPerformed(null);
                     }
                     else
                     {
                        putChar(c, true);
                     }
View Full Code Here


  public void fireActionListeners() {fireActionListeners("");}
  public void fireActionListeners(String command) {
    final ActionEvent e = new ActionEvent(source, count++, prefix + ":" + command);
    for (ActionListener l: listeners) {
      final ActionListener l2 = l;
      SwingUtilities.invokeLater(new Runnable() {@Override public void run() {l2.actionPerformed(e);}});
    }
  }
 
  public ActionDelegate actionDelegate() {return new ActionDelegate(this);}
  public ChangeDelegate changeDelegate() {return new ChangeDelegate(this);}
View Full Code Here

        }
      };

      @Override
      public void execute() {
        action.actionPerformed(null);
      }

    });

    return actions;
View Full Code Here

       * Hide the popup menu when an ESCAPE key binding is found,
       * otherwise dispose the Window.
       */
      ActionListener escapeAction = getEscapeAction(rootPane);
      if (escapeAction != null) {
        escapeAction.actionPerformed(null);
      } else {
        Window window = SwingUtilities.windowForComponent(component);
        window.dispose();
      }
    }
View Full Code Here

                                command = st.nextToken ();

                            ActionListener al =
                                (ActionListener) parentUI.get(action);
                            if (al != null) {
                                al.actionPerformed (
                                    new ActionEvent (node, 0, command)
                                );
                            }
                            // System.out.println ("ACTION: " + action);
                            // System.out.println ("COMMAND: " + command);
View Full Code Here

        synchronized(this) {
          l = (Vector)m_listeners.clone();
        }
        for (int i = 0; i < l.size(); i++) {
          ActionListener al = (ActionListener)l.elementAt(i);
          al.actionPerformed(e);
        }
      }
    }
   
    private double [] calculateRegionProbs(int j, int i) throws Exception {
View Full Code Here

  public void stateChanged( ChangeEvent e )
  {
    final ActionListener l = al;
    if( l != null ) {
      l.actionPerformed( new ActionEvent( e.getSource(), ActionEvent.ACTION_PERFORMED, null ));
    }
  }
}
View Full Code Here

  public void stateChanged( ChangeEvent e )
  {
    final ActionListener l = al;
    if( l != null ) {
      l.actionPerformed( new ActionEvent( e.getSource(), ActionEvent.ACTION_PERFORMED, null ));
    }
  }
}
View Full Code Here

    private void dispatchAction( String command ) {
        final ActionListener l = actionListener;
        if( l != null ) {
            try {
                l.actionPerformed( new ActionEvent( this, ActionEvent.ACTION_PERFORMED, command ));
            } catch( Exception ex ) {
                ex.printStackTrace();
            }
        }
    }
View Full Code Here

  {
//    valueWasAdjusting = e.getValueIsAdjusting();
   
    final ActionListener l = al;
    if( l != null ) {
      l.actionPerformed( new ActionEvent( e.getSource(), ActionEvent.ACTION_PERFORMED, null ));
    }
  }
}
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.