public class DimensionallyDependentIndexLayer extends AbstractIndexLayerTransform
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.commandHandlers, eventHandlers, eventHelperLock, layerPainterDOT, VALUE_SEPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer)
Creates a new DimensionallyDependentIndexLayer.
|
|
DimensionallyDependentIndexLayer(IUniqueIndexLayer baseLayer,
IUniqueIndexLayer horizontalLayerDependency,
IUniqueIndexLayer verticalLayerDependency)
Creates a new DimensionallyDependentIndexLayer.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
configure, dispose, getCellByPosition, getCellPainter, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getRegionLabelsByXY, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, isDynamicSizeLayer, loadState, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPositions, underlyingToLocalRowPositionsaddConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getProvidedLabels, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLayerListener, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, hasLayerListener, registerCommandHandler, registerPersistable, removeLayerListener, unregisterCommandHandler, unregisterPersistablehandleLayerEventpublic 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 layerprotected 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 performpublic int getColumnCount()
getColumnCount in interface ILayergetColumnCount in class AbstractIndexLayerTransformpublic int getPreferredColumnCount()
getPreferredColumnCount in interface ILayergetPreferredColumnCount in class AbstractIndexLayerTransformpublic int getColumnIndexByPosition(int columnPosition)
ILayergetColumnIndexByPosition in interface ILayergetColumnIndexByPosition in class AbstractIndexLayerTransformcolumnPosition - a column position relative to this coordinate modelpublic int getColumnPositionByIndex(int columnIndex)
getColumnPositionByIndex in interface IUniqueIndexLayergetColumnPositionByIndex in class AbstractIndexLayerTransformpublic int localToUnderlyingColumnPosition(int localColumnPosition)
ILayerlocalToUnderlyingColumnPosition in interface ILayerlocalToUnderlyingColumnPosition in class AbstractIndexLayerTransformlocalColumnPosition - column position in local (the layer's own) coordinatespublic int underlyingToLocalColumnPosition(ILayer sourceUnderlyingLayer, int underlyingColumnPosition)
underlyingToLocalColumnPosition in interface ILayerunderlyingToLocalColumnPosition in class AbstractIndexLayerTransformpublic int getWidth()
ILayergetWidth in interface ILayergetWidth in class AbstractIndexLayerTransformpublic int getPreferredWidth()
getPreferredWidth in interface ILayergetPreferredWidth in class AbstractIndexLayerTransformpublic int getColumnWidthByPosition(int columnPosition)
ILayergetColumnWidthByPosition in interface ILayergetColumnWidthByPosition in class AbstractIndexLayerTransformcolumnPosition - the column position in this layerpublic boolean isColumnPositionResizable(int columnPosition)
isColumnPositionResizable in interface ILayerisColumnPositionResizable in class AbstractIndexLayerTransformpublic int getColumnPositionByX(int x)
ILayergetColumnPositionByX in interface ILayergetColumnPositionByX in class AbstractIndexLayerTransformx - a horizontal pixel location relative to the pixel boundary of
this layerpublic int getStartXOfColumnPosition(int columnPosition)
ILayergetStartXOfColumnPosition in interface ILayergetStartXOfColumnPosition in class AbstractIndexLayerTransformcolumnPosition - the column position in this layerpublic int getRowCount()
getRowCount in interface ILayergetRowCount in class AbstractIndexLayerTransformpublic int getPreferredRowCount()
getPreferredRowCount in interface ILayergetPreferredRowCount in class AbstractIndexLayerTransformpublic int getRowIndexByPosition(int rowPosition)
ILayergetRowIndexByPosition in interface ILayergetRowIndexByPosition in class AbstractIndexLayerTransformrowPosition - a row position relative to this coordinate modelpublic int getRowPositionByIndex(int rowIndex)
getRowPositionByIndex in interface IUniqueIndexLayergetRowPositionByIndex in class AbstractIndexLayerTransformpublic int localToUnderlyingRowPosition(int localRowPosition)
localToUnderlyingRowPosition in interface ILayerlocalToUnderlyingRowPosition in class AbstractIndexLayerTransformpublic int underlyingToLocalRowPosition(ILayer sourceUnderlyingLayer, int underlyingRowPosition)
underlyingToLocalRowPosition in interface ILayerunderlyingToLocalRowPosition in class AbstractIndexLayerTransformpublic int getHeight()
ILayergetHeight in interface ILayergetHeight in class AbstractIndexLayerTransformpublic int getPreferredHeight()
getPreferredHeight in interface ILayergetPreferredHeight in class AbstractIndexLayerTransformpublic int getRowHeightByPosition(int rowPosition)
ILayergetRowHeightByPosition in interface ILayergetRowHeightByPosition in class AbstractIndexLayerTransformrowPosition - the row position in this layerpublic boolean isRowPositionResizable(int rowPosition)
isRowPositionResizable in interface ILayerisRowPositionResizable in class AbstractIndexLayerTransformpublic int getRowPositionByY(int y)
ILayergetRowPositionByY in interface ILayergetRowPositionByY in class AbstractIndexLayerTransformy - a vertical pixel location relative to the pixel boundary of
this layerpublic int getStartYOfRowPosition(int rowPosition)
ILayergetStartYOfRowPosition in interface ILayergetStartYOfRowPosition in class AbstractIndexLayerTransformrowPosition - the row position in this layerCopyright © 2017. All rights reserved.