Top Fields Constructors Methods
sun.tools.jconsole.inspector

public Class XTreeRenderer

extends DefaultTreeCellRenderer
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.awt.Component, javax.swing.ImageIcon, .JTree, javax.swing.tree.DefaultMutableTreeNode, .DefaultTreeCellRenderer

Field Summary

Inherited from javax.swing.tree.DefaultTreeCellRenderer:
backgroundNonSelectionColorbackgroundSelectionColorborderSelectionColorclosedIconhasFocusleafIconopenIconselectedtextNonSelectionColortextSelectionColor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Component
getTreeCellRendererComponent(JTree
the receiver is being configured for
tree
,
Object
the value to render
value
,
boolean
whether node is selected
selected
,
boolean
whether node is expanded
expanded
,
boolean
whether node is a lead node
leaf
,
int
row index
row
,
boolean
whether node has focus
hasFocus
)

Overrides javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent.

Implements javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

Configures the renderer based on the passed in components.
Inherited from javax.swing.tree.DefaultTreeCellRenderer:
firePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangefirePropertyChangegetBackgroundNonSelectionColorgetBackgroundSelectionColorgetBorderSelectionColorgetClosedIcongetDefaultClosedIcongetDefaultLeafIcongetDefaultOpenIcongetFontgetLeafIcongetOpenIcongetPreferredSizegetTextNonSelectionColorgetTextSelectionColorinvalidatepaintrepaintrepaintrepaintrevalidatesetBackgroundsetBackgroundNonSelectionColorsetBackgroundSelectionColorsetBorderSelectionColorsetClosedIconsetFontsetLeafIconsetOpenIconsetTextNonSelectionColorsetTextSelectionColorupdateUIvalidate

Constructor Detail

XTreeRendererback to summary
public XTreeRenderer()

Method Detail

getTreeCellRendererComponentback to summary
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)

Overrides javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent.

Implements javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

Doc from javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent.

Configures the renderer based on the passed in components. The value is set from messaging the tree with convertValueToText, which ultimately invokes toString on value. The foreground color is set based on the selection and the icon is set based on the leaf and expanded parameters.

Parameters
tree:JTree

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

the receiver is being configured for

value:Object

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

the value to render

selected:boolean

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

whether node is selected

expanded:boolean

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

whether node is expanded

leaf:boolean

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

whether node is a lead node

row:int

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

row index

hasFocus:boolean

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

whether node has focus

Returns:Component

Doc from javax.swing.tree.TreeCellRenderer.getTreeCellRendererComponent.

the Component that the renderer uses to draw the value