public class MetalTreeUI extends BasicTreeUI
JTree
component.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, validCachedPreferredSize
Constructor and Description |
---|
MetalTreeUI()
Constructs a new instance of
MetalTreeUI . |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent component)
Returns a new instance of
MetalTreeUI . |
protected void |
decodeLineStyle(Object lineStyleFlag)
This function converts between the string passed into the client
property and the internal representation (currently an int).
|
protected int |
getHorizontalLegBuffer()
The horizontal element of legs between nodes starts at the right of the
left-hand side of the child node by default.
|
void |
installUI(JComponent c)
Configures the specified component appropriate for the look and feel.
|
protected boolean |
isLocationInExpandControl(int row,
int rowLevel,
int mouseX,
int mouseY)
Checks if the location is in expand control.
|
void |
paint(Graphics g,
JComponent c)
Paints the specified component appropriate for the look and feel.
|
protected void |
paintHorizontalPartOfLeg(Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
Paints the horizontal part of the leg.
|
protected void |
paintHorizontalSeparators(Graphics g,
JComponent c)
Paints the horizontal separators.
|
protected void |
paintVerticalPartOfLeg(Graphics g,
Rectangle clipBounds,
Insets insets,
TreePath path)
Paints the vertical part of the leg.
|
void |
uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during
installUI.
|
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createDefaultCellRenderer, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getLastChildPath, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installDefaults, installKeyboardActions, installListeners, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintExpandControl, paintHorizontalLine, paintRow, paintVerticalLine, 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, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateRenderer, updateSize
contains, getAccessibleChild, getAccessibleChildrenCount, update
public MetalTreeUI()
MetalTreeUI
.public static ComponentUI createUI(JComponent component)
MetalTreeUI
.component
- the component for which we return an UI instanceMetalTreeUI
.protected int getHorizontalLegBuffer()
getHorizontalLegBuffer
in class BasicTreeUI
public void installUI(JComponent c)
installUI
in class BasicTreeUI
c
- the component to install UI forComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
uninstallUI
in class BasicTreeUI
c
- the component to uninstall UI forComponentUI.installUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected void decodeLineStyle(Object lineStyleFlag)
lineStyleFlag
- - String representationprotected boolean isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)
row
- - current rowrowLevel
- - current levelmouseX
- - current x location of the mouse clickmouseY
- - current y location of the mouse clickpublic void paint(Graphics g, JComponent c)
paint
in class BasicTreeUI
g
- - the current graphics configuration.c
- - the current component to drawprotected void paintHorizontalSeparators(Graphics g, JComponent c)
g
- - the current graphics configuration.c
- - the current component to drawprotected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
paintVerticalPartOfLeg
in class BasicTreeUI
g
- - the current graphics configuration.clipBounds
- -insets
- -path
- - the current pathprotected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
paintHorizontalPartOfLeg
in class BasicTreeUI
g
- - the graphics configurationclipBounds
- -insets
- -bounds
- - bounds of the cellpath
- - path to draw leg forrow
- - row to start drawing atisExpanded
- - is the row expandedhasBeenExpanded
- - has the row already been expandedisLeaf
- - is the path a leaf