Top Description Inners Fields Constructors Methods
javax.swing.plaf.synth

public Class SynthTreeUI

extends BasicTreeUI
implements PropertyChangeListener, SynthUI
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.synth.SynthUI, javax.swing.plaf.synth.SynthConstants, java.beans.PropertyChangeListener, java.util.EventListener
Imports
java.awt.Color, .Component, .Graphics, .Insets, .Rectangle, java.beans.PropertyChangeEvent, .PropertyChangeListener, java.util.Enumeration, javax.swing.DefaultCellEditor, .Icon, .JComponent, .JTextField, .JTree, .LookAndFeel, javax.swing.plaf.ComponentUI, .UIResource, javax.swing.plaf.basic.BasicTreeUI, javax.swing.tree.DefaultTreeCellEditor, .DefaultTreeCellRenderer, .TreeCellEditor, .TreeCellRenderer, .TreeModel, .TreePath

Provides the Synth L&F UI delegate for javax.swing.JTree.
Author
Scott Violet
Since
1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class
private class
SynthTreeUI.SynthTreeCellRenderer

A subclass of DefaultTreeCellRenderer that implements UIResource.

Field Summary

Modifier and TypeField and Description
private SynthStyle
private boolean
private boolean
private Icon
private Object
private int
private SynthContext
private SynthStyle
private boolean
Inherited from javax.swing.plaf.basic.BasicTreeUI:
cellEditorcollapsedIconcreatedCellEditorcreatedRenderercurrentCellRendererdepthOffsetdrawingCacheeditingComponenteditingPatheditingRoweditorHasDifferentSizeexpandedIconlargeModellastSelectedRowleftChildIndentnodeDimensionspreferredMinSizepreferredSizerendererPanerightChildIndentstopEditingInCompleteEditingtotalChildIndenttreetreeModeltreeSelectionModeltreeStatevalidCachedPreferredSize

Constructor Summary

AccessConstructor and Description
public
SynthTreeUI()

Constructs a SynthTreeUI.

Method Summary

Modifier and TypeMethod and Description
private void
protected TreeCellEditor
protected TreeCellRenderer
createDefaultCellRenderer()

Overrides javax.swing.plaf.basic.BasicTreeUI.createDefaultCellRenderer.

Returns the default cell renderer that is used to do the stamping of each node.
public static ComponentUI

Returns:

the UI object
createUI
(JComponent
component to create UI object for
x
)

Hides javax.swing.plaf.basic.BasicTreeUI.createUI.

Creates a new UI object for the given component.
protected void
drawCentered(Component
a component
c
,
Graphics
a graphics context
graphics
,
Icon
an icon
icon
,
int
an X coordinate
x
,
int
an Y coordinate
y
)

Overrides javax.swing.plaf.basic.BasicTreeUI.drawCentered.

Draws the icon centered at (x,y).
private int
private int
public SynthContext
getContext(JComponent
Component requesting SynthContext.
c
)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.
private SynthContext
getContext(JComponent c, int state)

private SynthContext
private SynthContext
getContext(JComponent c, Region region, int state)

public Icon
protected int
getRowX(int
Row to return x location for
row
,
int
Depth of the row
depth
)

Overrides javax.swing.plaf.basic.BasicTreeUI.getRowX.

Returns the location, along the x-axis, to render a particular row at.
protected void
protected void
public void
paint(Graphics
the Graphics object used for painting
g
,
JComponent
the component being painted
c
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paint.

Paints the specified component according to the Look and Feel.
protected void
paint(SynthContext
context for the component being painted
context
,
Graphics
the Graphics object used for painting
g
)

Paints the specified component.

public void
paintBorder(SynthContext
a component context
context
,
Graphics
Graphics to paint on
g
,
int
the X coordinate
x
,
int
the Y coordinate
y
,
int
width of the border
w
,
int
height of the border
h
)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.
protected void
paintDropLine(Graphics
Graphics object to draw on
g
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintDropLine.

Paints the drop line.
protected void
paintExpandControl(Graphics
a graphics context
g
,
Rectangle
a clipped rectangle
clipBounds
,
Insets
insets
insets
,
Rectangle
a bounding rectangle
bounds
,
TreePath
a tree path
path
,
int
a row
row
,
boolean
true if the path is expanded
isExpanded
,
boolean
true if the path has been expanded
hasBeenExpanded
,
boolean
true if the row is leaf
isLeaf
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintExpandControl.

Paints the expand (toggle) part of a row.
protected void
paintHorizontalLine(Graphics
a graphics context
g
,
JComponent
a component
c
,
int
an Y coordinate
y
,
int
an X1 coordinate
left
,
int
an X2 coordinate
right
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintHorizontalLine.

Paints a horizontal line.
protected void
paintHorizontalPartOfLeg(Graphics
a graphics context
g
,
Rectangle
a clipped rectangle
clipBounds
,
Insets
insets
insets
,
Rectangle
a bounding rectangle
bounds
,
TreePath
a tree path
path
,
int
a row
row
,
boolean
true if the path is expanded
isExpanded
,
boolean
true if the path has been expanded
hasBeenExpanded
,
boolean
true if the path is leaf
isLeaf
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintHorizontalPartOfLeg.

Paints the horizontal part of the leg.
private void
paintRow(TreeCellRenderer renderer, DefaultTreeCellRenderer dtcr, SynthContext treeContext, SynthContext cellContext, Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, Rectangle rowBounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)

protected void
paintVerticalLine(Graphics
a graphics context
g
,
JComponent
a component
c
,
int
an X coordinate
x
,
int
an Y1 coordinate
top
,
int
an Y2 coordinate
bottom
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintVerticalLine.

Paints a vertical line.
protected void
paintVerticalPartOfLeg(Graphics
a graphics context
g
,
Rectangle
a clipped rectangle
clipBounds
,
Insets
insets
insets
,
TreePath
a tree path
path
)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintVerticalPartOfLeg.

Paints the vertical part of the leg.
public void
propertyChange(PropertyChangeEvent
A PropertyChangeEvent object describing the event source and the property that has changed.
event
)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.
private void
protected void
protected void
public void
update(Graphics
the Graphics object used for painting
g
,
JComponent
the component being painted
c
)

Overrides javax.swing.plaf.ComponentUI.update.

Notifies this UI delegate to repaint the specified component.
private void
Inherited from javax.swing.plaf.basic.BasicTreeUI:
cancelEditingcheckForClickInExpandControlcompleteEditingcompleteEditingcompleteUIInstallcompleteUIUninstallconfigureLayoutCachecreateCellEditorListenercreateCellRendererPanecreateComponentListenercreateFocusListenercreateKeyListenercreateLayoutCachecreateMouseListenercreateNodeDimensionscreatePropertyChangeListenercreateSelectionModelPropertyChangeListenercreateTreeExpansionListenercreateTreeModelListenercreateTreeSelectionListenerdrawDashedHorizontalLinedrawDashedVerticalLineensureRowsAreVisiblegetBaselinegetBaselineResizeBehaviorgetCellEditorgetCellRenderergetClosestPathForLocationgetCollapsedIcongetDropLineRectgetEditingPathgetHashColorgetHorizontalLegBuffergetLastChildPathgetLeadSelectionRowgetLeftChildIndentgetMaximumSizegetMinimumSizegetModelgetPathBoundsgetPathForRowgetPreferredMinSizegetPreferredSizegetPreferredSizegetRightChildIndentgetRowCountgetRowForPathgetRowHeightgetSelectionModelgetShowsRootHandlesgetVerticalLegBufferhandleExpandControlClickinstallComponentsinstallKeyboardActionsinstallUIisDropLineisEditableisEditingisLargeModelisLeafisLocationInExpandControlisMultiSelectEventisRootVisibleisToggleEventisToggleSelectionEventpaintRowpathWasCollapsedpathWasExpandedprepareForUIInstallprepareForUIUninstallselectPathForEventsetCellEditorsetCellRenderersetCollapsedIconsetEditablesetExpandedIconsetHashColorsetLargeModelsetLeftChildIndentsetModelsetPreferredMinSizesetRightChildIndentsetRootVisiblesetRowHeightsetSelectionModelsetShowsRootHandlesshouldPaintExpandControlstartEditingstartEditingAtPathstopEditingtoggleExpandStateuninstallComponentsuninstallKeyboardActionsuninstallUIupdateCachedPreferredSizeupdateCellEditorupdateDepthOffsetupdateExpandedDescendantsupdateLayoutCacheExpandedNodesupdateLeadSelectionRowupdateRendererupdateSize