public class Cmd extends FwkInfoBusConsumer implements CommandInterface
| Modifier and Type | Field and Description |
|---|---|
static int |
APPEND_ERR |
static int |
APPEND_OUT |
protected java.lang.String |
commandString
The source command string.
|
protected static int |
counter |
protected FwkCommand |
fwkCommand
The command decorator.
|
protected HQL |
hql
The HQL interpreter.
|
protected FwkPropertyGroup |
keys
The property group containing all option key value pairs.
|
static int |
OPEN_ERR |
static int |
OPEN_OUT |
protected java.lang.String[] |
params
The array containing all parameters.
|
protected OdsxResultSetInterface |
result
The result of the command.
|
protected int |
streamOpened |
protected long |
timeNeeded
The elapsed time to execute the command.
|
static java.lang.String |
version |
FWKMIMETYPEinfoBusMemberSupportchangeManager, properties, suspendChangeManagersourceauthor, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleNameCONTROLLER_PROPERTY, MENU_REASON_CANCELED, MENU_REASON_DESELECTED, MENU_REASON_SELECTEDBUSNAMEINFOBUS_SOURCEAUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME| Constructor and Description |
|---|
Cmd()
The default constructor.
|
Cmd(FwkControllerInterface controller)
The constructor receiving an infobus controller.
|
| 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.
|
java.lang.String |
commandString()
Get the command string.
|
boolean |
execute()
Execute 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.
|
OdsxResultSetInterface |
getResult()
Get the result columns of the command.
|
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.
|
java.lang.String |
getVersion()
Get the version of the HQL implementation.
|
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 |
initializeExecution()
Initialize execution.
|
boolean |
isParent()
Returns a boolean whether the command has children.
|
boolean |
menuSelect(javax.swing.event.MenuEvent event,
int reason)
The callback for menuevents.
|
boolean |
parseParams(java.lang.String pString)
Set the parameter string to the command.
|
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 |
release()
Release the command object.
|
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 |
setInterpreter(HQL hql)
Set the interpreter.
|
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 |
terminateExecution()
Terminate execution.
|
long |
timeNeeded()
Get the time in milli seconds needed by execution.
|
void |
unregister(java.lang.Object obj)
Unregister the object.
|
dataItemAvailable, dataItemRevoked, finalize, findDataItem, findDataItem, findMultipleDataItems, findMultipleDataItems, getController, initialize, isAssignable, propertyChange, register, setController, setInfoBusName, unregisteraddMimeType, getDataFlavor, getDataFlavors, getMimeTypes, removeMimeTypeaddInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setMemberName, setNameaddDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getPropertyGroup, getSource, isChangeManagerSuspended, removeDataItemChangeListener, setPropertyGroup, suspendChangeManageraddCommand, addCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, destroyController, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommand, getCommands, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeCommand, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCommands, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIconKey, setSource, setSupportEMail, setTitleNameaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEventsgetClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toStringgetNiceVersionclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommandsgetPresentationString, getPresentationStringgetController, setControlleraddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsaddMimeType, getDataFlavor, getDataFlavors, getMimeTypes, removeMimeTypegetInfoBusName, getMemberName, isConnected, setMemberNamefireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getPropertyGroup, setPropertyGroup, suspendChangeManagergetCommands, getPersistentObjectNamesdestroyControlleraddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListenergetAuthor, getBuild, getClassName, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIconKey, setName, setSupportEMail, setTitleNamepublic static final java.lang.String version
protected FwkCommand fwkCommand
protected java.lang.String[] params
protected FwkPropertyGroup keys
protected java.lang.String commandString
protected long timeNeeded
protected OdsxResultSetInterface result
OdsxResultSetInterfaceprotected HQL hql
protected int streamOpened
public static final int OPEN_OUT
public static final int OPEN_ERR
public static final int APPEND_OUT
public static final int APPEND_ERR
protected static int counter
public Cmd()
public Cmd(FwkControllerInterface controller)
controller - the infobus controller.public java.lang.String getVersion()
getVersion in interface FwkInterfacegetVersion in class FwkMimeTypepublic boolean parseParams(java.lang.String pString)
parseParams in interface CommandInterfacepString - the string containing the whole interpreter string expect the command name.public java.lang.String commandString()
commandString in interface CommandInterfacepublic void release()
release in interface FwkInterfacerelease in interface javax.infobus.DataItemrelease in class FwkInfoBusConsumerpublic void setInterpreter(HQL hql)
setInterpreter in interface CommandInterfacehql - the HQL interpreter.public boolean execute()
execute in interface CommandInterfacepublic boolean initializeExecution()
initializeExecution in interface CommandInterfacepublic void terminateExecution()
terminateExecution in interface CommandInterfacepublic long timeNeeded()
timeNeeded in interface CommandInterfacepublic boolean execute(java.util.EventObject ev)
execute in interface FwkCommandInterfaceev - the event object. (currently not used)public void setText(java.lang.String text)
setText in interface FwkCommandInterfacetext - The new text of the command.getText(),
setTextKey(String)public java.lang.String getText()
getText in interface FwkCommandInterfacesetText(String),
getTextKey()public void setTextKey(java.lang.String textKey)
setTextKey in interface FwkCommandInterfacetextKey - The new text key of the command.getTextKey(),
getText()public java.lang.String getTextKey()
getTextKey in interface FwkCommandInterfacesetTextKey(String),
getText()public void setCommandName(java.lang.String commandName)
setCommandName in interface FwkCommandInterfacecommandName - The new command string (name) of the command.#getCommand()public java.lang.String getCommandName()
getCommandName in interface FwkCommandInterface#setCommand(String)public void setMnemonic(int mnemonic)
setMnemonic in interface FwkCommandInterfacemnemonic - The new mnemonic of the command.getMnemonic()public java.lang.Object getProperty(java.lang.String key)
getProperty in interface FwkCommandInterfacegetProperty in interface FwkItemInterfacegetProperty in interface javax.infobus.DataItemgetProperty in class FwkItemkey - The property keyword.public java.util.Iterator getProperties()
getProperties in interface FwkCommandInterfacepublic int getMnemonic()
getMnemonic in interface FwkCommandInterfacepublic void setHelpID(java.lang.String helpID)
setHelpID in interface FwkCommandInterfacehelpID - The new helpID of the command.getHelpID()public java.lang.String getHelpID()
getHelpID in interface FwkCommandInterfacesetHelpID(String)public void setIconKey(java.lang.String iconKey)
setIconKey in interface FwkCommandInterfacesetIconKey in interface FwkDescriptionInterfacesetIconKey in class FwkPersistenceiconKey - The new property keyword of the icon.getIconKey()public java.lang.String getIconKey()
getIconKey in interface FwkCommandInterfacegetIconKey in interface FwkDescriptionInterfacegetIconKey in class FwkPersistencesetIconKey(String)public void setIcon(FwkIconInterface icon)
setIcon in interface FwkCommandInterfacesetIcon in interface FwkDescriptionInterfacesetIcon in class FwkPersistenceicon - The new icon of the command.#getIconImage(),
#setIconURL(String)public FwkIconInterface getIcon()
getIcon in interface FwkCommandInterfacegetIcon in interface FwkDescriptionInterfacegetIcon in class FwkPersistence#setIconImage(Image),
#getIconURL()public void setMenuEventEnabled(boolean flag)
setMenuEventEnabled in interface FwkCommandInterfaceflag - if true the menu events are enabled.public boolean getMenuEventEnabled()
getMenuEventEnabled in interface FwkCommandInterfacepublic boolean menuSelect(javax.swing.event.MenuEvent event,
int reason)
menuSelect in interface FwkCommandInterfaceevent - The menueventreason - The reson. Use predefined constants above.public void setProperty(java.lang.String key,
java.lang.Object value)
setProperty in interface FwkCommandInterfacesetProperty in interface FwkItemInterfacesetProperty in class FwkItemkey - The property keyword.value - The property value.public void setToolTipText(java.lang.String toolTipText)
setToolTipText in interface FwkCommandInterfacetoolTipText - The new tooltip text of the command.getToolTipText(),
getToolTipKey()public java.lang.String getToolTipText()
getToolTipText in interface FwkCommandInterfacesetToolTipText(String),
getToolTipKey()public void setToolTipKey(java.lang.String toolTipKey)
setToolTipKey in interface FwkCommandInterfacetoolTipKey - The new tooltip key of the command.getToolTipKey(),
getToolTipText()public java.lang.String getToolTipKey()
getToolTipKey in interface FwkCommandInterfacesetToolTipKey(String),
getToolTipText()public boolean getVisibility()
getVisibility in interface FwkCommandInterfacesetVisibility(boolean)public void setVisibility(boolean flag)
setVisibility in interface FwkCommandInterfaceflag - true if visible.getVisibility()public boolean getSensitivity()
getSensitivity in interface FwkCommandInterfacesetSensitivity(boolean)public void setSensitivity(boolean flag)
setSensitivity in interface FwkCommandInterfaceflag - true if sensitive.getSensitivity()public boolean getSeparator()
getSeparator in interface FwkCommandInterfacesetSeparator(boolean)public void setSeparator(boolean flag)
setSeparator in interface FwkCommandInterfaceflag - true if separator.getSeparator()public boolean getToggle()
getToggle in interface FwkCommandInterfacesetToggle(boolean)public void setToggle(boolean flag)
setToggle in interface FwkCommandInterfaceflag - true if command is a toggle.getToggle()public boolean getToggleState()
getToggleState in interface FwkCommandInterfacesetToggleState(boolean)public void setToggleState(boolean flag)
setToggleState in interface FwkCommandInterfaceflag - true if command is a toggle.getToggle()public boolean getRadioGroupState()
getRadioGroupState in interface FwkCommandInterfacesetRadioGroupState(boolean)public void setRadioGroupState(boolean flag)
setRadioGroupState in interface FwkCommandInterfaceflag - true if command is a toggle.getRadioGroupState()public void setToolBarEnabled(boolean flag)
setToolBarEnabled in interface FwkCommandInterfaceflag - true If the command should be enabled for the toolbar.public boolean getToolBarEnabled()
getToolBarEnabled in interface FwkCommandInterfacepublic void setAsParent()
setAsParent in interface FwkCommandInterfacepublic boolean isParent()
isParent in interface FwkCommandInterfacepublic boolean hasActionListeners()
hasActionListeners in interface FwkCommandInterfacepublic boolean hasMenuListeners()
hasMenuListeners in interface FwkCommandInterfacepublic void register(java.lang.Object obj)
register in interface FwkCommandInterfaceobj - The object to be stored.public void unregister(java.lang.Object obj)
unregister in interface FwkCommandInterfaceobj - The object to be unregistered,public int registrySize()
registrySize in interface FwkCommandInterfacepublic java.util.Enumeration registeredObjects()
registeredObjects in interface FwkCommandInterfacepublic FwkArrayInterface getActionListenerArray()
getActionListenerArray in interface FwkCommandInterfacepublic FwkArrayInterface getMenuListenerArray()
getMenuListenerArray in interface FwkCommandInterfacepublic void addActionListener(java.awt.event.ActionListener actionListener)
addActionListener in interface FwkCommandInterfaceactionListener - The action listener to be added.public void addMenuListener(javax.swing.event.MenuListener menuListener)
addMenuListener in interface FwkCommandInterfacemenuListener - The menu listener to be added.public void removeActionListener(java.awt.event.ActionListener actionListener)
removeActionListener in interface FwkCommandInterfaceactionListener - The action listener to be removed.public void removeMenuListener(javax.swing.event.MenuListener menuListener)
removeMenuListener in interface FwkCommandInterfacemenuListener - The menu listener to be removed.public void setButtonClass(java.lang.Class clazz)
setButtonClass in interface FwkCommandInterfaceclazz - the button class to be used when creating a button out of the command.public java.lang.Class getButtonClass()
getButtonClass in interface FwkCommandInterfacepublic void setMenuItemClass(java.lang.Class clazz)
setMenuItemClass in interface FwkCommandInterfaceclazz - the menu item class to be used when creating a menu item out of the command.public java.lang.Class getMenuItemClass()
getMenuItemClass in interface FwkCommandInterfacepublic OdsxResultSetInterface getResult()
getResult in interface CommandInterface