Class DisplayColumnStyleEditorCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<DisplayColumnStyleEditorCommand>
org.eclipse.nebula.widgets.nattable.style.editor.command.DisplayColumnStyleEditorCommandHandler
- All Implemented Interfaces:
ILayerCommandHandler<DisplayColumnStyleEditorCommand>
,IPersistable
public class DisplayColumnStyleEditorCommandHandler
extends AbstractLayerCommandHandler<DisplayColumnStyleEditorCommand>
implements IPersistable
1. Captures a new style using the
StyleEditorDialog
2. Registers
style from step 1 in the ConfigRegistry
with a new label 3.
Applies the label from step 2 to all cells in the selected column-
Field Summary
Modifier and TypeFieldDescriptionprotected ColumnOverrideLabelAccumulator
protected ColumnStyleEditorDialog
protected static final String
protected final SelectionLayer
protected static final String
protected static final String
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
Constructor Summary
ConstructorDescriptionDisplayColumnStyleEditorCommandHandler
(SelectionLayer selectionLayer, ColumnOverrideLabelAccumulator labelAccumulator, IConfigRegistry configRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
applySelectedStyle
(Style newColumnCellStyle, String configLabel) protected void
applySelectedStyleToColumns
(DisplayColumnStyleEditorCommand command, int[] columnIndeces) boolean
doCommand
(DisplayColumnStyleEditorCommand command) protected String
getConfigLabel
(int columnIndex) void
loadState
(String prefix, Properties properties) Restore the state out of the given Properties identified by the specified prefix.protected int
parseColumnIndexFromKey
(String keyString) void
saveState
(String prefix, Properties properties) Saves the state to the given Properties using the specified prefix.Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
Field Details
-
PERSISTENCE_PREFIX
- See Also:
-
USER_EDITED_STYLE_LABEL
- See Also:
-
USER_EDITED_COLUMN_STYLE_LABEL_PREFIX
- See Also:
-
selectionLayer
-
columnLabelAccumulator
-
dialog
-
stylesToPersist
-
-
Constructor Details
-
DisplayColumnStyleEditorCommandHandler
public DisplayColumnStyleEditorCommandHandler(SelectionLayer selectionLayer, ColumnOverrideLabelAccumulator labelAccumulator, IConfigRegistry configRegistry)
-
-
Method Details
-
doCommand
- Specified by:
doCommand
in classAbstractLayerCommandHandler<DisplayColumnStyleEditorCommand>
-
getCommandClass
- Specified by:
getCommandClass
in interfaceILayerCommandHandler<DisplayColumnStyleEditorCommand>
-
applySelectedStyleToColumns
protected void applySelectedStyleToColumns(DisplayColumnStyleEditorCommand command, int[] columnIndeces) -
applySelectedStyle
protected void applySelectedStyle() -
applySelectedStyle
-
getConfigLabel
-
loadState
Description copied from interface:IPersistable
Restore the state out of the given Properties identified by the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- Specified by:
loadState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to load the state from.
-
parseColumnIndexFromKey
-
saveState
Description copied from interface:IPersistable
Saves the state to the given Properties using the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- Specified by:
saveState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to save the state to.
-