Class CALSAndHTMLShowTablePropertiesBase
java.lang.Object
ro.sync.ecss.extensions.commons.table.properties.ShowTablePropertiesBaseOperation
ro.sync.ecss.extensions.commons.table.properties.CALSAndHTMLShowTablePropertiesBase
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
CALSShowTableProperties
,DocbookHTMLShowTablePropertiesOperationBase
@API(type=INTERNAL,
src=PUBLIC)
public abstract class CALSAndHTMLShowTablePropertiesBase
extends ShowTablePropertiesBaseOperation
Base class for edit properties on CALS and HTML tables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]
Array with common possible values for horizontal alignmentstatic final String[]
Array with common possible values for vertical alignmentFields inherited from class ro.sync.ecss.extensions.commons.table.properties.ShowTablePropertiesBaseOperation
authorAccess, tableHelper
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
computeFragmentMoveInsideHeader
(List<AuthorDocumentFragment> fragments, List<Position> offsets, TabInfo tabInfo, List<AuthorElement> nodesToModify, AuthorElement currentNode) Computes the fragment and position, inside header element, for the given node.protected boolean
computeFragmentsToMoveInsideBody
(List<AuthorDocumentFragment> fragments, List<Position> offsets, TabInfo tabInfo, List<AuthorElement> nodesToModify, AuthorElement currentNode) Computes the fragment and position, inside body element, for the given node.protected boolean
computeFragmentsToMoveInsideFooter
(List<AuthorDocumentFragment> fragments, List<Position> offsets, TabInfo tabInfo, List<AuthorElement> nodesToModify, AuthorElement currentNode) Computes the fragment and position, inside footer element, for the given node.getCategoriesAndProperties
(List<Integer[]> selections) Obtain the categories from the table properties dialog.protected abstract Map<AuthorElement,
Set<Integer>> getCellIndexes
(List<AuthorElement> cells) Obtain the indexes for selected cells.protected List<TableProperty>
Obtain the value for the given attribute set on the given element.protected abstract List<AuthorElement>
getColSpecs
(Map<AuthorElement, Set<Integer>> map) Obtain the colspecs elements for the given cells indexes.protected List<TableProperty>
Obtain the value for the given attribute set on the given element.protected List<TableProperty>
Obtain the attributes qualified name and render string (for rows).protected void
processFragment
(AuthorElement currentNode, List<AuthorDocumentFragment> fragments, boolean moveToHeader) Process the fragments and add them to the fragments to insert.Methods inherited from class ro.sync.ecss.extensions.commons.table.properties.ShowTablePropertiesBaseOperation
checkRowSpans, doOperation, getArguments, getAttrProperty, getCommonValue, getDescription, getElementsWithModifiedAttributes, getFragmentsAndOffsetsToInsert, getHelpPageID, getSelectedTab, getTableAttribute, getTableInformation, showTableProperties
-
Field Details
-
HORIZONTAL_ALIGN_VALUES
Array with common possible values for horizontal alignment -
VERTICAL_ALIGN_VALUES
Array with common possible values for vertical alignment
-
-
Constructor Details
-
CALSAndHTMLShowTablePropertiesBase
Constructor.- Parameters:
helper
- The table helper.
-
-
Method Details
-
getCategoriesAndProperties
Description copied from class:ShowTablePropertiesBaseOperation
Obtain the categories from the table properties dialog. The categories maps the tab name to the list of properties that will be modified in the corresponding tab panel. Every property will be modified using a combobox/radios which will contain the possible values for that property. The label string for the combobox/radios group will be the provided render string of the property or the property name, if a render string is not provided.- Specified by:
getCategoriesAndProperties
in classShowTablePropertiesBaseOperation
- Parameters:
selections
- The currently selected nodes or the node at caret position.- Returns:
- A list of tab info objects containing the tab names and the corresponding properties list.
- See Also:
-
getCellsAttributes
Obtain the value for the given attribute set on the given element.- Returns:
- A list with allowed attributes.
-
computeFragmentMoveInsideHeader
protected boolean computeFragmentMoveInsideHeader(List<AuthorDocumentFragment> fragments, List<Position> offsets, TabInfo tabInfo, List<AuthorElement> nodesToModify, AuthorElement currentNode) throws AuthorOperationException Description copied from class:ShowTablePropertiesBaseOperation
Computes the fragment and position, inside header element, for the given node.- Specified by:
computeFragmentMoveInsideHeader
in classShowTablePropertiesBaseOperation
- Parameters:
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.- Returns:
true
if the parent of the given node parent should be also deleted.- Throws:
AuthorOperationException
- If the new parent fragment could not be inserted.
-
computeFragmentsToMoveInsideBody
protected boolean computeFragmentsToMoveInsideBody(List<AuthorDocumentFragment> fragments, List<Position> offsets, TabInfo tabInfo, List<AuthorElement> nodesToModify, AuthorElement currentNode) throws AuthorOperationException Description copied from class:ShowTablePropertiesBaseOperation
Computes the fragment and position, inside body element, for the given node.- Specified by:
computeFragmentsToMoveInsideBody
in classShowTablePropertiesBaseOperation
- Parameters:
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.- Returns:
true
if the parent of the given node parent should be also deleted.- Throws:
AuthorOperationException
- If the new parent fragment could not be inserted.- See Also:
-
processFragment
protected void processFragment(AuthorElement currentNode, List<AuthorDocumentFragment> fragments, boolean moveToHeader) throws BadLocationException Process the fragments and add them to the fragments to insert.- Parameters:
currentNode
- The current row node.fragments
- The list with fragment which will be inserted.moveToHeader
-true
if the current node is moved from body/footer to header.- Throws:
BadLocationException
-
getRowsAttributesToEdit
Obtain the attributes qualified name and render string (for rows).- Returns:
- A list with attributes to edit.
-
getColumnsAttributes
Obtain the value for the given attribute set on the given element.- Returns:
- A list with allowed attributes.
-
getColSpecs
Obtain the colspecs elements for the given cells indexes.- Parameters:
map
- A map containing the table elements and cells indexes.- Returns:
- A list with the colspecs elements for the given cells indexes.
-
getCellIndexes
Obtain the indexes for selected cells.- Parameters:
cells
- The selected cells.- Returns:
- A map containing the cell indexes based on the parent tgroup.
-