org.eclipse.nebula.widgets.nattable.style.editor.command
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PERSISTENCE_PREFIX
protected static final String PERSISTENCE_PREFIX
- See Also:
- Constant Field Values
USER_EDITED_STYLE_LABEL
protected static final String USER_EDITED_STYLE_LABEL
- See Also:
- Constant Field Values
USER_EDITED_COLUMN_STYLE_LABEL_PREFIX
protected static final String USER_EDITED_COLUMN_STYLE_LABEL_PREFIX
- See Also:
- Constant Field Values
selectionLayer
protected final SelectionLayer selectionLayer
columnLabelAccumulator
protected ColumnOverrideLabelAccumulator columnLabelAccumulator
dialog
protected ColumnStyleEditorDialog dialog
stylesToPersist
protected final Map<String,Style> stylesToPersist
DisplayColumnStyleEditorCommandHandler
public DisplayColumnStyleEditorCommandHandler(SelectionLayer selectionLayer,
ColumnOverrideLabelAccumulator labelAccumulator,
IConfigRegistry configRegistry)
doCommand
public boolean doCommand(DisplayColumnStyleEditorCommand command)
- Specified by:
doCommand in class AbstractLayerCommandHandler<DisplayColumnStyleEditorCommand>
getCommandClass
public Class<DisplayColumnStyleEditorCommand> getCommandClass()
- Specified by:
getCommandClass in interface ILayerCommandHandler<DisplayColumnStyleEditorCommand>
applySelectedStyleToColumns
protected void applySelectedStyleToColumns(DisplayColumnStyleEditorCommand command,
int[] columnIndeces)
applySelectedStyle
protected void applySelectedStyle()
applySelectedStyle
protected void applySelectedStyle(Style newColumnCellStyle,
String configLabel)
getConfigLabel
protected String getConfigLabel(int columnIndex)
loadState
public void loadState(String prefix,
Properties properties)
- 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 interface IPersistable
- 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
protected int parseColumnIndexFromKey(String keyString)
saveState
public void saveState(String prefix,
Properties properties)
- 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 interface IPersistable
- 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.
Copyright © 2014. All rights reserved.