|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.nebula.widgets.nattable.layer.AbstractLayer org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform org.eclipse.nebula.widgets.nattable.hideshow.AbstractRowHideShowLayer org.eclipse.nebula.widgets.nattable.tree.TreeLayer
public class TreeLayer
Field Summary | |
---|---|
static String |
TREE_COLUMN_CELL
|
static int |
TREE_COLUMN_NUMBER
|
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 | |
---|---|
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. |
Method Summary | |
---|---|
void |
collapseAll()
Collapses all tree nodes in the tree. |
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 |
expandAll()
Expands all tree nodes in the tree. |
void |
expandAllToLevel(int level)
Expands all tree nodes in the tree to a certain level. |
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. |
void |
expandTreeRowToLevel(int parentIndex,
int level)
Expands the tree node for the given row index in the tree to a certain level. |
ICellPainter |
getCellPainter(int columnPosition,
int rowPosition,
ILayerCell cell,
IConfigRegistry configRegistry)
|
LabelStack |
getConfigLabelsByPosition(int columnPosition,
int rowPosition)
|
Collection<Integer> |
getHiddenRowIndexes()
Will collect and return all indexes of the rows that are hidden in this layer. |
IndentedTreeImagePainter |
getIndentedTreeImagePainter()
Deprecated. since 1.1 the configured TreeImagePainter should be used instead of the hard referenced one |
ITreeRowModel<?> |
getModel()
|
ICellPainter |
getTreeImagePainter()
Deprecated. since 1.1 the configured TreeImagePainter should be used instead of the hard referenced one |
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. |
boolean |
isUseTreeColumnIndex()
|
void |
setUseTreeColumnIndex(boolean useTreeColumnIndex)
Configure whether (column index == 0) or (column position == 0) should be performed to identify the tree column. |
Methods inherited from class org.eclipse.nebula.widgets.nattable.hideshow.AbstractRowHideShowLayer |
---|
cacheVisibleRowIndexes, getColumnPositionByIndex, getHeight, getRowCount, getRowIndexByPosition, getRowPositionByIndex, getRowPositionByY, getRowPositionsByIndexes, getStartYOfRowPosition, handleLayerEvent, invalidateCache, localToUnderlyingRowPosition, underlyingToLocalRowPosition, underlyingToLocalRowPositions |
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer |
---|
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, 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.persistence.IPersistable |
---|
loadState, saveState |
Field Detail |
---|
public static final String TREE_COLUMN_CELL
public static final int TREE_COLUMN_NUMBER
Constructor Detail |
---|
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.Method Detail |
---|
public LabelStack getConfigLabelsByPosition(int columnPosition, int rowPosition)
getConfigLabelsByPosition
in interface ILayer
getConfigLabelsByPosition
in class AbstractLayerTransform
public ITreeRowModel<?> getModel()
@Deprecated public IndentedTreeImagePainter getIndentedTreeImagePainter()
@Deprecated 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 collapseAll()
public void expandTreeRow(int parentIndex)
parentIndex
- The index of the row that shows the node that should be
expandedpublic void expandTreeRowToLevel(int parentIndex, int level)
parentIndex
- The index of the row that shows the node that should be
expandedlevel
- The level to which the tree node should be expanded.public void expandAll()
public void expandAllToLevel(int level)
level
- The level to which the tree node should be expanded.public boolean doCommand(ILayerCommand command)
ILayer
ILayerCommand.convertToTargetLayer(ILayer)
doCommand
in interface ILayer
doCommand
in class AbstractLayerTransform
command
- the command to perform
protected boolean handleRowHideCommand(RowHideCommand command)
command
- The RowHideCommand
to process
true
if the command has been handled,
false
otherwiseprotected boolean handleMultiRowHideCommand(MultiRowHideCommand command)
command
- The MultiRowHideCommand
to process
true
if the command has been handled,
false
otherwisepublic boolean isUseTreeColumnIndex()
true
if the column index is used to determine the
tree column, false
if the column position is used.
Default is false
.public void setUseTreeColumnIndex(boolean useTreeColumnIndex)
useTreeColumnIndex
- true
if the column index should be used to
determine the tree column, false
if the column
position should be used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |