Package javax.swing

Examples of javax.swing.DefaultButtonModel.addActionListener()


  }

  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    m.addChangeListener(this);
    m.setRollover(true);
    harness.check(m.isRollover(), true);
    harness.check(lastChangeEvent.getSource(), m);
    harness.check(lastActionEvent, null);
View Full Code Here


  }

  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    harness.check(m.getActionListeners()[0], this);
    m.addActionListener(null);
    harness.check(m.getActionListeners().length, 1);
  }
}
View Full Code Here

  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    harness.check(m.getActionListeners()[0], this);
    m.addActionListener(null);
    harness.check(m.getActionListeners().length, 1);
  }
}
View Full Code Here

  }
 
  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    m.addChangeListener(this);
    m.addItemListener(this);
    m.setSelected(true);
    harness.check(m.isSelected(), true);
    harness.check(lastChangeEvent.getSource(), m);
View Full Code Here

 
  public void testEvent(TestHarness harness)
  {
    harness.checkPoint("testEvent");
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    m.addChangeListener(this);
    lastActionEvent = null;
    m.setActionCommand("ABC");
    m.setArmed(true);
    harness.check(lastActionEvent, null);
View Full Code Here

  }

  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    m.addChangeListener(this);
    m.setMnemonic(99);
    harness.check(m.getMnemonic(), 99);
    harness.check(lastChangeEvent.getSource(), m);
    harness.check(lastActionEvent, null);
View Full Code Here

  }

  public void test(TestHarness harness)
  {
    DefaultButtonModel m = new DefaultButtonModel();
    m.addActionListener(this);
    m.addChangeListener(this);
    ButtonGroup bg = new ButtonGroup();
    m.setGroup(bg);
    harness.check(m.getGroup(), bg);
    harness.check(lastChangeEvent, null);
View Full Code Here

        input.setEventListenerParams("click",false,CommMode.XHR_SYNC,null,null,-1); // Es necesario que sea s�ncrono pues sino no funciona la llamada preventDefault()
        input.addEventListener("click",this);

        dataModel.addChangeListener(this);
        dataModel.addActionListener(this);
    }

    public void handleEvent(Event evt)
    {
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
View Full Code Here

        button.setButtonModel(dataModel);

        button.addEventListener("click",this);

        dataModel.addChangeListener(this);
        dataModel.addActionListener(this);
    }

    public void handleEvent(Event evt)
    {
        outText("OK " + evt.getType() + " "); // Para que se vea
View Full Code Here

        input.setEventListenerParams("click",false,CommMode.XHR_SYNC,null,null,-1); // Es necesario que sea s�ncrono pues sino no funciona la llamada preventDefault()
        input.addEventListener("click",this);

        dataModel.addChangeListener(this);
        dataModel.addActionListener(this);
    }

    public void handleEvent(Event evt)
    {
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
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.