public class GenericTableEdit extends TableEditCommand
GenericTableEditor
, from its factory, a GenericTableEditorFactory
.
This table editing command, after properly parametrizing it, may be used to edit HTML-like tables (contains rows, themselves possibly contained in row groups, etc).
The parametrization of this command is specified using a GenericTableSpec
.
TableEditCommand.DictionaryComparator, TableEditCommand.NumericComparator, TableEditCommand.Op, TableEditCommand.SortOptions, TableEditCommand.SortOrder
Modifier and Type | Field and Description |
---|---|
protected boolean |
initialized |
protected String[] |
parseError |
lastSelectedSortOptions, op, pastable, selectedElement, sortOptions, tableEditor, tableEditorFactory
recordable, repeatable
Constructor and Description |
---|
GenericTableEdit()
Constructs a parametrizable table editing command using the
TableEditorFactory returned by createTableEditorFactory(com.xmlmind.xmleditapp.cmd.table.GenericTableSpec) . |
Modifier and Type | Method and Description |
---|---|
protected TableEditorFactory |
createTableEditorFactory(GenericTableSpec tableSpec)
Creates and returns a
GenericTableEditorFactory . |
boolean |
prepare(DocumentView docView,
String parameter,
int x,
int y)
Tests whether this command can be executed with specified parameter
and in specified context.
|
createComparator, doExecute, lookupLanguage, selectSortOptions
doExecuteByName, execute, executeCommand, isRecordable, isRepeatable, prepareCommand
protected boolean initialized
protected String[] parseError
public GenericTableEdit()
TableEditorFactory
returned by createTableEditorFactory(com.xmlmind.xmleditapp.cmd.table.GenericTableSpec)
.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 TableEditCommand
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 inputprotected TableEditorFactory createTableEditorFactory(GenericTableSpec tableSpec)
GenericTableEditorFactory
.