Package java.awt.event

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


 
  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 dispatchAction()
   {
         final ActionListener listener = actionListener;
         if( listener != null ) {
             listener.actionPerformed( new ActionEvent( this, ActionEvent.ACTION_PERFORMED, null ));
         }
     }

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

                case UNKNOWN:
                default:
                    if (c != 0) { // ignore null chars
                      ActionListener action = (ActionListener) triggeredActions.get(new Character((char)c));
                      if (action != null)
                        action.actionPerformed(null);
                      else
                        putChar(c, true);
                    } else
                        success = false;
                }
View Full Code Here

     */
    public void testCreateWithMethodCall() {
        Object invocationObject = new InvocationObject();
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "doSomething");
        listener.actionPerformed(new ActionEvent(this, 0, ""));

        assertEquals(getObject(), invocationObject);
        assertEquals("doSomething", getMethodName());

        Object[] params = getParams();
View Full Code Here

    public void testCreateWithSetterCall() {
        Object invocationObject = new InvocationObject();
        ActionEvent ae = new ActionEvent(this, 0, "");
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "someObject", "source");
        listener.actionPerformed(ae);

        assertEquals(getObject(), invocationObject);
        assertEquals("setSomeObject", getMethodName());

        Object[] params = getParams();
View Full Code Here

    public void testCreateWithDottedParameterCall() {
        Object invocationObject = new InvocationObject();
        ActionEvent ae = new ActionEvent(this, 0, "");
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "someText", "source.text");
        listener.actionPerformed(ae);

        assertEquals(getObject(), invocationObject);
        assertEquals("setSomeText", getMethodName());

        Object[] params = getParams();
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

      selectProperty();
    } else if (e.getSource() == m_StatusBox) {
      // notify any listeners
      for (int i = 0; i < m_Listeners.size(); i++) {
  ActionListener temp = ((ActionListener)m_Listeners.elementAt(i));
  temp.actionPerformed(new ActionEvent(this,
               ActionEvent.ACTION_PERFORMED,
               Messages.getInstance().getString("GeneratorPropertyIteratorPanel_ActionPerformed_Text")));
      }

      // Toggles whether the custom property is used
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

  private void fireActionListeners(ActionEvent e) {
    if(listeners==null) return;
    for(int a = 0; a<listeners.size(); a++) {
      ActionListener l = listeners.get(a);
      try {
        l.actionPerformed(e);
      } catch(Exception e2) {
        e2.printStackTrace();
      }
    }
  }
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.