public class IlpTreeCellRenderer extends Object implements TreeCellRenderer
IlpTreeNode object.
This tree cell renderer uses the following property:class indicates which JComponent or
IlvGraphic to use to graphically represent the
tree node.When the class property is not defined, the rendering is done by
a default renderer, that depends on the business object being represented.
Business objects are represented using a default renderer, that
creates a Swing JLabel customized with the following properties:
labelVisible
label
labelFont
labelForeground
labelBackground
labelPosition
labelSpacing
iconVisible
icon
overlapIconVisible
overlapIcon
toolTipText
focusBorderColor
focusBorderWidth
Predefined business objects have their icon representation generated based on the tiny object representation. The tiny representation can be configured by a set of CSS properties. Please refer to the User's Documentation for the list of properties of each predefined business object.
The default tree cell renderer is also able to render the object selection
and focus state according to the value of property selectionFocusMode.
The possible values for this property are:
IlpSelectionFocusMode.LABEL_SELECTION_FOCUS_MODE: displays
a selection border around the label.
IlpSelectionFocusMode.CELL_SELECTION_FOCUS_MODE: displays
a selection border around the cell.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
OPTIMIZE
Indicates this cell renderer to optimize the rendering of a tree
node by checking if it is still needed or not, for instance, if
the node has been already removed from the tree model.
|
| Constructor and Description |
|---|
IlpTreeCellRenderer()
Creates a default tree cell renderer.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
Calculates the representation of a tree node.
|
public static boolean OPTIMIZE
public IlpTreeCellRenderer()
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
getTreeCellRendererComponent in interface TreeCellRenderertree - The tree in which the cell is drawn.value - The TreeNode object that will be represented in the cell.selected - true if the node is selected, false
if the node is not selected.expanded - true if the node is expanded, false
if the node is collapsed.leaf - true if the node is a leaf node, false
if the node is an interior node between root and leaf.row - The number of the line where the tree cell is, when the tree is
seen as a list with one cell on each line.hasFocus - true if the node has focus, false
if the node does not have focus.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.