|
EchoPoint 2.1.0rc5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TreeCellRenderer
The TreeCellRender is responsible for returning Components
used to render a Tree node. In the most general form the
getTreeCellRendererText method will be called to return a
LabelEx component that contains the tree node's :
A more specific case is when a Component is to be returned as the Tree cell.
In this case the getTreeCellRendererComponent method will be
called to provide the component for the Tree cell.
| Method Summary | |
|---|---|
Component |
getTreeCellRendererComponent(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
Returns a Component that will be rendered as a Tree cell. |
Label |
getTreeCellRendererText(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
Returns a LabelEx that will be used to render a Tree cell. |
XhtmlFragment |
getTreeCellRendererXhtml(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
Returns a XhtmlFragment that will be rendered as a Tree
cell. |
| Method Detail |
|---|
Component getTreeCellRendererComponent(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
If selected is true, the cell will be drawn as if
selected. If expanded is true the node is currently
expanded and if leaf is true the node represets a leaf
tree is the Tree the receiver is being configured for.
This method is called second by the tree rendering code, and only after the getTreeCellRendererText method has returned null.
The returned Component MUST be a unqiue Component since it will be rendered as the Tree cell.
Label getTreeCellRendererText(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
If selected is true, the cell will be drawn as if
selected. If expanded is true the node is currently
expanded and if leaf is true the node represets a leaf
tree is the Tree the receiver is being configured for.
This method is called first by the tree rendering code. If this returns null, then the getTreeCellRendererComponent method is then invoked.
The returned LabelEx does NOT have to be a unique Component
since only the public values of the LabelEx are used by the the Tree
rendering code. Therefore it does NOT have to be a Component in the Echo
hierarchy nor does it have to be a unique LabelEx object.
You could return the same LabelEx object back each time this method is called, only changing the background, forground, font and icon as appropriate.
Returns the LabelEx that is used to draw the Tree cell.
XhtmlFragment getTreeCellRendererXhtml(Tree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf)
XhtmlFragment that will be rendered as a Tree
cell.
If selected is true, the cell will be drawn as if
selected. If expanded is true the node is currently
expanded and if leaf is true the node represets a leaf
tree is the Tree the receiver is being
configured for.
This method is called third by the Tree rendering code, and only after the getTreeCellRendererText and getTreeCellRendererComponent method have returned null.
|
EchoPoint 2.1.0rc5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||