public class DisplayColumnStyleEditorCommandHandler extends AbstractLayerCommandHandler<DisplayColumnStyleEditorCommand> implements IPersistable
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 columnModifier and Type | Field and Description |
---|---|
protected ColumnOverrideLabelAccumulator |
columnLabelAccumulator |
protected ColumnStyleEditorDialog |
dialog |
protected static String |
PERSISTENCE_PREFIX |
protected SelectionLayer |
selectionLayer |
protected Map<String,Style> |
stylesToPersist |
protected static String |
USER_EDITED_STYLE_LABEL |
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
DisplayColumnStyleEditorCommandHandler(SelectionLayer selectionLayer,
ColumnOverrideLabelAccumulator labelAccumulator,
IConfigRegistry configRegistry) |
Modifier and Type | Method and Description |
---|---|
protected void |
applySelectedStyleToColumns(DisplayColumnStyleEditorCommand command,
int[] columnIndeces) |
boolean |
doCommand(DisplayColumnStyleEditorCommand command) |
Class<DisplayColumnStyleEditorCommand> |
getCommandClass() |
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.
|
doCommand
protected static final String PERSISTENCE_PREFIX
protected static final String USER_EDITED_STYLE_LABEL
protected final SelectionLayer selectionLayer
protected ColumnOverrideLabelAccumulator columnLabelAccumulator
protected ColumnStyleEditorDialog dialog
public DisplayColumnStyleEditorCommandHandler(SelectionLayer selectionLayer, ColumnOverrideLabelAccumulator labelAccumulator, IConfigRegistry configRegistry)
public boolean doCommand(DisplayColumnStyleEditorCommand command)
doCommand
in class AbstractLayerCommandHandler<DisplayColumnStyleEditorCommand>
public Class<DisplayColumnStyleEditorCommand> getCommandClass()
getCommandClass
in interface ILayerCommandHandler<DisplayColumnStyleEditorCommand>
protected void applySelectedStyleToColumns(DisplayColumnStyleEditorCommand command, int[] columnIndeces)
protected String getConfigLabel(int columnIndex)
public void loadState(String prefix, Properties properties)
IPersistable
loadState
in interface IPersistable
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.protected int parseColumnIndexFromKey(String keyString)
public void saveState(String prefix, Properties properties)
IPersistable
saveState
in interface IPersistable
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 © 2013. All Rights Reserved.