public interface FwkCommandInterface extends FwkInstructionInterface, FwkControlledByInterface, FwkPropertyChangeInterface
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONTROLLER_PROPERTY
The property constant for the controller.
|
static int |
MENU_REASON_CANCELED
The reason constant if a menu was canceled.
|
static int |
MENU_REASON_DESELECTED
The reason constant if a menu was deselected.
|
static int |
MENU_REASON_SELECTED
The reason constant if a menu was selected.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(java.awt.event.ActionListener actionListener)
Add an action listener to the command.
|
void |
addMenuListener(javax.swing.event.MenuListener menuListener)
Add a menu listener to the command.
|
boolean |
execute(java.util.EventObject ev)
Execute the command.
|
FwkArrayInterface |
getActionListenerArray()
Get the action listener array of the command.
|
java.lang.Class |
getButtonClass()
Get the button class.
|
java.lang.String |
getCommandName()
Get the command string.
|
java.lang.String |
getHelpID()
Get the help id.
|
FwkIconInterface |
getIcon()
Get the icon image of the command.
|
java.lang.String |
getIconKey()
Get the icon property keyword.
|
boolean |
getMenuEventEnabled()
Get the menu event enabled flag.
|
java.lang.Class |
getMenuItemClass()
Get the menu item class.
|
FwkArrayInterface |
getMenuListenerArray()
Get the menu listener array of the command.
|
int |
getMnemonic()
Get the mnemonic of the command.
|
java.util.Iterator |
getProperties()
Get all keywords that define a property.
|
java.lang.Object |
getProperty(java.lang.String key)
Get the property for the specified property keyword.
|
boolean |
getRadioGroupState()
Gets the radio group state.
|
boolean |
getSensitivity()
Gets the sensitivity.
|
boolean |
getSeparator()
Gets the separator flag.
|
java.lang.String |
getText()
Get the command text.
|
java.lang.String |
getTextKey()
Get the command text key.
|
boolean |
getToggle()
Gets the toggle flag.
|
boolean |
getToggleState()
Gets the toggle state.
|
boolean |
getToolBarEnabled()
Returns a boolean whether the command is a toolbar command.
|
java.lang.String |
getToolTipKey()
Get the command tooltip key.
|
java.lang.String |
getToolTipText()
Get the command tooltip text.
|
boolean |
getVisibility()
Gets the visiblity.
|
boolean |
hasActionListeners()
Returns a boolean whether the command has action listeners.
|
boolean |
hasMenuListeners()
Returns a boolean whether the command has menu listeners.
|
boolean |
isParent()
Returns a boolean whether the command has children.
|
boolean |
menuSelect(javax.swing.event.MenuEvent event,
int reason)
The callback for menuevents.
|
void |
register(java.lang.Object obj)
Register the object at the command component.
|
java.util.Enumeration |
registeredObjects()
Retrieves the enumeration of registered objects.
|
int |
registrySize()
Return the total number of registered objects.
|
void |
removeActionListener(java.awt.event.ActionListener actionListener)
Remove an action listener from the command.
|
void |
removeMenuListener(javax.swing.event.MenuListener menuListener)
Remove a menu listener from the command.
|
void |
setAsParent()
Set the FWK command to be a parent.
|
void |
setButtonClass(java.lang.Class clazz)
Set the button class.
|
void |
setCommandName(java.lang.String commandName)
Set the command string.
|
void |
setHelpID(java.lang.String helpID)
Set the command help ID.
|
void |
setIcon(FwkIconInterface icon)
Set the icon image of the command.
|
void |
setIconKey(java.lang.String iconKey)
Set the property keyword of the icon.
|
void |
setMenuEventEnabled(boolean flag)
Set the menu event enabled flag.
|
void |
setMenuItemClass(java.lang.Class clazz)
Set the menu item class.
|
void |
setMnemonic(int mnemonic)
Set the mnemonic of the command.
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
Set a property for the specified property keyword.
|
void |
setRadioGroupState(boolean flag)
Sets the radio group state.
|
void |
setSensitivity(boolean flag)
Sets the sensitivity of the command.
|
void |
setSeparator(boolean flag)
Sets the command as separator.
|
void |
setText(java.lang.String text)
Set the command text.
|
void |
setTextKey(java.lang.String textKey)
Set the command text key to get the properties.
|
void |
setToggle(boolean flag)
Sets the command as toggle.
|
void |
setToggleState(boolean flag)
Sets the command toggle state.
|
void |
setToolBarEnabled(boolean flag)
Sets a boolean to make the command a toolbar command.
|
void |
setToolTipKey(java.lang.String toolTipKey)
Set the command tooltip key to get the properties.
|
void |
setToolTipText(java.lang.String toolTipText)
Set the command tooltip text.
|
void |
setVisibility(boolean flag)
Sets the visibility of the command.
|
void |
unregister(java.lang.Object obj)
Unregister the object.
|
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommandsgetPresentationString, getPresentationStringgetVersion, releasegetController, setControlleraddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsstatic final java.lang.String CONTROLLER_PROPERTY
static final int MENU_REASON_CANCELED
static final int MENU_REASON_DESELECTED
static final int MENU_REASON_SELECTED
void setText(java.lang.String text)
Text - The new text of the command.getText(),
setTextKey(String)java.lang.String getText()
setText(String),
getTextKey()void setTextKey(java.lang.String textKey)
textKey - The new text key of the command.getTextKey(),
getText()java.lang.String getTextKey()
setTextKey(String),
getText()void setCommandName(java.lang.String commandName)
commandName - The new command string (name) of the command.#getCommand()java.lang.String getCommandName()
#setCommand(String)void setMnemonic(int mnemonic)
mnemonic - The new mnemonic of the command.getMnemonic()java.lang.Object getProperty(java.lang.String key)
key - The property keyword.java.util.Iterator getProperties()
int getMnemonic()
void setHelpID(java.lang.String helpID)
helpID - The new helpID of the command.getHelpID()java.lang.String getHelpID()
setHelpID(String)void setIconKey(java.lang.String iconKey)
iconKey - The new property keyword of the icon.getIconKey()java.lang.String getIconKey()
setIconKey(String)void setIcon(FwkIconInterface icon)
image - The new icon of the command.#getIconImage(),
#setIconURL(String)FwkIconInterface getIcon()
#setIconImage(Image),
#getIconURL()void setMenuEventEnabled(boolean flag)
flag - if true the menu events are enabled.boolean getMenuEventEnabled()
boolean menuSelect(javax.swing.event.MenuEvent event,
int reason)
event - The menueventreason - The reson. Use predefined constants above.void setProperty(java.lang.String key,
java.lang.Object value)
key - The property keyword.object - The property value.void setToolTipText(java.lang.String toolTipText)
toolTipText - The new tooltip text of the command.getToolTipText(),
getToolTipKey()java.lang.String getToolTipText()
setToolTipText(String),
getToolTipKey()void setToolTipKey(java.lang.String toolTipKey)
toolTipKey - The new tooltip key of the command.getToolTipKey(),
getToolTipText()java.lang.String getToolTipKey()
setToolTipKey(String),
getToolTipText()boolean getVisibility()
setVisibility(boolean)void setVisibility(boolean flag)
flag - true if visible.getVisibility()boolean getSensitivity()
setSensitivity(boolean)void setSensitivity(boolean flag)
flag - true if sensitive.getSensitivity()boolean getSeparator()
setSeparator(boolean)void setSeparator(boolean flag)
flag - true if separator.getSeparator()boolean getToggle()
setToggle(boolean)void setToggle(boolean flag)
flag - true if command is a toggle.getToggle()boolean getToggleState()
setToggleState(boolean)void setToggleState(boolean flag)
flag - true if command is a toggle.getToggle()boolean getRadioGroupState()
setRadioGroupState(boolean)void setRadioGroupState(boolean flag)
flag - true if command is a toggle.getRadioGroupState()void setToolBarEnabled(boolean flag)
true - If the command should be enabled for the toolbar.boolean getToolBarEnabled()
void setAsParent()
boolean isParent()
boolean hasActionListeners()
boolean hasMenuListeners()
void register(java.lang.Object obj)
obj - The object to be stored.void unregister(java.lang.Object obj)
obj - The object to be unregistered,int registrySize()
java.util.Enumeration registeredObjects()
FwkArrayInterface getActionListenerArray()
FwkArrayInterface getMenuListenerArray()
void addActionListener(java.awt.event.ActionListener actionListener)
actionListener - The action listener to be added.void addMenuListener(javax.swing.event.MenuListener menuListener)
menuListener - The menu listener to be added.void removeActionListener(java.awt.event.ActionListener actionListener)
actionListener - The action listener to be removed.void removeMenuListener(javax.swing.event.MenuListener menuListener)
menuListener - The menu listener to be removed.boolean execute(java.util.EventObject ev)
ev - The event that is the trigger of this command. May be nullvoid setButtonClass(java.lang.Class clazz)
the - button class to be used when creating a button out of the command.java.lang.Class getButtonClass()
void setMenuItemClass(java.lang.Class clazz)
the - menu item class to be used when creating a menu item out of the command.java.lang.Class getMenuItemClass()