public class TreeLayer extends AbstractRowHideShowLayer
Modifier and Type | Field and Description |
---|---|
static String |
TREE_COLUMN_CELL |
static int |
TREE_COLUMN_NUMBER |
underlyingLayer
layerPainter
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
TreeLayer(IUniqueIndexLayer underlyingLayer,
ITreeRowModel<?> treeRowModel)
Creates a TreeLayer instance based on the given information.
|
TreeLayer(IUniqueIndexLayer underlyingLayer,
ITreeRowModel<?> treeRowModel,
boolean useDefaultConfiguration)
Creates a TreeLayer instance based on the given information.
|
TreeLayer(IUniqueIndexLayer underlyingLayer,
ITreeRowModel<?> treeRowModel,
IndentedTreeImagePainter indentedTreeImagePainter)
Creates a TreeLayer instance based on the given information.
|
TreeLayer(IUniqueIndexLayer underlyingLayer,
ITreeRowModel<?> treeRowModel,
IndentedTreeImagePainter indentedTreeImagePainter,
boolean useDefaultConfiguration)
Creates a TreeLayer instance based on the given information.
|
Modifier and Type | Method and Description |
---|---|
void |
collapseTreeRow(int parentIndex)
Collapses the tree node for the given row index.
|
boolean |
doCommand(ILayerCommand command)
Opportunity to respond to a command as it flows down the stack.
|
void |
expandOrCollapseIndex(int parentIndex)
Performs an expand/collapse action dependent on the current state of the tree node
at the given row index.
|
void |
expandTreeRow(int parentIndex)
Expands the tree node for the given row index.
|
ICellPainter |
getCellPainter(int columnPosition,
int rowPosition,
ILayerCell cell,
IConfigRegistry configRegistry) |
Collection<Integer> |
getHiddenRowIndexes()
Will collect and return all indexes of the rows that are hidden in this layer.
|
IndentedTreeImagePainter |
getIndentedTreeImagePainter() |
ITreeRowModel<?> |
getModel() |
ICellPainter |
getTreeImagePainter() |
protected boolean |
handleMultiRowHideCommand(MultiRowHideCommand command)
Checks if the given command tries to hide rows that are nodes that are not collapsed and have children.
|
protected boolean |
handleRowHideCommand(RowHideCommand command)
Checks if the given command tries to hide a row that is a node that is not collapsed and has children.
|
boolean |
isRowIndexHidden(int rowIndex)
Will check if the row at the specified index is hidden or not.
|
cacheVisibleRowIndexes, getColumnPositionByIndex, getHeight, getRowCount, getRowIndexByPosition, getRowPositionByIndex, getRowPositionByY, getRowPositionsByIndexes, getStartYOfRowPosition, handleLayerEvent, invalidateCache, localToUnderlyingRowPosition, underlyingToLocalRowPosition, underlyingToLocalRowPositions
configure, dispose, getCellByPosition, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowHeightByPosition, getStartXOfColumnPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPositionResizable, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterPersistable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLayerListener, configure, dispose, fireLayerEvent, getBoundsByPosition, getCellByPosition, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowHeightByPosition, getStartXOfColumnPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, hasLayerListener, isColumnPositionResizable, isRowPositionResizable, localToUnderlyingColumnPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, unregisterCommandHandler, unregisterPersistable
loadState, saveState
public static final String TREE_COLUMN_CELL
public static final int TREE_COLUMN_NUMBER
public TreeLayer(IUniqueIndexLayer underlyingLayer, ITreeRowModel<?> treeRowModel)
underlyingLayer
- The underlying layer on whose top this layer will be set.treeRowModel
- The ITreeRowModelListener that is used to get information about the tree structure.public TreeLayer(IUniqueIndexLayer underlyingLayer, ITreeRowModel<?> treeRowModel, IndentedTreeImagePainter indentedTreeImagePainter)
underlyingLayer
- The underlying layer on whose top this layer will be set.treeRowModel
- The ITreeRowModelListener that is used to get information about the tree structure.indentedTreeImagePainter
- The IndentedTreeImagePainter that paints indentation to the left of the
configured base painter and icons for expand/collapse if possible, to render tree structure accordingly.public TreeLayer(IUniqueIndexLayer underlyingLayer, ITreeRowModel<?> treeRowModel, boolean useDefaultConfiguration)
underlyingLayer
- The underlying layer on whose top this layer will be set.treeRowModel
- The ITreeRowModelListener that is used to get information about the tree structure.useDefaultConfiguration
- true
to use the DefaultTreeLayerConfiguration, false
if you want to specify your own configuration.public TreeLayer(IUniqueIndexLayer underlyingLayer, ITreeRowModel<?> treeRowModel, IndentedTreeImagePainter indentedTreeImagePainter, boolean useDefaultConfiguration)
underlyingLayer
- The underlying layer on whose top this layer will be set.treeRowModel
- The ITreeRowModelListener that is used to get information about the tree structure.indentedTreeImagePainter
- The IndentedTreeImagePainter that paints indentation to the left of the
configured base painter and icons for expand/collapse if possible, to render tree structure accordingly.useDefaultConfiguration
- true
to use the DefaultTreeLayerConfiguration, false
if you want to specify your own configuration.public ITreeRowModel<?> getModel()
public IndentedTreeImagePainter getIndentedTreeImagePainter()
public ICellPainter getTreeImagePainter()
null
if set explicitly to the IndentedTreeImagePainter!public ICellPainter getCellPainter(int columnPosition, int rowPosition, ILayerCell cell, IConfigRegistry configRegistry)
getCellPainter
in interface ILayer
getCellPainter
in class AbstractLayerTransform
public boolean isRowIndexHidden(int rowIndex)
AbstractRowHideShowLayer
isRowIndexHidden
in class AbstractRowHideShowLayer
rowIndex
- The row index of the row whose visibility state
should be checked.true
if the row at the specified index is hidden,
false
if it is visible.public Collection<Integer> getHiddenRowIndexes()
AbstractRowHideShowLayer
getHiddenRowIndexes
in class AbstractRowHideShowLayer
public void expandOrCollapseIndex(int parentIndex)
parentIndex
- The index of the row that shows the tree node for which the
expand/collapse action should be performed.public void collapseTreeRow(int parentIndex)
parentIndex
- The index of the row that shows the node that should be collapsedpublic void expandTreeRow(int parentIndex)
parentIndex
- The index of the row that shows the node that should be expandedpublic boolean doCommand(ILayerCommand command)
ILayer
ILayerCommand.convertToTargetLayer(ILayer)
doCommand
in interface ILayer
doCommand
in class AbstractLayerTransform
command
- the command to performprotected boolean handleRowHideCommand(RowHideCommand command)
command
- The RowHideCommand
to processtrue
if the command has been handled, false
otherwiseprotected boolean handleMultiRowHideCommand(MultiRowHideCommand command)
command
- The MultiRowHideCommand
to processtrue
if the command has been handled, false
otherwiseCopyright © 2013. All Rights Reserved.