org.eclipse.nebula.widgets.nattable.layer
Class ZoomLayer

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
      extended by org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
          extended by org.eclipse.nebula.widgets.nattable.layer.ZoomLayer
All Implemented Interfaces:
ILayer, ILayerListener, IPersistable

public class ZoomLayer
extends AbstractLayerTransform


Field Summary
 
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
underlyingLayer
 
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
ZoomLayer(ILayer underlyingILayer)
           
 
Method Summary
 int getColumnPositionByX(int x)
          Returns the column position that contains the given x coordinate.
 int getColumnWidthByPosition(int columnPosition)
          Returns the width in pixels of the given column.
 int getHeight()
          Returns the total height in pixels of this layer.
 int getPreferredHeight()
           
 int getPreferredWidth()
           
 LabelStack getRegionLabelsByXY(int x, int y)
          Layer can apply its own labels to any cell it wishes.
 int getRowHeightByPosition(int rowPosition)
          Returns the height in pixels of the given row.
 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.
 int getWidth()
          Returns the total width in pixels of this layer.
 float getZoomFactor()
           
 void setZoomFactor(float zoomFactor)
           
 
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
configure, dispose, doCommand, getCellByPosition, getCellPainter, getColumnCount, getColumnIndexByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getPreferredColumnCount, getPreferredRowCount, getRowCount, getRowIndexByPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isColumnPositionResizable, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, 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
 

Constructor Detail

ZoomLayer

public ZoomLayer(ILayer underlyingILayer)
Method Detail

getZoomFactor

public float getZoomFactor()

setZoomFactor

public void setZoomFactor(float zoomFactor)

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 AbstractLayerTransform
Returns:
the width of this layer

getPreferredWidth

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

getColumnWidthByPosition

public int getColumnWidthByPosition(int columnPosition)
Description copied from interface: ILayer
Returns the width in pixels of the given column. The width of invisible and non-existing columns is 0.

Specified by:
getColumnWidthByPosition in interface ILayer
Overrides:
getColumnWidthByPosition in class AbstractLayerTransform
Parameters:
columnPosition - the column position in this layer
Returns:
the width of the column

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 AbstractLayerTransform
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 AbstractLayerTransform
Parameters:
columnPosition - the column position in this layer
Returns:
the x offset of the column, or -1

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 AbstractLayerTransform
Returns:
the height of this layer

getPreferredHeight

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

getRowHeightByPosition

public int getRowHeightByPosition(int rowPosition)
Description copied from interface: ILayer
Returns the height in pixels of the given row. The height of invisible and non-existing rows is 0.

Specified by:
getRowHeightByPosition in interface ILayer
Overrides:
getRowHeightByPosition in class AbstractLayerTransform
Parameters:
rowPosition - the row position in this layer
Returns:
the height of the row

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 AbstractLayerTransform
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 AbstractLayerTransform
Parameters:
rowPosition - the row position in this layer
Returns:
the y offset of the row, or -1

getRegionLabelsByXY

public LabelStack getRegionLabelsByXY(int x,
                                      int y)
Description copied from interface: ILayer
Layer can apply its own labels to any cell it wishes.

Specified by:
getRegionLabelsByXY in interface ILayer
Overrides:
getRegionLabelsByXY in class AbstractLayerTransform
Parameters:
x - the x pixel coordinate
y - the y pixel coordinate
Returns:
a LabelStack containing the region labels for the cell at the given pixel position


Copyright © 2015. All rights reserved.