APIdia Launch Partner
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, .JToolTip, .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 JToolTip
createToolTip()

Overrides javax.swing.JComponent.createToolTip.

Returns the instance of JToolTip that should be used to display the tooltip.

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.

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

createToolTipback to summary
public JToolTip createToolTip()

Overrides javax.swing.JComponent.createToolTip.

Doc from javax.swing.JComponent.createToolTip.

Returns the instance of JToolTip that should be used to display the tooltip. Components typically would not override this method, but it can be used to cause different tooltips to be displayed differently.

Annotations
@Override
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.