public class ColumnHideShowLayer extends AbstractColumnHideShowLayer implements IColumnHideShowLayer
ResizeColumnHideShowLayer.ResizeColumnHideShowLayer| Modifier and Type | Field and Description |
|---|---|
static String |
PERSISTENCE_KEY_HIDDEN_COLUMN_INDEXES |
underlyingLayercommandHandlers, eventHandlers, eventHelperLock, layerPainterDOT, VALUE_SEPARATOR| Constructor and Description |
|---|
ColumnHideShowLayer(IUniqueIndexLayer underlyingLayer) |
| Modifier and Type | Method and Description |
|---|---|
LabelStack |
getConfigLabelsByPosition(int columnPosition,
int rowPosition) |
Collection<Integer> |
getHiddenColumnIndexes()
Will collect and return all indexes of the columns that are hidden in
this layer.
|
Collection<String> |
getProvidedLabels() |
void |
handleLayerEvent(ILayerEvent event)
Handle layer event notification.
|
void |
hideColumnPositions(Collection<Integer> columnPositions)
Hide the columns at the specified positions.
|
void |
hideColumnPositions(Integer... columnPositions)
Hide the columns at the specified positions.
|
boolean |
isColumnIndexHidden(int columnIndex)
Will check if the column at the specified index is hidden or not.
|
void |
loadState(String prefix,
Properties properties)
Underlying layers must load state first.
|
void |
saveState(String prefix,
Properties properties)
Saves the state to the given Properties using the specified prefix.
|
void |
showAllColumns()
Show all hidden columns again.
|
void |
showColumnIndexes(Collection<Integer> columnIndexes)
Show the columns with the given indexes again if they are hidden by this
layer.
|
void |
showColumnIndexes(Integer... columnIndexes)
Show the columns with the given indexes again if they are hidden by this
layer.
|
void |
showColumnPosition(int columnPosition,
boolean showToLeft,
boolean showAll)
Show the column(s) that are hidden next to the given column position.
|
getColumnCount, getColumnIndexByPosition, getColumnPositionByIndex, getColumnPositionByX, getColumnPositionsByIndexes, getRowPositionByIndex, getStartXOfColumnPosition, getWidth, invalidateCache, localToUnderlyingColumnPosition, underlyingToLocalColumnPosition, underlyingToLocalColumnPositionsconfigure, dispose, doCommand, getCellByPosition, getCellPainter, getColumnWidthByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartYOfRowPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingRowPosition, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalRowPosition, underlyingToLocalRowPositionsaddConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLayerListener, configure, dispose, doCommand, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getColumnWidthByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, hasLayerListener, isColumnPositionResizable, isRowPositionResizable, localToUnderlyingRowPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalRowPosition, underlyingToLocalRowPositions, unregisterCommandHandler, unregisterPersistablepublic static final String PERSISTENCE_KEY_HIDDEN_COLUMN_INDEXES
public ColumnHideShowLayer(IUniqueIndexLayer underlyingLayer)
public void handleLayerEvent(ILayerEvent event)
AbstractLayersuper.fireLayerEvent(event) - unless you plan to eat the
event yourself.handleLayerEvent in interface ILayerListenerhandleLayerEvent in class AbstractColumnHideShowLayerevent - the eventpublic void saveState(String prefix, Properties properties)
IPersistablesaveState in interface IPersistablesaveState in class AbstractLayerTransformprefix - 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.public void loadState(String prefix, Properties properties)
AbstractLayerTransformIStructuralChangeEvent from underlying layers will reset caches
after state has been loadedloadState in interface IPersistableloadState in class AbstractLayerTransformprefix - 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.public LabelStack getConfigLabelsByPosition(int columnPosition, int rowPosition)
getConfigLabelsByPosition in interface ILayergetConfigLabelsByPosition in class AbstractLayerTransformpublic boolean isColumnIndexHidden(int columnIndex)
AbstractColumnHideShowLayerColumnGroupModel.ColumnGroups are created index based, this method only works
correctly with indexes rather than positions.isColumnIndexHidden in class AbstractColumnHideShowLayercolumnIndex - The column index of the column whose visibility state should
be checked.true if the column at the specified index is hidden,
false if it is visible.public Collection<Integer> getHiddenColumnIndexes()
AbstractColumnHideShowLayergetHiddenColumnIndexes in interface IColumnHideShowLayergetHiddenColumnIndexes in class AbstractColumnHideShowLayerpublic void hideColumnPositions(Integer... columnPositions)
hideColumnPositions in interface IColumnHideShowLayercolumnPositions - The column positions to hide.public void hideColumnPositions(Collection<Integer> columnPositions)
IColumnHideShowLayerhideColumnPositions in interface IColumnHideShowLayercolumnPositions - The column positions to hide.public void showColumnIndexes(Integer... columnIndexes)
showColumnIndexes in interface IColumnHideShowLayercolumnIndexes - The column indexes to show again.public void showColumnIndexes(Collection<Integer> columnIndexes)
IColumnHideShowLayershowColumnIndexes in interface IColumnHideShowLayercolumnIndexes - The column indexes to show again.public void showColumnPosition(int columnPosition,
boolean showToLeft,
boolean showAll)
IColumnHideShowLayershowColumnPosition in interface IColumnHideShowLayercolumnPosition - The column position whose neighbors should be shown again.showToLeft - Whether the column positions to the left or the right of the
given column position should be shown again.showAll - Whether all hidden adjacent columns should be shown again or
only the single direct adjacent column.public void showAllColumns()
IColumnHideShowLayershowAllColumns in interface IColumnHideShowLayerpublic Collection<String> getProvidedLabels()
getProvidedLabels in class AbstractLayerCopyright © 2019. All rights reserved.