Class FreezeLayer
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform
org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer
- All Implemented Interfaces:
ILayer,ILayerListener,IUniqueIndexLayer,IPersistable
-
Field Summary
FieldsFields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainterFields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintgetColumnPositionByX(int x) Returns the column position that contains the given x coordinate.intReturns the total height in pixels of this layer.intintintintintintgetRowPositionByY(int y) Returns the row position that contains the given y coordinate.intgetStartXOfColumnPosition(int columnPosition) Returns the x offset in pixels of the given column.intgetStartYOfRowPosition(int rowPosition) Returns the y offset in pixels of the given row.intgetWidth()Returns the total width in pixels of this layer.booleanisFrozen()intlocalToUnderlyingColumnPosition(int localColumnPosition) Convert a column position to the coordinates of the underlying layer.intlocalToUnderlyingRowPosition(int localRowPosition) Convert a row position to the coordinates of the underlying layer.voidsetBottomRightPosition(int rightColumnPosition, int bottomRowPosition) voidsetTopLeftPosition(int leftColumnPosition, int topRowPosition) intunderlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer, int underlyingColumnPosition) Transforms the column position relative to the given underlying layer to this layer coordinates.intunderlyingToLocalRowPosition(ILayer sourceUnderlyingLayer, int underlyingRowPosition) Transforms the row position relative to the given underlying layer to this layer coordinates.Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform
configure, dispose, doCommand, getCellByPosition, getCellPainter, getColumnIndexByPosition, getColumnPositionByIndex, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getRegionLabelsByXY, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByIndex, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, loadState, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPositions, underlyingToLocalRowPositionsMethods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getProvidedLabels, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getProvidedLabels, hasLayerListener, registerCommandHandler, registerPersistable, removeLayerListener, unregisterCommandHandler, unregisterPersistableMethods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayerListener
handleLayerEvent
-
Field Details
-
PERSISTENCE_TOP_LEFT_POSITION
- See Also:
-
PERSISTENCE_BOTTOM_RIGHT_POSITION
- See Also:
-
-
Constructor Details
-
FreezeLayer
-
-
Method Details
-
isFrozen
public boolean isFrozen() -
getTopLeftPosition
-
setTopLeftPosition
public void setTopLeftPosition(int leftColumnPosition, int topRowPosition) -
getBottomRightPosition
-
setBottomRightPosition
public void setBottomRightPosition(int rightColumnPosition, int bottomRowPosition) -
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceILayer- Overrides:
getColumnCountin classAbstractIndexLayerTransform- Returns:
- The number of columns in this layer.
-
getPreferredColumnCount
public int getPreferredColumnCount()- Specified by:
getPreferredColumnCountin interfaceILayer- Overrides:
getPreferredColumnCountin classAbstractIndexLayerTransform
-
localToUnderlyingColumnPosition
public int localToUnderlyingColumnPosition(int localColumnPosition) Description copied from interface:ILayerConvert a column position to the coordinates of the underlying layer. This is possible since each layer is aware of its underlying layer.- Specified by:
localToUnderlyingColumnPositionin interfaceILayer- Overrides:
localToUnderlyingColumnPositionin classAbstractIndexLayerTransform- Parameters:
localColumnPosition- column position in local (the layer's own) coordinates- Returns:
- column position in the underlying layer's coordinates
-
underlyingToLocalColumnPosition
public int underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer, int underlyingColumnPosition) Description copied from interface:ILayerTransforms the column position relative to the given underlying layer to this layer coordinates.- Specified by:
underlyingToLocalColumnPositionin interfaceILayer- Overrides:
underlyingToLocalColumnPositionin classAbstractIndexLayerTransform- Parameters:
sourceUnderlyingLayer- The underlying layer to which the given column position matches.underlyingColumnPosition- The column position in the given underlying layer that should be converted to a local column position.- Returns:
- The given column position transformed to be local to this layer.
-
getWidth
public int getWidth()Description copied from interface:ILayerReturns the total width in pixels of this layer.- Specified by:
getWidthin interfaceILayer- Overrides:
getWidthin classAbstractIndexLayerTransform- Returns:
- The total width in pixels of this layer.
-
getPreferredWidth
public int getPreferredWidth()- Specified by:
getPreferredWidthin interfaceILayer- Overrides:
getPreferredWidthin classAbstractIndexLayerTransform
-
getColumnPositionByX
public int getColumnPositionByX(int x) Description copied from interface:ILayerReturns the column position that contains the given x coordinate.- Specified by:
getColumnPositionByXin interfaceILayer- Overrides:
getColumnPositionByXin classAbstractIndexLayerTransform- Parameters:
x- A horizontal pixel location relative to the pixel boundary of this layer.- Returns:
- A column position relative to the associated coordinate system, or -1 if there is no column that contains x.
-
getStartXOfColumnPosition
public int getStartXOfColumnPosition(int columnPosition) Description copied from interface:ILayerReturns the x offset in pixels of the given column.- Specified by:
getStartXOfColumnPositionin interfaceILayer- Overrides:
getStartXOfColumnPositionin classAbstractIndexLayerTransform- Parameters:
columnPosition- The column position in this layer.- Returns:
- The x offset of the column, or -1.
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceILayer- Overrides:
getRowCountin classAbstractIndexLayerTransform- Returns:
- The number of rows in this layer.
-
getPreferredRowCount
public int getPreferredRowCount()- Specified by:
getPreferredRowCountin interfaceILayer- Overrides:
getPreferredRowCountin classAbstractIndexLayerTransform
-
localToUnderlyingRowPosition
public int localToUnderlyingRowPosition(int localRowPosition) Description copied from interface:ILayerConvert a row position to the coordinates of the underlying layer. This is possible since each layer is aware of its underlying layer.- Specified by:
localToUnderlyingRowPositionin interfaceILayer- Overrides:
localToUnderlyingRowPositionin classAbstractIndexLayerTransform- Parameters:
localRowPosition- row position in local (the layer's own) coordinates- Returns:
- row position in the underlying layer's coordinates
-
underlyingToLocalRowPosition
Description copied from interface:ILayerTransforms the row position relative to the given underlying layer to this layer coordinates.- Specified by:
underlyingToLocalRowPositionin interfaceILayer- Overrides:
underlyingToLocalRowPositionin classAbstractIndexLayerTransform- Parameters:
sourceUnderlyingLayer- The underlying layer to which the given row position matches.underlyingRowPosition- The row position in the given underlying layer that should be converted to a local row position.- Returns:
- The given row position transformed to be local to this layer.
-
getHeight
public int getHeight()Description copied from interface:ILayerReturns the total height in pixels of this layer.- Specified by:
getHeightin interfaceILayer- Overrides:
getHeightin classAbstractIndexLayerTransform- Returns:
- The total height in pixels of this layer.
-
getPreferredHeight
public int getPreferredHeight()- Specified by:
getPreferredHeightin interfaceILayer- Overrides:
getPreferredHeightin classAbstractIndexLayerTransform
-
getRowPositionByY
public int getRowPositionByY(int y) Description copied from interface:ILayerReturns the row position that contains the given y coordinate.- Specified by:
getRowPositionByYin interfaceILayer- Overrides:
getRowPositionByYin classAbstractIndexLayerTransform- Parameters:
y- a vertical pixel location relative to the pixel boundary of this layer- Returns:
- a row position relative to the associated coordinate system, or -1 if there is no row that contains y
-
getStartYOfRowPosition
public int getStartYOfRowPosition(int rowPosition) Description copied from interface:ILayerReturns the y offset in pixels of the given row.- Specified by:
getStartYOfRowPositionin interfaceILayer- Overrides:
getStartYOfRowPositionin classAbstractIndexLayerTransform- Parameters:
rowPosition- the row position in this layer- Returns:
- the y offset of the row, or -1
-