Examples of ButtonModel


Examples of javax.swing.ButtonModel

   * @param newModel
   *            The new action model for this button.
   * @see #getActionModel()
   */
  public void setActionModel(ActionButtonModel newModel) {
    ButtonModel oldModel = getActionModel();

    if (oldModel != null) {
      oldModel.removeChangeListener(this.actionHandler);
      oldModel.removeActionListener(this.actionHandler);
    }

    actionModel = newModel;

    if (newModel != null) {
View Full Code Here

Examples of net.homeip.mleclerc.omnilinkbbclient.model.ButtonModel

    client._setProperty(AegisWebService_Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
   
    SystemModel systemModel = new SystemModel(client);
    ThermostatModel thermostatModel = new ThermostatModel(client);
    MessageModel messageModel = new MessageModel(client);
    ButtonModel buttonModel = new ButtonModel(client);
    UnitModel unitModel = new UnitModel(client);
    ZoneModel zoneModel = new ZoneModel(client);
    InformationModel infoModel = new InformationModel(client);
   
    final OmniLinkBBClientScreen screen = new OmniLinkBBClientScreen();   
View Full Code Here

Examples of nextapp.echo2.app.button.ButtonModel

     */
    public void testActionListener() {
        ActionHandler buttonActionListener = new ActionHandler();
        ActionHandler modelActionListener = new ActionHandler();
        Button button = new Button("Test");
        ButtonModel model = button.getModel();
        button.addActionListener(buttonActionListener);
        model.addActionListener(modelActionListener);
        assertEquals(0, buttonActionListener.eventCount);
        assertEquals(0, modelActionListener.eventCount);
        button.doAction();
        assertEquals(1, buttonActionListener.eventCount);
        assertEquals(1, modelActionListener.eventCount);
        assertEquals(button, buttonActionListener.lastEvent.getSource());
        assertEquals(model, modelActionListener.lastEvent.getSource());

        buttonActionListener.lastEvent = null;
        modelActionListener.lastEvent = null;
        assertEquals(null, buttonActionListener.lastEvent);
        assertEquals(null, modelActionListener.lastEvent);

        model.doAction();
       
        assertEquals(2, buttonActionListener.eventCount);
        assertEquals(2, modelActionListener.eventCount);
        assertEquals(button, buttonActionListener.lastEvent.getSource());
        assertEquals(model, modelActionListener.lastEvent.getSource());
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.