Class MyMenu.MenuAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--MyMenu.MenuAction
- Enclosing class:
- MyMenu
- class MyMenu.MenuAction
- extends javax.swing.AbstractAction
class necessary for those actions which are retrieved also on the toolbars.
The extension of the AbstractAction class allows identical behaviour of a
specified menu item and its associated button on the toolbar
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
arrayTable,
changeSupport,
enabled |
Constructor Summary |
MyMenu.MenuAction(java.lang.String text)
|
MyMenu.MenuAction(java.lang.String text,
javax.swing.Icon icon)
Constructor used when to the action we associate also an icon |
Method Summary |
private void |
ActionFromMenu()
passes to the UserInterface the commands from the menu |
void |
actionPerformed(java.awt.event.ActionEvent e)
captures the event and intialize a separate thread to process it. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener,
clone,
firePropertyChange,
getValue,
isEnabled,
putValue,
removePropertyChangeListener,
setEnabled |
Methods inherited from class java.lang.Object |
,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
command
java.lang.String command
ui
UserInterface ui
MyMenu.MenuAction
public MyMenu.MenuAction(java.lang.String text)
MyMenu.MenuAction
public MyMenu.MenuAction(java.lang.String text,
javax.swing.Icon icon)
- Constructor used when to the action we associate also an icon
- Parameters:
text
- the name of the actionicon
- the icon associated. It is an image in GIF format
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- captures the event and intialize a separate thread to process it.
The thread is intilaized using the SwingWorker class
- Overrides:
- actionPerformed in class javax.swing.AbstractAction
ActionFromMenu
private void ActionFromMenu()
- passes to the UserInterface the commands from the menu
- See Also:
UserInterface.Open(JComponent)
,
UserInterface.Save()
,
RecognizerPanel.ShowDialog()
,
DialogActPanel.ShowDialog()
,
DialogPattern.ShowDialog()
,
DialogStatistics.ShowDialog()
,
TranslationStatistics.ShowDialog()