ListCellRenderer
, TreeCellRenderer
public class NodeRenderer extends Object implements TreeCellRenderer, ListCellRenderer
Node
Constructor | Description |
---|---|
NodeRenderer() |
Creates default renderer.
|
NodeRenderer(boolean bigIcons) |
Deprecated.
bigIcons was only used by IconView, and not used by that
anymore.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
boolean |
isShowIcons() |
|
void |
setShowIcons(boolean showIcons) |
|
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.
|
public NodeRenderer()
@Deprecated public NodeRenderer(boolean bigIcons)
bigIcons
- use big icons if possible@Deprecated public static NodeRenderer sharedInstance()
public final void setShowIcons(boolean showIcons)
public final boolean isShowIcons()
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
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.