Package ro.sync.ecss.extensions.api
Enum SelectionInterpretationMode
- java.lang.Object
-
- java.lang.Enum<SelectionInterpretationMode>
-
- ro.sync.ecss.extensions.api.SelectionInterpretationMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SelectionInterpretationMode>
@API(type=NOT_EXTENDABLE, src=PUBLIC) public enum SelectionInterpretationMode extends java.lang.Enum<SelectionInterpretationMode>
Impose how the selection is interpreted by the application.
TheTABLE_COLUMN
interpretation mode is already set by default by the application when a table column is selected. In this case, when the column is pasted, it is also interpreted as a table column by the application built-in document types.
To obtain this behavior for any selection, theTABLE_COLUMN
interpretation mode must be imposed fromAuthorSelectionModel.setSelectionInterpretationMode(SelectionInterpretationMode)
method.
For instance, when two paragraphs are copied, the clipboard object contains a list with two Author document fragments (one for each paragraph). If the selection interpretation mode is imposed toTABLE_COLUMN
, when pasting the fragments a table column is created, each paragraph being the content of a column cell.
For a custom document type, when a content with an imposedTABLE_COLUMN
interpretation mode is pasted the AuthorTableOperationsHandler#handlePasteColumn(AuthorTablePasteColumnArguments) method is called. If there is no implementation for this extension, the default paste behavior is invoked.
SeeExtensionsBundle.getAuthorTableOperationsHandler()
for handling the paste column operation.- Since:
- 14
-
-
Enum Constant Summary
Enum Constants Enum Constant Description TABLE
Table selection interpretation.TABLE_CELLS
Table cells selection interpretation (one or more table cells are selected).TABLE_COLUMN
Table column selection interpretation.TABLE_ROW
Table rows selection interpretation (one or more table rows are selected).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SelectionInterpretationMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SelectionInterpretationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TABLE_COLUMN
public static final SelectionInterpretationMode TABLE_COLUMN
Table column selection interpretation.
-
TABLE_ROW
public static final SelectionInterpretationMode TABLE_ROW
Table rows selection interpretation (one or more table rows are selected).
-
TABLE_CELLS
public static final SelectionInterpretationMode TABLE_CELLS
Table cells selection interpretation (one or more table cells are selected).
-
TABLE
public static final SelectionInterpretationMode TABLE
Table selection interpretation.
-
-
Method Detail
-
values
public static SelectionInterpretationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SelectionInterpretationMode c : SelectionInterpretationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SelectionInterpretationMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-