public abstract class AbstractColumnHideShowLayer extends AbstractLayerTransform implements IUniqueIndexLayer
underlyingLayer
layerPainter
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
AbstractColumnHideShowLayer(IUniqueIndexLayer underlyingLayer) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
int |
getColumnIndexByPosition(int columnPosition)
Gets the underlying non-transformed column index for the given column position.
|
int |
getColumnPositionByIndex(int columnIndex) |
int |
getColumnPositionByX(int x)
Returns the column position that contains the given x coordinate.
|
Collection<Integer> |
getColumnPositionsByIndexes(Collection<Integer> columnIndexes) |
abstract Collection<Integer> |
getHiddenColumnIndexes()
Will collect and return all indexes of the columns that are hidden in this layer.
|
int |
getRowPositionByIndex(int rowIndex) |
int |
getStartXOfColumnPosition(int localColumnPosition)
Returns the x offset in pixels of the given column.
|
int |
getWidth()
Returns the total width in pixels of this layer.
|
void |
handleLayerEvent(ILayerEvent event)
Handle layer event notification.
|
protected void |
invalidateCache()
Invalidate the cache to ensure that information is rebuild.
|
abstract boolean |
isColumnIndexHidden(int columnIndex)
Will check if the column at the specified index is hidden or not.
|
int |
localToUnderlyingColumnPosition(int localColumnPosition)
Convert a column position to the coordinates of the underlying layer.
|
int |
underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer,
int underlyingColumnPosition) |
Collection<Range> |
underlyingToLocalColumnPositions(ILayer sourceUnderlyingLayer,
Collection<Range> underlyingColumnPositionRanges) |
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, loadState, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalRowPosition, underlyingToLocalRowPositions
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterPersistable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
loadState, saveState
public AbstractColumnHideShowLayer(IUniqueIndexLayer underlyingLayer)
public void handleLayerEvent(ILayerEvent event)
AbstractLayer
super.fireLayerEvent(event)
- unless you plan to eat the event yourself.handleLayerEvent
in interface ILayerListener
handleLayerEvent
in class AbstractLayer
event
- the eventpublic int getColumnCount()
getColumnCount
in interface ILayer
getColumnCount
in class AbstractLayerTransform
public int getColumnIndexByPosition(int columnPosition)
ILayer
getColumnIndexByPosition
in interface ILayer
getColumnIndexByPosition
in class AbstractLayerTransform
columnPosition
- a column position relative to this coordinate modelpublic int getColumnPositionByIndex(int columnIndex)
getColumnPositionByIndex
in interface IUniqueIndexLayer
public Collection<Integer> getColumnPositionsByIndexes(Collection<Integer> columnIndexes)
public int localToUnderlyingColumnPosition(int localColumnPosition)
ILayer
localToUnderlyingColumnPosition
in interface ILayer
localToUnderlyingColumnPosition
in class AbstractLayerTransform
localColumnPosition
- column position in local (the layer's own) coordinatespublic int underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer, int underlyingColumnPosition)
underlyingToLocalColumnPosition
in interface ILayer
underlyingToLocalColumnPosition
in class AbstractLayerTransform
public Collection<Range> underlyingToLocalColumnPositions(ILayer sourceUnderlyingLayer, Collection<Range> underlyingColumnPositionRanges)
underlyingToLocalColumnPositions
in interface ILayer
underlyingToLocalColumnPositions
in class AbstractLayerTransform
public int getWidth()
ILayer
getWidth
in interface ILayer
getWidth
in class AbstractLayerTransform
public int getColumnPositionByX(int x)
ILayer
getColumnPositionByX
in interface ILayer
getColumnPositionByX
in class AbstractLayerTransform
x
- a horizontal pixel location relative to the pixel boundary of this layerpublic int getStartXOfColumnPosition(int localColumnPosition)
ILayer
getStartXOfColumnPosition
in interface ILayer
getStartXOfColumnPosition
in class AbstractLayerTransform
localColumnPosition
- the column position in this layerpublic int getRowPositionByIndex(int rowIndex)
getRowPositionByIndex
in interface IUniqueIndexLayer
public abstract boolean isColumnIndexHidden(int columnIndex)
ColumnGroupModel.ColumnGroup
s are created index based, this method only
works correctly with indexes rather than positions.columnIndex
- 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 abstract Collection<Integer> getHiddenColumnIndexes()
protected void invalidateCache()
Copyright © 2013. All Rights Reserved.