Package java.awt.event

Examples of java.awt.event.ActionEvent


        // Guaranteed to return a non-null array
        if (!_button.getModel().isPressed()) {
            return;
        }
        ActionListener[] listeners = _button.getActionListeners();
        ActionEvent e = null;
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 1; i >= 0; i--) {
            ActionListener listener = listeners[i];
            if (e == null) {
                String actionCommand = event.getActionCommand();
                if (actionCommand == null) {
                    actionCommand = _button.getActionCommand();
                }
                e = new ActionEvent(_button,
                        ActionEvent.ACTION_PERFORMED,
                        actionCommand,
                        event.getWhen(),
                        event.getModifiers());
            }
View Full Code Here


                if (currentEvent instanceof InputEvent) {
                    modifiers = ((InputEvent) currentEvent).getModifiers();
                } else if (currentEvent instanceof ActionEvent) {
                    modifiers = ((ActionEvent) currentEvent).getModifiers();
                }
                fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
                        getActionCommand(),
                        EventQueue.getMostRecentEventTime(),
                        modifiers));
            }
View Full Code Here

            }
            else if (currentEvent instanceof ActionEvent) {
                modifiers = ((ActionEvent) currentEvent).getModifiers();
            }
            fireActionPerformed(
                    new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
                            getActionCommand(),
                            EventQueue.getMostRecentEventTime(),
                            modifiers));
        }
    }
View Full Code Here

            if (_action != null) {
                if (_target == null) {
                    _action.actionPerformed(e);
                }
                else {
                    _action.actionPerformed(new ActionEvent(getTarget(), e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()));
                }
            }
        }
    }
View Full Code Here

        // Mouse listener to zoom in/out on mouse clicks
        dataPanel.addMouseListener(this);

        // set the default size and reset the display
        this.setPreferredSize(new Dimension(500, 300));
        actionPerformed(new ActionEvent(button, 0, ZOOM_RESET));
    }
View Full Code Here

    {
      ChunkVisInfo cVI = (ChunkVisInfo)events.elementAt(i);
      cVI.selected = true;
    }
   
    ActionEvent a = new ActionEvent(this, 0, "numChunksSelectedChanged");
    drawingPanel.actionListener.actionPerformed(a);
  }
View Full Code Here

    for (int i = 0; i < numEvents; i++)
    {
      ChunkVisInfo cVI = (ChunkVisInfo)events.elementAt(i);
      cVI.selected = false;
    }
    ActionEvent a = new ActionEvent(this, 0, "numChunksSelectedChanged");
    drawingPanel.actionListener.actionPerformed(a);
  }
View Full Code Here

    for (int i = 0; i < numEvents; i++)
    {
      ChunkVisInfo cVI = (ChunkVisInfo)events.elementAt(i);
      cVI.selected = !cVI.selected;
    }
    ActionEvent a = new ActionEvent(this, 0, "numChunksSelectedChanged");
    drawingPanel.actionListener.actionPerformed(a);
  }
View Full Code Here

    for (int i = 0; i < numEvents; i++)
    {
      ChunkVisInfo cVI = (ChunkVisInfo) events.get(i);
      cVI.selected = !cVI.selected;
    }
    ActionEvent a = new ActionEvent(this, 0, "numChunksSelectedChanged");
    drawingPanel.actionListener.actionPerformed(a);
  }
View Full Code Here

    {
      ChunkVisInfo cVI = (ChunkVisInfo) events.get(i);
      cVI.selected = true;
    }

    ActionEvent a = new ActionEvent(this, 0, "numChunksSelectedChanged");
    drawingPanel.actionListener.actionPerformed(a);
  }
View Full Code Here

TOP

Related Classes of java.awt.event.ActionEvent

Copyright © 2018 www.massapicom. 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.