org.eclipse.nebula.widgets.nattable.hideshow
Class ColumnHideShowLayer
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer
org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer
- All Implemented Interfaces:
- ILayer, ILayerListener, IUniqueIndexLayer, IPersistable
- Direct Known Subclasses:
- BaseColumnHideShowLayerFixture, ColumnHideShowLayerFixture
public class ColumnHideShowLayer
- extends AbstractColumnHideShowLayer
Methods inherited from class org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer |
getColumnCount, getColumnIndexByPosition, getColumnPositionByIndex, getColumnPositionByX, getColumnPositionsByIndexes, getRowPositionByIndex, getStartXOfColumnPosition, getWidth, invalidateCache, localToUnderlyingColumnPosition, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions |
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform |
configure, dispose, doCommand, getCellByPosition, getCellPainter, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartYOfRowPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isColumnPositionResizable, isRowPositionResizable, localToUnderlyingRowPosition, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalRowPosition, underlyingToLocalRowPositions |
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer |
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable |
Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer |
addLayerListener, configure, dispose, doCommand, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getColumnWidthByPosition, getConfigLabelsByPosition, 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, unregisterPersistable |
PERSISTENCE_KEY_HIDDEN_COLUMN_INDEXES
public static final String PERSISTENCE_KEY_HIDDEN_COLUMN_INDEXES
- See Also:
- Constant Field Values
ColumnHideShowLayer
public ColumnHideShowLayer(IUniqueIndexLayer underlyingLayer)
handleLayerEvent
public void handleLayerEvent(ILayerEvent event)
- Description copied from class:
AbstractLayer
- Handle layer event notification. Convert it to your context and propagate
UP.
If you override this method you MUST NOT FORGET to raise
the event up the layer stack by calling
super.fireLayerEvent(event)
- unless you plan to eat the
event yourself.
- Specified by:
handleLayerEvent
in interface ILayerListener
- Overrides:
handleLayerEvent
in class AbstractColumnHideShowLayer
- Parameters:
event
- the event
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
- Overrides:
saveState
in class AbstractLayerTransform
- 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.
loadState
public void loadState(String prefix,
Properties properties)
- Description copied from class:
AbstractLayerTransform
- Underlying layers must load state first. If this is not done,
IStructuralChangeEvent
from underlying layers will reset caches
after state has been loaded
- Specified by:
loadState
in interface IPersistable
- Overrides:
loadState
in class AbstractLayerTransform
- 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.
isColumnIndexHidden
public boolean isColumnIndexHidden(int columnIndex)
- Description copied from class:
AbstractColumnHideShowLayer
- Will check if the column at the specified index is hidden or not. Checks
this layer and also the sublayers for the visibility. Note: As the
ColumnGroupModel.ColumnGroup
s are created index based, this method only works
correctly with indexes rather than positions.
- Specified by:
isColumnIndexHidden
in class AbstractColumnHideShowLayer
- Parameters:
columnIndex
- The column index of the column whose visibility state should
be checked.
- Returns:
true
if the column at the specified index is hidden,
false
if it is visible.
getHiddenColumnIndexes
public Collection<Integer> getHiddenColumnIndexes()
- Description copied from class:
AbstractColumnHideShowLayer
- Will collect and return all indexes of the columns that are hidden in
this layer. Note: It is not intended that it also collects the column
indexes of underlying layers. This would cause issues on calculating
positions as every layer is responsible for those calculations itself.
- Specified by:
getHiddenColumnIndexes
in class AbstractColumnHideShowLayer
- Returns:
- Collection of all column indexes that are hidden in this layer.
hideColumnPositions
public void hideColumnPositions(Collection<Integer> columnPositions)
showColumnIndexes
public void showColumnIndexes(Collection<Integer> columnIndexes)
showAllColumns
public void showAllColumns()
Copyright © 2015. All rights reserved.