|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform
org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentIndexLayer
public class DimensionallyDependentIndexLayer
A DimensionallyDependentIndexLayer is a layer whose horizontal and vertical dimensions are dependent on the horizontal and vertical dimensions of other layers. A DimensionallyDependentIndexLayer takes three constructor parameters: the horizontal layer that the DimensionallyDependentIndexLayer's horizontal dimension is linked to, the vertical layer that the DimensionallyDependentIndexLayer is linked to, and a base layer to which all non-dimensionally related ILayer method calls will be delegated to (e.g. command, event methods)
Prime examples of dimensionally dependent layers are the column header and row header layers. For example, the column header layer's horizontal dimension is linked to the body layer's horizontal dimension. This means that whatever columns are shown in the body area will also be shown in the column header area, and vice versa. Note that the column header layer maintains its own vertical dimension, however, so it's vertical layer dependency would be a separate data layer. The same is true for the row header layer, only with the vertical instead of the horizontal dimension. The constructors for the column header and row header layers would therefore look something like this:
ILayer columnHeaderLayer = new DimensionallyDependentIndexLayer(columnHeaderRowDataLayer, bodyLayer, columnHeaderRowDataLayer); ILayer rowHeaderLayer = new DimensionallyDependentIndexLayer(rowHeaderColumnDataLayer, bodyLayer, rowHeaderColumnDataLayer);
In contrast to DimensionallyDependentLayer, this class:
IUniqueIndexLayer;AbstractIndexLayerTransform.getCellByPosition(int, int) which e.g. fully supports spanned cells;IUniqueIndexLayer too.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer |
|---|
layerPainter |
| Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable |
|---|
DOT, VALUE_SEPARATOR |
| Constructor Summary | |
|---|---|
protected |
DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer)
Creates a new DimensionallyDependentIndexLayer. |
|
DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer,
IUniqueIndexLayer horizontalLayerDependency,
IUniqueIndexLayer verticalLayerDependency)
Creates a new DimensionallyDependentIndexLayer. |
| Method Summary | |
|---|---|
boolean |
doCommand(ILayerCommand command)
Opportunity to respond to a command as it flows down the stack. |
IUniqueIndexLayer |
getBaseLayer()
|
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. |
int |
getColumnWidthByPosition(int columnPosition)
Returns the width in pixels of the given column. |
int |
getHeight()
Returns the total height in pixels of this layer. |
ILayer |
getHorizontalLayerDependency()
|
int |
getPreferredColumnCount()
|
int |
getPreferredHeight()
|
int |
getPreferredRowCount()
|
int |
getPreferredWidth()
|
int |
getRowCount()
|
int |
getRowHeightByPosition(int rowPosition)
Returns the height in pixels of the given row. |
int |
getRowIndexByPosition(int rowPosition)
Gets the underlying non-transformed row index for the given row position. |
int |
getRowPositionByIndex(int rowIndex)
|
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. |
ILayer |
getVerticalLayerDependency()
|
int |
getWidth()
Returns the total width in pixels of this layer. |
boolean |
isColumnPositionResizable(int columnPosition)
|
boolean |
isRowPositionResizable(int rowPosition)
|
int |
localToUnderlyingColumnPosition(int localColumnPosition)
Convert a column position to the coordinates of the underlying layer. |
int |
localToUnderlyingRowPosition(int localRowPosition)
|
protected void |
setHorizontalLayerDependency(IUniqueIndexLayer horizontalLayerDependency)
|
protected void |
setVerticalLayerDependency(IUniqueIndexLayer verticalLayerDependency)
|
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, getCellByPosition, getCellPainter, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getRegionLabelsByXY, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, 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 |
| Constructor Detail |
|---|
public DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer,
IUniqueIndexLayer horizontalLayerDependency,
IUniqueIndexLayer verticalLayerDependency)
baseLayer - the underlying base layerhorizontalLayerDependency - the layer, the horizontal dimension is linked toverticalLayerDependency - the layer, the vertical dimension is linked toprotected DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer)
baseLayer - the underlying base layer| Method Detail |
|---|
protected void setHorizontalLayerDependency(IUniqueIndexLayer horizontalLayerDependency)
protected void setVerticalLayerDependency(IUniqueIndexLayer verticalLayerDependency)
public ILayer getHorizontalLayerDependency()
public ILayer getVerticalLayerDependency()
public IUniqueIndexLayer getBaseLayer()
public boolean doCommand(ILayerCommand command)
ILayerILayerCommand.convertToTargetLayer(ILayer)
doCommand in interface ILayerdoCommand in class AbstractIndexLayerTransformcommand - the command to perform
public int getColumnCount()
getColumnCount in interface ILayergetColumnCount in class AbstractIndexLayerTransformpublic int getPreferredColumnCount()
getPreferredColumnCount in interface ILayergetPreferredColumnCount in class AbstractIndexLayerTransformpublic int getColumnIndexByPosition(int columnPosition)
ILayer
getColumnIndexByPosition in interface ILayergetColumnIndexByPosition in class AbstractIndexLayerTransformcolumnPosition - a column position relative to this coordinate model
public int getColumnPositionByIndex(int columnIndex)
getColumnPositionByIndex in interface IUniqueIndexLayergetColumnPositionByIndex in class AbstractIndexLayerTransformpublic int localToUnderlyingColumnPosition(int localColumnPosition)
ILayer
localToUnderlyingColumnPosition in interface ILayerlocalToUnderlyingColumnPosition in class AbstractIndexLayerTransformlocalColumnPosition - column position in local (the layer's own) coordinates
public int underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer,
int underlyingColumnPosition)
underlyingToLocalColumnPosition in interface ILayerunderlyingToLocalColumnPosition in class AbstractIndexLayerTransformpublic int getWidth()
ILayer
getWidth in interface ILayergetWidth in class AbstractIndexLayerTransformpublic int getPreferredWidth()
getPreferredWidth in interface ILayergetPreferredWidth in class AbstractIndexLayerTransformpublic int getColumnWidthByPosition(int columnPosition)
ILayer
getColumnWidthByPosition in interface ILayergetColumnWidthByPosition in class AbstractIndexLayerTransformcolumnPosition - the column position in this layer
public boolean isColumnPositionResizable(int columnPosition)
isColumnPositionResizable in interface ILayerisColumnPositionResizable in class AbstractIndexLayerTransformpublic int getColumnPositionByX(int x)
ILayer
getColumnPositionByX in interface ILayergetColumnPositionByX in class AbstractIndexLayerTransformx - a horizontal pixel location relative to the pixel boundary of this layer
public int getStartXOfColumnPosition(int columnPosition)
ILayer
getStartXOfColumnPosition in interface ILayergetStartXOfColumnPosition in class AbstractIndexLayerTransformcolumnPosition - the column position in this layer
public int getRowCount()
getRowCount in interface ILayergetRowCount in class AbstractIndexLayerTransformpublic int getPreferredRowCount()
getPreferredRowCount in interface ILayergetPreferredRowCount in class AbstractIndexLayerTransformpublic int getRowIndexByPosition(int rowPosition)
ILayer
getRowIndexByPosition in interface ILayergetRowIndexByPosition in class AbstractIndexLayerTransformrowPosition - a row position relative to this coordinate model
public int getRowPositionByIndex(int rowIndex)
getRowPositionByIndex in interface IUniqueIndexLayergetRowPositionByIndex in class AbstractIndexLayerTransformpublic int localToUnderlyingRowPosition(int localRowPosition)
localToUnderlyingRowPosition in interface ILayerlocalToUnderlyingRowPosition in class AbstractIndexLayerTransform
public int underlyingToLocalRowPosition(ILayer sourceUnderlyingLayer,
int underlyingRowPosition)
underlyingToLocalRowPosition in interface ILayerunderlyingToLocalRowPosition in class AbstractIndexLayerTransformpublic int getHeight()
ILayer
getHeight in interface ILayergetHeight in class AbstractIndexLayerTransformpublic int getPreferredHeight()
getPreferredHeight in interface ILayergetPreferredHeight in class AbstractIndexLayerTransformpublic int getRowHeightByPosition(int rowPosition)
ILayer
getRowHeightByPosition in interface ILayergetRowHeightByPosition in class AbstractIndexLayerTransformrowPosition - the row position in this layer
public boolean isRowPositionResizable(int rowPosition)
isRowPositionResizable in interface ILayerisRowPositionResizable in class AbstractIndexLayerTransformpublic int getRowPositionByY(int y)
ILayer
getRowPositionByY in interface ILayergetRowPositionByY in class AbstractIndexLayerTransformy - a vertical pixel location relative to the pixel boundary of this layer
public int getStartYOfRowPosition(int rowPosition)
ILayer
getStartYOfRowPosition in interface ILayergetStartYOfRowPosition in class AbstractIndexLayerTransformrowPosition - the row position in this layer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||