public final class EditOrAddRelationship extends CommandBase
asm.editOrAddRelationship
.Modifier and Type | Field and Description |
---|---|
static Name |
ASSEMBLY_ELEM |
static Name |
ASSOCIATION_ELEM |
static Name |
CONTENTONLY_ATTR |
static Name |
DEFAULTFORMAT_ATTR |
static PrefixEntry[] |
DOCBOOK_PREFIXES |
static Name |
GRAMMAR_ATTR |
static Name |
HREF_ATTR |
static Name |
INDEXTERM_ELEM |
static Name |
INSTANCE_ELEM |
static Name |
LINKEND_ATTR |
static Name |
LINKING_ATTR |
static Name |
MODULE_ELEM |
static Name |
OMITTITLES_ATTR |
static Name |
OUTPUTFORMAT_ATTR |
static Name |
RELATIONSHIP_ELEM |
static Name |
RELATIONSHIPS_ELEM |
static Name |
RENDERAS_ATTR |
static Name |
RESOURCE_ELEM |
static Name |
RESOURCEREF_ATTR |
static Name |
RESOURCES_ELEM |
static Name |
STRUCTURE_ELEM |
static Name |
TITLE_ELEM |
static Name |
TRANSFORMS_ELEM |
static Name |
TYPE_ATTR |
recordable, repeatable
Constructor and Description |
---|
EditOrAddRelationship() |
Modifier and Type | Method and Description |
---|---|
CommandResult |
doExecute(DocumentView docView,
String parameter,
int x,
int y)
Actually executes this command with specified parameter and in
specified context.
|
boolean |
prepare(DocumentView docView,
String parameter,
int x,
int y)
Tests whether this command can be executed with specified parameter
and in specified context.
|
doExecuteByName, execute, executeCommand, isRecordable, isRepeatable, prepareCommand
public static final Name ASSEMBLY_ELEM
public static final Name MODULE_ELEM
public static final Name RESOURCE_ELEM
public static final Name RESOURCES_ELEM
public static final Name STRUCTURE_ELEM
public static final Name TITLE_ELEM
public static final Name RELATIONSHIPS_ELEM
public static final Name RELATIONSHIP_ELEM
public static final Name ASSOCIATION_ELEM
public static final Name INSTANCE_ELEM
public static final Name TRANSFORMS_ELEM
public static final Name INDEXTERM_ELEM
public static final Name CONTENTONLY_ATTR
public static final Name DEFAULTFORMAT_ATTR
public static final Name GRAMMAR_ATTR
public static final Name HREF_ATTR
public static final Name OMITTITLES_ATTR
public static final Name OUTPUTFORMAT_ATTR
public static final Name RENDERAS_ATTR
public static final Name RESOURCEREF_ATTR
public static final Name TYPE_ATTR
public static final Name LINKEND_ATTR
public static final Name LINKING_ATTR
public static final PrefixEntry[] DOCBOOK_PREFIXES
public boolean prepare(DocumentView docView, String parameter, int x, int y)
CommandBase
If the command can be executed, this method returns
true
after having configured its internal state for
consumption by method CommandBase.execute(com.xmlmind.xmledit.view.DocumentView, java.lang.String, int, int)
which should be invoked
immediately after this one.
Returns false
if this command cannot be executed with
specified parameter and in specified context.
prepare
in class CommandBase
docView
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to docView of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to docView of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputpublic CommandResult doExecute(DocumentView docView, String parameter, int x, int y)
CommandBase
This method assumes that CommandBase.prepare(com.xmlmind.xmledit.view.DocumentView, java.lang.String, int, int)
has been
successfully invoked immediately before its own invocation.
IMPORTANT: application code which executes a command
must always use CommandBase.execute(com.xmlmind.xmledit.view.DocumentView, java.lang.String, int, int)
or CommandBase.executeCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
to do so,
NOT CommandBase.doExecute(com.xmlmind.xmledit.view.DocumentView, java.lang.String, int, int)
. CommandBase.doExecute(com.xmlmind.xmledit.view.DocumentView, java.lang.String, int, int)
is intended to be used
only by commands which invoke helper "sub-commands".
doExecute
in class CommandBase
docView
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to docView of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to docView of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputnull
.
If the command execution is successful and
the command is repeatable and/or recordable then
CommandResult.details
field of the result is expected
to be one of:
null
Object
String
s