@API(type=INTERNAL, src=PUBLIC) public abstract class ShowTablePropertiesBaseOperation extends java.lang.Object implements AuthorOperation
Modifier and Type | Field and Description |
---|---|
protected AuthorAccess |
authorAccess
The current author access.
|
protected TablePropertiesHelper |
tableHelper
The table properties helper.
|
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
Constructor and Description |
---|
ShowTablePropertiesBaseOperation(TablePropertiesHelper tableHelper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkRowSpans(java.util.List<AuthorElement> collectedRows,
int parentType)
Check if the selected rows can be moved (row spans don't exceed collected rows range).
|
protected abstract boolean |
computeFragmentMoveInsideHeader(java.util.List<AuthorDocumentFragment> fragments,
java.util.List<javax.swing.text.Position> offsets,
TabInfo tabInfo,
java.util.List<AuthorElement> nodesToModify,
AuthorElement currentNode)
Computes the fragment and position, inside header element, for the given node.
|
protected abstract boolean |
computeFragmentsToMoveInsideBody(java.util.List<AuthorDocumentFragment> fragments,
java.util.List<javax.swing.text.Position> offsets,
TabInfo tabInfo,
java.util.List<AuthorElement> nodesToModify,
AuthorElement currentNode)
Computes the fragment and position, inside body element, for the given node.
|
protected abstract boolean |
computeFragmentsToMoveInsideFooter(java.util.List<AuthorDocumentFragment> fragments,
java.util.List<javax.swing.text.Position> offsets,
TabInfo tabInfo,
java.util.List<AuthorElement> nodesToModify,
AuthorElement currentNode)
Computes the fragment and position, inside footer element, for the given node.
|
void |
doOperation(AuthorAccess authorAccess,
ArgumentsMap args)
Perform the actual operation.
|
ArgumentDescriptor[] |
getArguments() |
protected TableProperty |
getAttrProperty(java.util.List<AuthorElement> collectedElements,
java.lang.String detectedAttributeValue,
TableProperty currentAttribute)
Obtain the table property object for the given attribute.
|
protected abstract java.util.List<TabInfo> |
getCategoriesAndProperties(java.util.List<java.lang.Integer[]> selections)
Obtain the categories from the table properties dialog.
|
protected java.lang.String |
getCommonValue(AuthorElement currentElem,
java.lang.String attrQname,
java.lang.String currentValue)
Obtain the common value for the given attribute set on the given element.
|
java.lang.String |
getDescription() |
protected java.util.List<TabInfo> |
getElementsWithModifiedAttributes(EditedTablePropertiesInfo tableInfo)
Obtain all the elements with all the modified attributes.
|
protected java.util.List<TabInfo> |
getFragmentsAndOffsetsToInsert(EditedTablePropertiesInfo tableInfo,
java.util.List<AuthorElement> nodes)
Obtain a map with all the fragments which will be modified and the
corresponding offsets (the offsets where the fragments will be inserted).
|
protected java.lang.String |
getHelpPageID()
Get the ID of the help page which will be called by the end user.
|
protected EditedTablePropertiesInfo.TAB_TYPE |
getSelectedTab(java.util.List<java.lang.Integer[]> selections)
Obtain the tab that will be selected in the "Table Properties" dialog.
|
protected abstract java.util.List<TableProperty> |
getTableAttribute()
Obtain the table attributes.
|
protected TabInfo |
getTableInformation(java.util.List<java.lang.Integer[]> selections)
Obtain the information for table tab.
|
void |
showTableProperties()
Shows the table properties and process all the modifications.
|
protected TablePropertiesHelper tableHelper
protected AuthorAccess authorAccess
public ShowTablePropertiesBaseOperation(TablePropertiesHelper tableHelper)
tableHelper
- The table properties helper.public void doOperation(AuthorAccess authorAccess, ArgumentsMap args) throws java.lang.IllegalArgumentException, AuthorOperationException
AuthorOperation
Workspace.getPlatform()
.
To get to the Workspace
you may use: AuthorAccess.getWorkspaceAccess()
.doOperation
in interface AuthorOperation
authorAccess
- The author access.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utility a.s.o.args
- The map of arguments. All the arguments defined by method
AuthorOperation.getArguments()
must be present in the map of arguments.java.lang.IllegalArgumentException
- Thrown when one or more arguments are illegal.AuthorOperationException
- Thrown when the operation fails.AuthorOperation.doOperation(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap)
public ArgumentDescriptor[] getArguments()
getArguments
in interface AuthorOperation
ArgumentDescriptor
representing
the arguments this operation uses.AuthorOperation.getArguments()
public void showTableProperties() throws AuthorOperationException
AuthorOperationException
- When the action cannot be performed.protected java.util.List<TabInfo> getElementsWithModifiedAttributes(EditedTablePropertiesInfo tableInfo)
tableInfo
- The obtained table information from the table properties dialog.protected boolean checkRowSpans(java.util.List<AuthorElement> collectedRows, int parentType)
collectedRows
- The rows to be checked.parentType
- The type of the parent element.true
if the rows can be moved.public java.lang.String getDescription()
getDescription
in interface Extension
Extension.getDescription()
protected java.util.List<TabInfo> getFragmentsAndOffsetsToInsert(EditedTablePropertiesInfo tableInfo, java.util.List<AuthorElement> nodes) throws AuthorOperationException
tableInfo
- The obtained table information from the table properties dialog.nodes
- The selected nodes.AuthorOperationException
protected TabInfo getTableInformation(java.util.List<java.lang.Integer[]> selections)
selections
- The list with the selection intervals.null
is there are no properties to edit for table.protected TableProperty getAttrProperty(java.util.List<AuthorElement> collectedElements, java.lang.String detectedAttributeValue, TableProperty currentAttribute)
collectedElements
- The list of all rows which will be edited.detectedAttributeValue
- Current value of the attribute. It is the value set on the element(s).currentAttribute
- The current attribute.TableProperty
object for the given attribute.protected java.lang.String getCommonValue(AuthorElement currentElem, java.lang.String attrQname, java.lang.String currentValue)
currentElem
- The element to check for given attribute.attrQname
- The attribute qualified name.currentValue
- The currently computed common value for the given attribute.protected EditedTablePropertiesInfo.TAB_TYPE getSelectedTab(java.util.List<java.lang.Integer[]> selections)
selections
- The currently selected nodes or the node at caret position.protected abstract java.util.List<TabInfo> getCategoriesAndProperties(java.util.List<java.lang.Integer[]> selections)
selections
- The currently selected nodes or the node at caret position.protected abstract java.util.List<TableProperty> getTableAttribute()
TableProperty
objects containing the table attributes
qualified name, render string and possible values.protected abstract boolean computeFragmentsToMoveInsideFooter(java.util.List<AuthorDocumentFragment> fragments, java.util.List<javax.swing.text.Position> offsets, TabInfo tabInfo, java.util.List<AuthorElement> nodesToModify, AuthorElement currentNode) throws AuthorOperationException
fragments
- A list with already computed fragments. The new fragment
will be added to this list.offsets
- A list with positions where the given fragments will be inserted.tabInfo
- The current edited tab info.nodesToModify
- A list containing all the nodes that will be deleted.currentNode
- The node to be checked if it should be moved.true
if the parent of the given node parent should be also deleted.AuthorOperationException
- If the new parent fragment could not be inserted.protected abstract boolean computeFragmentMoveInsideHeader(java.util.List<AuthorDocumentFragment> fragments, java.util.List<javax.swing.text.Position> offsets, TabInfo tabInfo, java.util.List<AuthorElement> nodesToModify, AuthorElement currentNode) throws AuthorOperationException
fragments
- A list with already computed fragments. The new fragment
will be added to this list.offsets
- A list with positions where the given fragments will be inserted.tabInfo
- The current edited tab info.nodesToModify
- A list containing all the nodes that will be deleted.currentNode
- The node to be checked if it should be moved.true
if the parent of the given node parent should be also deleted.AuthorOperationException
- If the new parent fragment could not be inserted.protected abstract boolean computeFragmentsToMoveInsideBody(java.util.List<AuthorDocumentFragment> fragments, java.util.List<javax.swing.text.Position> offsets, TabInfo tabInfo, java.util.List<AuthorElement> nodesToModify, AuthorElement currentNode) throws AuthorOperationException
fragments
- A list with already computed fragments. The new fragment
will be added to this list.offsets
- A list with positions where the given fragments will be inserted.tabInfo
- The current edited tab info.nodesToModify
- A list containing all the nodes that will be deleted.currentNode
- The node to be checked if it should be moved.true
if the parent of the given node parent should be also deleted.AuthorOperationException
- If the new parent fragment could not be inserted.protected java.lang.String getHelpPageID()
null
.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.