|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.cis.plugin.command.AbstractCommand
public abstract class AbstractCommand
An abstract class describing a command which may be rendered in a menu or toolbar
Field Summary | |
---|---|
static java.lang.String |
rcs_id
|
Constructor Summary | |
---|---|
AbstractCommand()
|
Method Summary | |
---|---|
void |
execute()
Execute command |
abstract void |
execute(CommandContext commandContext)
Execute command for given CommandContext |
void |
executeWrapped(CommandContext commandContext)
Execute command for given ActionContext. |
abstract int |
getCategory()
The value returned by this command may be used for command ordering and grouping (for example in a context menu) |
static java.util.Comparator |
getComparator()
Comparator on basis respective command category |
java.lang.String |
getId()
|
abstract java.lang.String |
getImageURL()
Get URL of icon to be used for rendering of command. |
java.util.Locale |
getLocale()
Obtain Locale for this command |
abstract java.lang.String |
getName()
Get localized name of command - may be used e.g. |
boolean |
getSelectable()
Get command selectable |
java.util.List |
getSubCommands()
Example - if a command displayed in a context menu has sub-commands, they will be rendered as sub-context menu |
boolean |
isEnabled()
|
boolean |
isEnabled(CommandContext context)
Is this command enabled? |
boolean |
isSameGroup(Command other)
Check whether this command belongs to same group as other |
boolean |
isToBeVisualized(CommandContext context)
Deprecated. isVisible() |
boolean |
isVisible()
|
void |
setEnabled(boolean enabled)
Set command enabled |
void |
setLocale(java.util.Locale lc)
Set Locale for this command |
void |
setSelectable(boolean value)
Set command selectable |
void |
setVisible(boolean visible)
Set whether this command is to be visualized |
java.lang.String |
toString()
Obtain string representation of command for debugging |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String rcs_id
Constructor Detail |
---|
public AbstractCommand()
Method Detail |
---|
public abstract java.lang.String getName()
Command
getName
in interface Command
public abstract java.lang.String getImageURL()
Command
getImageURL
in interface Command
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getId()
getId
in interface com.softwareag.cis.plugin.interfaces.Component
Component.getId()
public abstract int getCategory()
getCategory
in interface Command
public boolean isSameGroup(Command other)
isSameGroup
in interface Command
other
-
public static java.util.Comparator getComparator()
public java.util.List getSubCommands()
getSubCommands
in interface Command
public void setLocale(java.util.Locale lc)
setLocale
in interface Command
lc
- public java.util.Locale getLocale()
getLocale
in interface Command
public boolean isEnabled(CommandContext context)
isEnabled
in interface Command
context
-
public void setEnabled(boolean enabled)
setEnabled
in interface com.softwareag.cis.plugin.interfaces.Component
enabled
- public boolean isEnabled()
isEnabled
in interface com.softwareag.cis.plugin.interfaces.Component
Component.isEnabled()
public void setSelectable(boolean value)
public boolean getSelectable()
public boolean isToBeVisualized(CommandContext context)
isVisible()
isToBeVisualized
in interface Command
context
-
public boolean isVisible()
isVisible
in interface com.softwareag.cis.plugin.interfaces.Component
Component.isVisible()
public void setVisible(boolean visible)
setVisible
in interface com.softwareag.cis.plugin.interfaces.Component
visible
- true if to be visualized, otherwise falsepublic void execute()
public abstract void execute(CommandContext commandContext)
execute
in interface Command
commandContext
- the CommandContextpublic final void executeWrapped(CommandContext commandContext)
executeWrapped
in interface Command
commandContext
- the CommandContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |