public final class CommandEntry extends PropertySet
Modifier and Type | Field and Description |
---|---|
Command |
command
The command name;
null if the command has been specified
by its instance. |
String |
commandName
The command;
null if the command has been specified
by its name. |
String |
description
Text describing this entry; may be
null . |
static CommandEntry[] |
EMPTY_LIST
A ready-to-use empty array of command entries.
|
String |
parameter
The command parameter; may be
null . |
properties
Constructor and Description |
---|
CommandEntry(Command command,
String parameter,
String description)
Constructs a command/parameter pair.
|
CommandEntry(String commandName,
String parameter,
String description)
Constructs a command/parameter pair.
|
Modifier and Type | Method and Description |
---|---|
CommandEntry |
copy()
Makes a deep copy of this command entry.
|
boolean |
equals(Object other) |
Command |
getCommand(CommandRegistry registry)
Convenience method invoking
CommandRegistry.getCommand(java.lang.String) . |
String |
getCommandLabel(CommandRegistry registry)
Convenience method invoking
CommandRegistry.getLabel(com.xmlmind.xmledit.control.Command) . |
String |
getCommandName(CommandRegistry registry)
Convenience method invoking
CommandRegistry.getName(com.xmlmind.xmledit.control.Command) . |
String |
toString() |
String |
toString(CommandRegistry registry) |
getProperties, getProperty, getPropertyCount, hasProperty, putProperties, putProperty, removeAllProperties, removeProperty
public final String commandName
null
if the command has been specified
by its name.
One of commandName
and command
is not null.
The other field is null.
public final Command command
null
if the command has been specified
by its instance.
One of commandName
and command
is not null.
The other field is null.
public final String parameter
null
.public final String description
null
.public static final CommandEntry[] EMPTY_LIST
public CommandEntry(String commandName, String parameter, String description)
commandName
- the command nameparameter
- the command parameter; may be null
description
- a description; may be null
public CommandEntry copy()
null
if how to copy the referenced
command cannot be determinedpublic Command getCommand(CommandRegistry registry)
CommandRegistry.getCommand(java.lang.String)
.public String getCommandName(CommandRegistry registry)
CommandRegistry.getName(com.xmlmind.xmledit.control.Command)
.public String getCommandLabel(CommandRegistry registry)
CommandRegistry.getLabel(com.xmlmind.xmledit.control.Command)
.public String toString(CommandRegistry registry)