Package org.apache.fop.render.awt.viewer
Class Command
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.apache.fop.render.awt.viewer.Command
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class Command extends javax.swing.AbstractActionThis class represents UI-commands, which can be used as menu or toolbar items
. When theCommandobject receives action event, that object'sdoitmethod is invoked.doitmethod by default does nothing and the class customer have to override it to implement any action handling logic. Originally contributed by: Juergen Verwohlt: Juergen.Verwohlt@jcatalog.com, Rainer Steinkuhle: Rainer.Steinkuhle@jcatalog.com, Stanislav Gorkhover: Stanislav.Gorkhover@jcatalog.com- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Command(java.lang.String name, int mnemonic)CreatesCommandobject with a given name and sets the name as a tooltip text.Command(java.lang.String name, java.lang.String iconName)CreatesCommandobject with a given name, the same tooltip text and icon image if appropriate image file is found.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)voiddoit()Action handler, have to be overrided by subclasses.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
Command
public Command(java.lang.String name, int mnemonic)CreatesCommandobject with a given name and sets the name as a tooltip text. No associated icon image.- Parameters:
name- of the commandmnemonic- A Key
-
Command
public Command(java.lang.String name, java.lang.String iconName)CreatesCommandobject with a given name, the same tooltip text and icon image if appropriate image file is found.- Parameters:
name- name of the commandiconName- name of the icon
-
-