|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jzeno.echo.components.DynaTreeCellRenderer
public class DynaTreeCellRenderer
Nested Class Summary | |
---|---|
static class |
DynaTreeCellRenderer.CacheEntry
|
Constructor Summary | |
---|---|
DynaTreeCellRenderer()
|
Method Summary | |
---|---|
void |
clearCache()
|
Component |
getTreeCellRendererComponent(Tree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf)
Returns a Component that will be rendered as a Tree cell. |
Label |
getTreeCellRendererText(Tree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf)
Returns a Label that will be used to render a Tree cell. |
void |
setModel(DynaTreeModel model)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynaTreeCellRenderer()
Method Detail |
---|
public void setModel(DynaTreeModel model)
public Component getTreeCellRendererComponent(Tree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf)
TreeCellRenderer
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.
getTreeCellRendererComponent
in interface TreeCellRenderer
public Label getTreeCellRendererText(Tree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf)
TreeCellRenderer
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 Label does NOT have to be a unqiue Component since only the public values of the Label are used by the the Tree rendering code. Therefore it does NOT have to be a Component in the Echo heirarchy nor does it have to be a unique Label object.
You could return the same Label object back each time this method is called, only changing the background, forground, font and icon as appropriate.
Returns the Label that is used to draw the Tree cell.
getTreeCellRendererText
in interface TreeCellRenderer
public void clearCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |