public interface ITreeTableRowHeaderRenderer extends IRowHeaderRenderer<TreeTableRowHeader>
TreeTableRowHeader
component. This interface
adds another method used to determine where the user has to click in order to
toggle the expansion state of a row. The renderer should display some kind of
toggle icon at that location.TreeTableRowHeader
,
AbstractRowHeader.setRowHeaderRenderer(Class, IRowHeaderRenderer)
,
ITreeTableModel.getRowHeaderValue(Object)
Modifier and Type | Method and Description |
---|---|
Rectangle |
getRowHeaderToggleBounds(TreeTableRowHeader header,
int x,
int y,
int width,
int height)
Returns the bounds of the toggle used for expanding and collapsing the
hierarchy / tree table node.
|
boolean |
isDisplayedAsLeaf(ITreeTableModel model,
Object node)
Determines whether the given node will be displayed as a leaf or not.
|
getRowHeaderRendererComponent
Rectangle getRowHeaderToggleBounds(TreeTableRowHeader header, int x, int y, int width, int height)
header
- the row header componentx
- the x-coordinate where the header will be renderedy
- the y-coordinate where the header will be renderedwidth
- the width of the headerheight
- the height of the headerboolean isDisplayedAsLeaf(ITreeTableModel model, Object node)
DefaultTreeTableRowHeaderRenderer
calls
TreeModel.isLeaf(Object)
. Subclasses can choose to change this
behaviour by, for example, changing the code to check the child count of
the node. This way the expansion icon could be configured to only show up
if the tree node actually does have at least one child.model
- the tree model to which the node belongsnode
- the tree node to checkCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.