|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swing.commands.AbstractCommand dsto.dfc.swing.commands.AbstractMutableCommand dsto.dfc.swing.dnd.AbstractCnpCommand
public abstract class AbstractCnpCommand
Abstract base class for clipboard based commands operating on a CnpProvider.
Field Summary | |
---|---|
protected CnpProvider |
source
|
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
listeners |
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
displayName, icon |
Fields inherited from interface dsto.dfc.swing.icons.Iconic |
---|
NULL_ICON |
Constructor Summary | |
---|---|
AbstractCnpCommand(CnpProvider source,
String property)
Create a new instance. |
Method Summary | |
---|---|
abstract void |
execute()
Execute the command. |
abstract String |
getDescription()
A short description of the command, suitable for a tooltip or use in a status panel. |
String |
getGroupInView(String viewName)
Get the preferred group that this command should appear in for a given view. |
abstract char |
getMnemonic()
Get a character shortcut for the command (eg for use on a menu). |
abstract String |
getName()
The formal identifying name for this command (eg edit.Copy, file.Open). |
boolean |
isInteractive()
True if this command will interact with the user when execute() is called. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
|
void |
propertyChange(PropertyChangeEvent e)
|
protected void |
updateEnabled()
Update enabled status of command based on current value of the selected cnp* property. |
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon |
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
actionPerformed, canReplace, getAccelerator, getDefaultDisplayName, getDisplayName, getIcon, getLargeIcon, getLogString, setDisplayName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CnpProvider source
Constructor Detail |
---|
public AbstractCnpCommand(CnpProvider source, String property)
source
- The CnpProvider being operated on.property
- The (boolean) property of the CnpProvider that
indicates whether this command is active or not (usually one of
the 'cnp*' properties).Method Detail |
---|
public abstract void execute()
Command
execute
in interface Command
execute
in class AbstractCommand
public abstract String getName()
Command
getName
in interface Command
getName
in interface Iconic
getName
in class AbstractCommand
public abstract String getDescription()
Command
getDescription
in interface Command
getDescription
in class AbstractCommand
public abstract char getMnemonic()
Command
getMnemonic
in interface Command
getMnemonic
in class AbstractCommand
public String getGroupInView(String viewName)
Command
If the command changes its group in any view it should generate a groupInView property change event with the old value set to the old group and the new value set to the new group.
getGroupInView
in interface Command
getGroupInView
in class AbstractCommand
viewName
- The name of the view.
public boolean isInteractive()
Command
isInteractive
in interface Command
isInteractive
in class AbstractCommand
protected void updateEnabled()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void lostOwnership(Clipboard clipboard, Transferable contents)
lostOwnership
in interface ClipboardOwner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |