|
|
Package com.dassault_systemes.catweb.base.catlet.command |
Class Command
|
Class Hierarchy |
java.lang.Object | +-com.dassault_systemes.catweb.base.catlet.command.Command
Class Location |
Class Description |
public abstract class Command
Abstract class for command object activation can be done interactively (from a commandselector) or non-interactively (from an external event)
All Implemented Interfaces: Controller
Field Summary |
int | EXCLUSIVE_MODE |
int | SHARED_MODE |
int | STARTED |
int | STOPPED |
int | SUSPENDED |
int | RESUMED |
int | currentState |
ViewInterface[] | views |
Model[] | models |
Model | temporaryModel |
String | masterCATletName |
String | startingLabel |
int | activationMode |
PropertyChangeSupport | support |
Constructor Summary |
Command() |
Method Summary |
void | initialize() |
void | doCleanup() |
void | setMasterCATlet(ICATlet catlet) |
ICATlet | getMasterCATlet() |
void | setMasterViewer(ViewInterface viewer) |
ViewInterface | getMasterViewer() |
void | initBean() |
void | doStart() |
void | doStop() |
void | doSuspend() |
void | doResume() |
void | suspend() |
void | resume() |
void | start() |
void | stop() |
void | setModel(Model mdl) |
void | setView(ViewInterface view) |
void | runCommand() |
void | addCommandListener(CommandListener list) |
void | removeCommandListener(CommandListener list) |
void | fireCommandEvent(CommandEvent evt) |
void | addPropertyChangeListener(PropertyChangeListener l) |
void | removePropertyChangeListener(PropertyChangeListener l) |
void | firePropertyChangeEvent(PropertyChangeEvent evt) |
void | setMasterCATletName(String name) |
String | getMasterCATletName() |
String | getStartingLabel() |
void | setStartingLabel(String startingLabel) |
boolean | isValid() |
String | getName() |
int | getActivationMode() |
void | setActivationMode(int mode) |
boolean | isDeletable() |
BeanInfo | getCommandBeanInfo() |
int | getHelpID() |
Field Detail |
int EXCLUSIVE_MODEthese fields define the activation mode of the command
int SHARED_MODE
int STARTEDthese fields define the state of the command
int STOPPED
int SUSPENDED
int RESUMED
int currentStateContains the current state of the command
ViewInterface[] viewsViews for this command
Model[] modelsModels for this command
Model temporaryModel
String masterCATletNameName of the CATlet to which the command is attached
String startingLabela label that can be displayed in a status bar when the command is started
int activationModeThe command mode of activation (shared or exclusive)
PropertyChangeSupport supportA usefull support for propertyChangeEvent management
Constructor Detail |
Command()Default constructor
Method Detail |
void initialize()Initializes the Command. It is a special state between constructed and started. Must be implemented by the user If the command need to subscribe to the Hookup, it is recommanded to do it here.
void doCleanup()Do inner cleanup then call the regular @see #cleanup() method - (final implementation)
void setMasterCATlet(ICATlet catlet)Sets the CATlet to which this command is associated
catlet
ICATlet getMasterCATlet()Returns the CATlet to which this command is associated
void setMasterViewer(ViewInterface viewer)Sets the Viewer to which this command is associated A command has a master viewer only if it comes from a viewer workshop
viewer
ViewInterface getMasterViewer()Returns the Viewer to which this command is associated A command has a master viewer only if it comes from a viewer workshop
void initBean()initilializes the command's bean properties
void doStart()Shouldn't be called. Use @see #start() method instead. Only called by the Command Selector
void doStop()Shouldn't be called. Use @see #stop() method instead Only called by the Command Selector
void doSuspend()Shouldn't be called. Use @see #suspend() method instead Only called by the Command Selector
void doResume()Shouldn't be called. Use @see #resume() method instead Only called by the Command Selector
void suspend()Suspends the command
void resume()Resumes the command
void start()Starts the command
void stop()Stops the command
void setModel(Model mdl)Sets the Command model. May a model of the MasterCATlet Used by Portal and not by Enovia
void setView(ViewInterface view)Sets the Command model. May a view of the MasterCATlet Used by Portal and not by Enovia
void runCommand()method called to instantiate interactively the command Used by Portal and not by Enovia
void addCommandListener(CommandListener list)Adds the specified listener to receive command events from this command.
list
void removeCommandListener(CommandListener list)Removes the specified listener so that it no longer receives command events from this command.
list
void fireCommandEvent(CommandEvent evt)Fires an event to warn that a command has been selected or unselected
evt
void addPropertyChangeListener(PropertyChangeListener l)Adds the specified listener to receive property change events from this command.
l
void removePropertyChangeListener(PropertyChangeListener l)Removes the specified listener so that it no longer receives property change events from this command.
l
void firePropertyChangeEvent(PropertyChangeEvent evt)Fires the specified property change event.
evt
void setMasterCATletName(String name)Sets the name of the CATlet to which this command is associated
name
String getMasterCATletName()Returns the name of the CATlet to which this command is associated
String getStartingLabel()Returns the label that will be printed in the status bar when command starts.
void setStartingLabel(String startingLabel)Sets the label that will be printed in the status bar when command starts.
startingLabel
boolean isValid()Returns the command validity. Default implementation returns always true.
String getName()Returns the name of this command as defined inside its beaninfo
int getActivationMode()Returns the activation mode of this CATlet
void setActivationMode(int mode)Sets the activation mode of this CATlet
mode
boolean isDeletable()Returns if the command is deletable or not. By default, a command is created when started and destroyed when stopped. If you don't want your command to be deleted when stopped, overload this method to make it return false.
BeanInfo getCommandBeanInfo()Returns the BeanInfo of this command
int getHelpID()Returns an id to retreive the help for this command By default, this method returns -1