public class SynthTreeUI extends BasicTreeUIimplements PropertyChangeListener , SynthUI
JTree.
BasicTreeUI.CellEditorHandler , BasicTreeUI.ComponentHandler , BasicTreeUI.FocusHandler , BasicTreeUI.KeyHandler , BasicTreeUI.MouseHandler , BasicTreeUI.MouseInputHandler , BasicTreeUI.NodeDimensionsHandler , BasicTreeUI.PropertyChangeHandler , BasicTreeUI.SelectionModelPropertyChangeHandler , BasicTreeUI.TreeCancelEditingAction , BasicTreeUI.TreeExpansionHandler , BasicTreeUI.TreeHomeAction , BasicTreeUI.TreeIncrementAction , BasicTreeUI.TreeModelHandler , BasicTreeUI.TreePageAction , BasicTreeUI.TreeSelectionHandler , BasicTreeUI.TreeToggleAction , BasicTreeUI.TreeTraverseAction cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSizeDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthTreeUI()
|
| Modifier and Type | Method and Description |
|---|---|
protected TreeCellEditor |
createDefaultCellEditor()
Creates a default cell editor.
|
protected TreeCellRenderer |
createDefaultCellRenderer()
Returns the default cell renderer that is used to do the stamping of each node.
|
static ComponentUI |
createUI(JComponent
Creates a new UI object for the given component.
|
protected void |
drawCentered(Component
|
SynthContext |
getContext(JComponent
Returns the Context for the specified component.
|
Icon |
getExpandedIcon()
|
protected int |
getRowX(int row, int depth)
Returns the location, along the x-axis, to render a particular row at.
|
protected void |
installDefaults()
|
protected void |
installListeners()
|
void |
paint(Graphics
Paints the specified component according to the Look and Feel.
|
protected void |
paint(SynthContext
Paints the specified component.
|
void |
paintBorder(SynthContext
Paints the border.
|
protected void |
paintDropLine(Graphics
Paints the drop line.
|
protected void |
paintExpandControl(Graphics
Paints the expand (toggle) part of a row.
|
protected void |
paintHorizontalLine(Graphics
Paints a horizontal line.
|
protected void |
paintHorizontalPartOfLeg(Graphics
Paints the horizontal part of the leg.
|
protected void |
paintVerticalLine(Graphics
Paints a vertical line.
|
protected void |
paintVerticalPartOfLeg(Graphics
Paints the vertical part of the leg.
|
void |
propertyChange(PropertyChangeEvent
This method gets called when a bound property is changed.
|
protected void |
uninstallDefaults()
|
protected void |
uninstallListeners()
|
void |
update(Graphics
Notifies this UI delegate to repaint the specified component.
|
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, getEditingPath, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installKeyboardActions, installUI, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintRow, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallKeyboardActions, uninstallUI, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateRenderer, updateSizecontains, getAccessibleChild, getAccessibleChildrenCountpublic static ComponentUIcreateUI(JComponent x)
x - component to create UI object for
public IcongetExpandedIcon()
protected void installDefaults()
protected void installListeners()
public SynthContextgetContext(JComponent c)
getContext in interface
SynthUI
c - Component requesting SynthContext.
protected TreeCellEditorcreateDefaultCellEditor()
protected TreeCellRenderercreateDefaultCellRenderer()
protected void uninstallDefaults()
protected void uninstallListeners()
public void update(Graphicsg, JComponent c)
paint(SynthContext,Graphics) method.
In general, this method does not need to be overridden by subclasses. All Look and Feel rendering code should reside in the paint method.
update in class
ComponentUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
public void paintBorder(SynthContextcontext, Graphics g, int x, int y, int w, int h)
paintBorder in interface
SynthUI
context - a component context
g -
Graphics to paint on
x - the X coordinate
y - the Y coordinate
w - width of the border
h - height of the border
public void paint(Graphicsg, JComponent c)
This method is not used by Synth Look and Feel. Painting is handled by the paint(SynthContext,Graphics) method.
paint in class
BasicTreeUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
protected void paint(SynthContextcontext, Graphics g)
context - context for the component being painted
g - the
Graphics object used for painting
update(Graphics,JComponent)
protected void paintHorizontalPartOfLeg(Graphicsg, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds, or
insets.
NOTE: parentRow can be -1 if the root is not visible.
protected void paintHorizontalLine(Graphicsg, JComponent c, int y, int left, int right)
protected void paintVerticalPartOfLeg(Graphicsg, Rectangle clipBounds, Insets insets, TreePath path)
clipBounds,
insets.
protected void paintVerticalLine(Graphicsg, JComponent c, int x, int top, int bottom)
protected void paintExpandControl(Graphicsg, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds, or
insets.
public void propertyChange(PropertyChangeEventevent)
propertyChange in interface
PropertyChangeListener
event - A PropertyChangeEvent object describing the event source and the property that has changed.
protected void paintDropLine(Graphicsg)
paintDropLine in class
BasicTreeUI
g -
Graphics object to draw on
protected int getRowX(int row,
int depth)
getRowX in class
BasicTreeUI
row - Row to return x location for
depth - Depth of the row