Class JoinOperationBase
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
-
- ro.sync.ecss.extensions.commons.table.operations.JoinOperationBase
-
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
JoinOperation
,JoinOperation
,JoinOperation
@API(type=INTERNAL, src=PUBLIC) public abstract class JoinOperationBase extends AbstractTableOperation
Operation for joining the content of selected cells.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CURSOR_OUTSIDE_THE_TABLE_ERROR_MESSAGE
Cursor outlide the table error messagestatic java.lang.String
RECTANGULAR_SELECTIONS_ERROR_MESSAGE
Rectangular selection error messagestatic java.lang.String
SELECT_AT_LEAST_TWO_ADJACENT_CELLS_ERROR_MESSAGE
Select at least two adjacent cells-
Fields inherited from class ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
CHANGE_TRACKING_BEHAVIOR_ARGUMENT, TABLE_INFO_ARGUMENT_DESCRIPTOR, TABLE_INFO_ARGUMENT_NAME, 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
Constructors Constructor Description JoinOperationBase(AuthorTableHelper tableHelper)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doOperationInternal(AuthorAccess authorAccess, ArgumentsMap args)
Join the contents of selected cells.protected abstract void
generateColumnSpecifications(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement tableElement)
Generates column specifications for the given table and inserts them into the document.ArgumentDescriptor[]
getArguments()
java.lang.String
getDescription()
void
joinCells(AuthorAccess authorAccess, AuthorElement tableElement, java.util.List<AuthorElement> cellElements)
Join table cells.-
Methods inherited from class ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
createEmptyCell, doOperation, findCellInsertionOffset, getElementAncestor, isElement, isTableElement
-
-
-
-
Field Detail
-
CURSOR_OUTSIDE_THE_TABLE_ERROR_MESSAGE
public static final java.lang.String CURSOR_OUTSIDE_THE_TABLE_ERROR_MESSAGE
Cursor outlide the table error message- See Also:
- Constant Field Values
-
SELECT_AT_LEAST_TWO_ADJACENT_CELLS_ERROR_MESSAGE
public static final java.lang.String SELECT_AT_LEAST_TWO_ADJACENT_CELLS_ERROR_MESSAGE
Select at least two adjacent cells- See Also:
- Constant Field Values
-
RECTANGULAR_SELECTIONS_ERROR_MESSAGE
public static final java.lang.String RECTANGULAR_SELECTIONS_ERROR_MESSAGE
Rectangular selection error message- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JoinOperationBase
public JoinOperationBase(AuthorTableHelper tableHelper)
Constructor.- Parameters:
tableHelper
- Table helper with methods specific to a document type.
-
-
Method Detail
-
doOperationInternal
protected void doOperationInternal(AuthorAccess authorAccess, ArgumentsMap args) throws java.lang.IllegalArgumentException, AuthorOperationException
Join the contents of selected cells.- Specified by:
doOperationInternal
in classAbstractTableOperation
- Parameters:
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 methodAuthorOperation.getArguments()
must be present in the map of arguments.- Throws:
java.lang.IllegalArgumentException
- Thrown when one or more arguments are illegal.AuthorOperationException
- Thrown when the operation fails.- See Also:
AbstractTableOperation.doOperationInternal(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap)
-
joinCells
public void joinCells(AuthorAccess authorAccess, AuthorElement tableElement, java.util.List<AuthorElement> cellElements) throws AuthorOperationException, javax.swing.text.BadLocationException
Join table cells.- Parameters:
authorAccess
- The author access.tableElement
- The table element.cellElements
- The cells fragments.- Throws:
AuthorOperationException
javax.swing.text.BadLocationException
-
getDescription
public java.lang.String getDescription()
- Returns:
- The description of the extension.
- See Also:
Extension.getDescription()
-
getArguments
public ArgumentDescriptor[] getArguments()
- Returns:
- An array of
ArgumentDescriptor
representing the arguments this operation uses. - See Also:
AuthorOperation.getArguments()
-
generateColumnSpecifications
protected abstract void generateColumnSpecifications(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement tableElement) throws AuthorOperationException
Generates column specifications for the given table and inserts them into the document.- Parameters:
authorAccess
- Author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.tableCellSpanProvider
- Table cell span provider.tableElement
- The table element.- Throws:
AuthorOperationException
- Failed to insert the column specifications into the table.
-
-