Package java.awt.event

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


                        ActionEvent.ACTION_PERFORMED,
                        actionCommand,
                        event.getWhen(),
                        event.getModifiers());
            }
            listener.actionPerformed(e);
        }
    }
}
View Full Code Here


  
     protected void dispatchAction()
   {
         final ActionListener listener = actionListener;
         if( listener != null ) {
             listener.actionPerformed( new ActionEvent( this, ActionEvent.ACTION_PERFORMED, null ));
         }
     }

   public Point2D[] getControlPoints()
   {
View Full Code Here

    ActionListener a = new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        anonymousClassName = getClass().getName();
      }
    };
    a.actionPerformed(null);

    return anonymousClassName;
  }

  public class NamedInnerClass {
View Full Code Here

    final ActionEvent event = new ActionEvent(this, -1, null);
    final ActionListener[] listeners = listenerList.getListeners(ActionListener.class);
    for (int i = 0; i < listeners.length; i++)
    {
      final ActionListener listener = listeners[i];
      listener.actionPerformed(event);
    }
  }

  public void addActionListener(final ActionListener listener)
  {
View Full Code Here

      System.out.print("Creating proxy ... ");
      ActionListener a = (ActionListener)createProxy("foo.bar.", s);
      System.out.println("Done. Now calling actionPerformed()");
     
      a.actionPerformed(new ActionEvent(a, ActionEvent.ACTION_PERFORMED, "hello"));
    } else {
        System.err.println("Call me with java org.apache.bcel.util.JavaWrapper ProxyCreator");
    }
  }
View Full Code Here

    }

    ActionEvent event = new ActionEvent(this, 0, "GNU yourself!");
   
    // Provokes a call to invoke().
    al.actionPerformed(event);

    // Note: Referential equality checks are used to really make sure we have
    // the same instance.
   
    harness.check(proxy == al, "proxy method called");
View Full Code Here

 
  protected void fireActionPerformed()
  {
        final ActionListener l = al;
    if( l != null ) {
      l.actionPerformed( new ActionEvent( this, ActionEvent.ACTION_PERFORMED, null ));
    }
  }

  public void paintComponent( Graphics g )
  {
View Full Code Here

     */
    protected void fireActionEvent(ActionEvent e) {
        if (actionListeners != null) {
            for (int i = 0; i < actionListeners.size(); i++) {
                ActionListener l = actionListeners.get(i);
                l.actionPerformed(e);
            }
        }
    }

    /**
 
View Full Code Here

    public void actionPerformed(ActionEvent event) {
        // Pass the action on to each of our listeners.
        Enumeration<ActionListener> iter = actionListeners.elements();
        while (iter.hasMoreElements()) {
            ActionListener listener = iter.nextElement();
            listener.actionPerformed(event);
        }
    }

    /**
     * Register an object that wishes to be alerted when an item on this menu
View Full Code Here

    public void actionPerformed(ActionEvent event) {
        // Pass the action on to each of our listeners.
        Enumeration<ActionListener> iter = actionListeners.elements();
        while (iter.hasMoreElements()) {
            ActionListener listener = iter.nextElement();
            listener.actionPerformed(event);
        }
    }

    /**
     * Register an object that wishes to be alerted when an item on this menu
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.