Java Code Examples for java.awt.event.ActionEvent#getWhen()
The following examples show how to use
java.awt.event.ActionEvent#getWhen() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: netbeans File: DialogDisplayer.java License: Apache License 2.0 | 6 votes |
@Override public void actionPerformed( ActionEvent e ) { nd.setValue(option); if (buttonListener != null) { // #34485: some listeners expect that the action source is the option, not the button ActionEvent e2 = new ActionEvent( option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers() ); buttonListener.actionPerformed(e2); } if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) { haveFinalValue = true; setVisible(false); } }
Example 2
Source Project: Logisim File: MenuItemHelper.java License: GNU General Public License v3.0 | 5 votes |
@Override public void actionPerformed(ActionEvent event) { if (!listeners.isEmpty()) { ActionEvent e = new ActionEvent(menuItem, event.getID(), event.getActionCommand(), event.getWhen(), event.getModifiers()); for (ActionListener l : listeners) { l.actionPerformed(e); } } }
Example 3
Source Project: egdownloader File: HTMLDocumentEditor.java License: GNU General Public License v2.0 | 5 votes |
public void actionPerformed(ActionEvent ae) { String actionCommand = ae.getActionCommand(); if (debug) { int modifier = ae.getModifiers(); long when = ae.getWhen(); String parameter = ae.paramString(); System.out.println("actionCommand: " + actionCommand); System.out.println("modifier: " + modifier); System.out.println("when: " + when); System.out.println("parameter: " + parameter); } if (actionCommand.compareTo("New") == 0) { startNewDocument(); } else if (actionCommand.compareTo("Open") == 0) { openDocument(); } else if (actionCommand.compareTo("Save") == 0) { saveDocument(); } else if (actionCommand.compareTo("Save As") == 0) { saveDocumentAs(); } else if (actionCommand.compareTo("Exit") == 0) { exit(); } else if (actionCommand.compareTo("Clear") == 0) { clear(); } else if (actionCommand.compareTo("Select All") == 0) { selectAll(); } else if (actionCommand.compareTo("帮助") == 0) { help(); } else if (actionCommand.compareTo("Keyboard Shortcuts") == 0) { showShortcuts(); } else if (actionCommand.compareTo("About QuantumHyperSpace") == 0) { aboutQuantumHyperSpace(); } }
Example 4
Source Project: gsn File: SystemTime.java License: GNU General Public License v3.0 | 5 votes |
public void actionPerformed ( ActionEvent actionEvent ) { StreamElement streamElement = new StreamElement( EMPTY_FIELD_LIST , EMPTY_FIELD_TYPES , EMPTY_DATA_PART , actionEvent.getWhen( ) ); if(delayPostingElements){ streamElementBuffer.add(streamElement); synchronized(objectLock){ objectLock.notifyAll(); } } else postStreamElement( streamElement ); }
Example 5
Source Project: netcdf-java File: Field.java License: BSD 3-Clause "New" or "Revised" License | 4 votes |
public void actionPerformed(ActionEvent e) { ActionEvent me = new ActionEvent(Field.this, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()); orgAct.actionPerformed(me); }
Example 6
Source Project: netbeans File: SourceTranslatorAction.java License: Apache License 2.0 | 4 votes |
public void actionPerformed(ActionEvent e) { ActionEvent event = new ActionEvent(source, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()); scrollAction.actionPerformed(event); }