|
org.openide.explorer 6.5.22 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.explorer.view.NodeRenderer
public class NodeRenderer
Default renderer for nodes. Can paint either Nodes directly or can be used to paint objects produced by NodeTreeModel, etc.
Node
Constructor Summary | |
---|---|
NodeRenderer()
Creates default renderer. |
|
NodeRenderer(boolean bigIcons)
Deprecated. bigIcons was only used by IconView, and not used by that anymore. NodeRenderer will automatically detect if the view it's rendering for is an instance of IconView. |
Method Summary | |
---|---|
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean sel,
boolean cellHasFocus)
This is the only method defined by ListCellRenderer . |
Component |
getTreeCellRendererComponent(JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
Finds the component that is capable of drawing the cell in a tree. |
static NodeRenderer |
sharedInstance()
Deprecated. This method no longer returns a shared instance, as it caused problems with one view setting properties (such as enabled state) on the renderer and the renderer then being used in its altered state by a different view. Views should create their own instance of NodeRenderer instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeRenderer()
public NodeRenderer(boolean bigIcons)
bigIcons
- use big icons if possibleMethod Detail |
---|
public static NodeRenderer sharedInstance()
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
getTreeCellRendererComponent
in interface TreeCellRenderer
value
- value can be either Node
or a VisualizerNode
.
public Component getListCellRendererComponent(JList list, Object value, int index, boolean sel, boolean cellHasFocus)
ListCellRenderer
. We just
reconfigure the Jlabel
each time we're called.
getListCellRendererComponent
in interface ListCellRenderer
|
org.openide.explorer 6.5.22 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |