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 |
FWKMIMETYPE
infoBusMemberSupport
changeManager, properties, suspendChangeManager
source
author, 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, titleName
CONTROLLER_PROPERTY, MENU_REASON_CANCELED, MENU_REASON_DESELECTED, MENU_REASON_SELECTED
BUSNAME
INFOBUS_SOURCE
AUTHOR, 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, unregister
addMimeType, getDataFlavor, getDataFlavors, getMimeTypes, removeMimeType
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setMemberName, setName
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getPropertyGroup, getSource, isChangeManagerSuspended, removeDataItemChangeListener, setPropertyGroup, suspendChangeManager
addCommand, 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, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toString
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString, getPresentationString
getController, setController
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addMimeType, getDataFlavor, getDataFlavors, getMimeTypes, removeMimeType
getInfoBusName, getMemberName, isConnected, setMemberName
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getPropertyGroup, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
destroyController
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, 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, setTitleName
public 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
OdsxResultSetInterface
protected 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 FwkInterface
getVersion
in class FwkMimeType
public boolean parseParams(java.lang.String pString)
parseParams
in interface CommandInterface
pString
- the string containing the whole interpreter string expect the command name.public java.lang.String commandString()
commandString
in interface CommandInterface
public void release()
release
in interface FwkInterface
release
in interface javax.infobus.DataItem
release
in class FwkInfoBusConsumer
public void setInterpreter(HQL hql)
setInterpreter
in interface CommandInterface
hql
- the HQL interpreter.public boolean execute()
execute
in interface CommandInterface
public boolean initializeExecution()
initializeExecution
in interface CommandInterface
public void terminateExecution()
terminateExecution
in interface CommandInterface
public long timeNeeded()
timeNeeded
in interface CommandInterface
public boolean execute(java.util.EventObject ev)
execute
in interface FwkCommandInterface
ev
- the event object. (currently not used)public void setText(java.lang.String text)
setText
in interface FwkCommandInterface
text
- The new text of the command.getText()
,
setTextKey(String)
public java.lang.String getText()
getText
in interface FwkCommandInterface
setText(String)
,
getTextKey()
public void setTextKey(java.lang.String textKey)
setTextKey
in interface FwkCommandInterface
textKey
- The new text key of the command.getTextKey()
,
getText()
public java.lang.String getTextKey()
getTextKey
in interface FwkCommandInterface
setTextKey(String)
,
getText()
public void setCommandName(java.lang.String commandName)
setCommandName
in interface FwkCommandInterface
commandName
- 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 FwkCommandInterface
mnemonic
- The new mnemonic of the command.getMnemonic()
public java.lang.Object getProperty(java.lang.String key)
getProperty
in interface FwkCommandInterface
getProperty
in interface FwkItemInterface
getProperty
in interface javax.infobus.DataItem
getProperty
in class FwkItem
key
- The property keyword.public java.util.Iterator getProperties()
getProperties
in interface FwkCommandInterface
public int getMnemonic()
getMnemonic
in interface FwkCommandInterface
public void setHelpID(java.lang.String helpID)
setHelpID
in interface FwkCommandInterface
helpID
- The new helpID of the command.getHelpID()
public java.lang.String getHelpID()
getHelpID
in interface FwkCommandInterface
setHelpID(String)
public void setIconKey(java.lang.String iconKey)
setIconKey
in interface FwkCommandInterface
setIconKey
in interface FwkDescriptionInterface
setIconKey
in class FwkPersistence
iconKey
- The new property keyword of the icon.getIconKey()
public java.lang.String getIconKey()
getIconKey
in interface FwkCommandInterface
getIconKey
in interface FwkDescriptionInterface
getIconKey
in class FwkPersistence
setIconKey(String)
public void setIcon(FwkIconInterface icon)
setIcon
in interface FwkCommandInterface
setIcon
in interface FwkDescriptionInterface
setIcon
in class FwkPersistence
icon
- The new icon of the command.#getIconImage()
,
#setIconURL(String)
public FwkIconInterface getIcon()
getIcon
in interface FwkCommandInterface
getIcon
in interface FwkDescriptionInterface
getIcon
in class FwkPersistence
#setIconImage(Image)
,
#getIconURL()
public void setMenuEventEnabled(boolean flag)
setMenuEventEnabled
in interface FwkCommandInterface
flag
- if true the menu events are enabled.public boolean getMenuEventEnabled()
getMenuEventEnabled
in interface FwkCommandInterface
public boolean menuSelect(javax.swing.event.MenuEvent event, int reason)
menuSelect
in interface FwkCommandInterface
event
- The menueventreason
- The reson. Use predefined constants above.public void setProperty(java.lang.String key, java.lang.Object value)
setProperty
in interface FwkCommandInterface
setProperty
in interface FwkItemInterface
setProperty
in class FwkItem
key
- The property keyword.value
- The property value.public void setToolTipText(java.lang.String toolTipText)
setToolTipText
in interface FwkCommandInterface
toolTipText
- The new tooltip text of the command.getToolTipText()
,
getToolTipKey()
public java.lang.String getToolTipText()
getToolTipText
in interface FwkCommandInterface
setToolTipText(String)
,
getToolTipKey()
public void setToolTipKey(java.lang.String toolTipKey)
setToolTipKey
in interface FwkCommandInterface
toolTipKey
- The new tooltip key of the command.getToolTipKey()
,
getToolTipText()
public java.lang.String getToolTipKey()
getToolTipKey
in interface FwkCommandInterface
setToolTipKey(String)
,
getToolTipText()
public boolean getVisibility()
getVisibility
in interface FwkCommandInterface
setVisibility(boolean)
public void setVisibility(boolean flag)
setVisibility
in interface FwkCommandInterface
flag
- true if visible.getVisibility()
public boolean getSensitivity()
getSensitivity
in interface FwkCommandInterface
setSensitivity(boolean)
public void setSensitivity(boolean flag)
setSensitivity
in interface FwkCommandInterface
flag
- true if sensitive.getSensitivity()
public boolean getSeparator()
getSeparator
in interface FwkCommandInterface
setSeparator(boolean)
public void setSeparator(boolean flag)
setSeparator
in interface FwkCommandInterface
flag
- true if separator.getSeparator()
public boolean getToggle()
getToggle
in interface FwkCommandInterface
setToggle(boolean)
public void setToggle(boolean flag)
setToggle
in interface FwkCommandInterface
flag
- true if command is a toggle.getToggle()
public boolean getToggleState()
getToggleState
in interface FwkCommandInterface
setToggleState(boolean)
public void setToggleState(boolean flag)
setToggleState
in interface FwkCommandInterface
flag
- true if command is a toggle.getToggle()
public boolean getRadioGroupState()
getRadioGroupState
in interface FwkCommandInterface
setRadioGroupState(boolean)
public void setRadioGroupState(boolean flag)
setRadioGroupState
in interface FwkCommandInterface
flag
- true if command is a toggle.getRadioGroupState()
public void setToolBarEnabled(boolean flag)
setToolBarEnabled
in interface FwkCommandInterface
flag
- true If the command should be enabled for the toolbar.public boolean getToolBarEnabled()
getToolBarEnabled
in interface FwkCommandInterface
public void setAsParent()
setAsParent
in interface FwkCommandInterface
public boolean isParent()
isParent
in interface FwkCommandInterface
public boolean hasActionListeners()
hasActionListeners
in interface FwkCommandInterface
public boolean hasMenuListeners()
hasMenuListeners
in interface FwkCommandInterface
public void register(java.lang.Object obj)
register
in interface FwkCommandInterface
obj
- The object to be stored.public void unregister(java.lang.Object obj)
unregister
in interface FwkCommandInterface
obj
- The object to be unregistered,public int registrySize()
registrySize
in interface FwkCommandInterface
public java.util.Enumeration registeredObjects()
registeredObjects
in interface FwkCommandInterface
public FwkArrayInterface getActionListenerArray()
getActionListenerArray
in interface FwkCommandInterface
public FwkArrayInterface getMenuListenerArray()
getMenuListenerArray
in interface FwkCommandInterface
public void addActionListener(java.awt.event.ActionListener actionListener)
addActionListener
in interface FwkCommandInterface
actionListener
- The action listener to be added.public void addMenuListener(javax.swing.event.MenuListener menuListener)
addMenuListener
in interface FwkCommandInterface
menuListener
- The menu listener to be added.public void removeActionListener(java.awt.event.ActionListener actionListener)
removeActionListener
in interface FwkCommandInterface
actionListener
- The action listener to be removed.public void removeMenuListener(javax.swing.event.MenuListener menuListener)
removeMenuListener
in interface FwkCommandInterface
menuListener
- The menu listener to be removed.public void setButtonClass(java.lang.Class clazz)
setButtonClass
in interface FwkCommandInterface
clazz
- the button class to be used when creating a button out of the command.public java.lang.Class getButtonClass()
getButtonClass
in interface FwkCommandInterface
public void setMenuItemClass(java.lang.Class clazz)
setMenuItemClass
in interface FwkCommandInterface
clazz
- the menu item class to be used when creating a menu item out of the command.public java.lang.Class getMenuItemClass()
getMenuItemClass
in interface FwkCommandInterface
public OdsxResultSetInterface getResult()
getResult
in interface CommandInterface