org.eclipse.nebula.widgets.nattable.freeze
Class FreezeLayer

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
      extended by org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform
          extended by org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer
All Implemented Interfaces:
ILayer, ILayerListener, IUniqueIndexLayer, IPersistable

public class FreezeLayer
extends AbstractIndexLayerTransform


Field Summary
static String PERSISTENCE_BOTTOM_RIGHT_POSITION
           
static String PERSISTENCE_TOP_LEFT_POSITION
           
 
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, layerPainter
 
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
 
Constructor Summary
FreezeLayer(IUniqueIndexLayer underlyingLayer)
           
 
Method Summary
 PositionCoordinate getBottomRightPosition()
           
 int getColumnCount()
           
 int getColumnPositionByX(int x)
          Returns the column position that contains the given x coordinate.
 int getHeight()
          Returns the total height in pixels of this layer.
 int getPreferredColumnCount()
           
 int getPreferredHeight()
           
 int getPreferredRowCount()
           
 int getPreferredWidth()
           
 int getRowCount()
           
 int getRowPositionByY(int y)
          Returns the row position that contains the given y coordinate.
 int getStartXOfColumnPosition(int columnPosition)
          Returns the x offset in pixels of the given column.
 int getStartYOfRowPosition(int rowPosition)
          Returns the y offset in pixels of the given row.
 PositionCoordinate getTopLeftPosition()
           
 int getWidth()
          Returns the total width in pixels of this layer.
 boolean isFrozen()
           
 int localToUnderlyingColumnPosition(int localColumnPosition)
          Convert a column position to the coordinates of the underlying layer.
 int localToUnderlyingRowPosition(int localRowPosition)
           
 void setBottomRightPosition(int rightColumnPosition, int bottomRowPosition)
           
 void setTopLeftPosition(int leftColumnPosition, int topRowPosition)
           
 int underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer, int underlyingColumnPosition)
           
 int underlyingToLocalRowPosition(ILayer sourceUnderlyingLayer, int underlyingRowPosition)
           
 
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, isRowPositionResizable, loadState, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPositions, underlyingToLocalRowPositions
 
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, hasLayerListener, registerCommandHandler, registerPersistable, removeLayerListener, unregisterCommandHandler, unregisterPersistable
 
Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayerListener
handleLayerEvent
 

Field Detail

PERSISTENCE_TOP_LEFT_POSITION

public static final String PERSISTENCE_TOP_LEFT_POSITION
See Also:
Constant Field Values

PERSISTENCE_BOTTOM_RIGHT_POSITION

public static final String PERSISTENCE_BOTTOM_RIGHT_POSITION
See Also:
Constant Field Values
Constructor Detail

FreezeLayer

public FreezeLayer(IUniqueIndexLayer underlyingLayer)
Method Detail

isFrozen

public boolean isFrozen()

getTopLeftPosition

public PositionCoordinate getTopLeftPosition()

setTopLeftPosition

public void setTopLeftPosition(int leftColumnPosition,
                               int topRowPosition)

getBottomRightPosition

public PositionCoordinate getBottomRightPosition()

setBottomRightPosition

public void setBottomRightPosition(int rightColumnPosition,
                                   int bottomRowPosition)

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface ILayer
Overrides:
getColumnCount in class AbstractIndexLayerTransform
Returns:
the number of columns in this coordinate model

getPreferredColumnCount

public int getPreferredColumnCount()
Specified by:
getPreferredColumnCount in interface ILayer
Overrides:
getPreferredColumnCount in class AbstractIndexLayerTransform

localToUnderlyingColumnPosition

public int localToUnderlyingColumnPosition(int localColumnPosition)
Description copied from interface: ILayer
Convert a column position to the coordinates of the underlying layer. This is possible since each layer is aware of its underlying layer.

Specified by:
localToUnderlyingColumnPosition in interface ILayer
Overrides:
localToUnderlyingColumnPosition in class AbstractIndexLayerTransform
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)
Specified by:
underlyingToLocalColumnPosition in interface ILayer
Overrides:
underlyingToLocalColumnPosition in class AbstractIndexLayerTransform

getWidth

public int getWidth()
Description copied from interface: ILayer
Returns the total width in pixels of this layer.

Specified by:
getWidth in interface ILayer
Overrides:
getWidth in class AbstractIndexLayerTransform
Returns:
the width of this layer

getPreferredWidth

public int getPreferredWidth()
Specified by:
getPreferredWidth in interface ILayer
Overrides:
getPreferredWidth in class AbstractIndexLayerTransform

getColumnPositionByX

public int getColumnPositionByX(int x)
Description copied from interface: ILayer
Returns the column position that contains the given x coordinate.

Specified by:
getColumnPositionByX in interface ILayer
Overrides:
getColumnPositionByX in class AbstractIndexLayerTransform
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: ILayer
Returns the x offset in pixels of the given column.

Specified by:
getStartXOfColumnPosition in interface ILayer
Overrides:
getStartXOfColumnPosition in class AbstractIndexLayerTransform
Parameters:
columnPosition - the column position in this layer
Returns:
the x offset of the column, or -1

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface ILayer
Overrides:
getRowCount in class AbstractIndexLayerTransform
Returns:
the number of rows in this coordinate model

getPreferredRowCount

public int getPreferredRowCount()
Specified by:
getPreferredRowCount in interface ILayer
Overrides:
getPreferredRowCount in class AbstractIndexLayerTransform

localToUnderlyingRowPosition

public int localToUnderlyingRowPosition(int localRowPosition)
Specified by:
localToUnderlyingRowPosition in interface ILayer
Overrides:
localToUnderlyingRowPosition in class AbstractIndexLayerTransform

underlyingToLocalRowPosition

public int underlyingToLocalRowPosition(ILayer sourceUnderlyingLayer,
                                        int underlyingRowPosition)
Specified by:
underlyingToLocalRowPosition in interface ILayer
Overrides:
underlyingToLocalRowPosition in class AbstractIndexLayerTransform

getHeight

public int getHeight()
Description copied from interface: ILayer
Returns the total height in pixels of this layer.

Specified by:
getHeight in interface ILayer
Overrides:
getHeight in class AbstractIndexLayerTransform
Returns:
the height of this layer

getPreferredHeight

public int getPreferredHeight()
Specified by:
getPreferredHeight in interface ILayer
Overrides:
getPreferredHeight in class AbstractIndexLayerTransform

getRowPositionByY

public int getRowPositionByY(int y)
Description copied from interface: ILayer
Returns the row position that contains the given y coordinate.

Specified by:
getRowPositionByY in interface ILayer
Overrides:
getRowPositionByY in class AbstractIndexLayerTransform
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: ILayer
Returns the y offset in pixels of the given row.

Specified by:
getStartYOfRowPosition in interface ILayer
Overrides:
getStartYOfRowPosition in class AbstractIndexLayerTransform
Parameters:
rowPosition - the row position in this layer
Returns:
the y offset of the row, or -1


Copyright © 2015. All rights reserved.