public class MetalTreeUI extends javax.swing.plaf.basic.BasicTreeUI
JTree component.javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler, javax.swing.plaf.basic.BasicTreeUI.ComponentHandler, javax.swing.plaf.basic.BasicTreeUI.FocusHandler, javax.swing.plaf.basic.BasicTreeUI.KeyHandler, javax.swing.plaf.basic.BasicTreeUI.MouseHandler, javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler, javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler, javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction, javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction, javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction, javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler, javax.swing.plaf.basic.BasicTreeUI.TreePageAction, javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction, javax.swing.plaf.basic.BasicTreeUI.TreeTraverseActioncellEditor, 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 javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent component)
Returns a new instance of
MetalTreeUI. |
protected void |
decodeLineStyle(java.lang.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(javax.swing.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(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the specified component appropriate for the look and feel.
|
protected void |
paintHorizontalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
java.awt.Rectangle bounds,
javax.swing.tree.TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
Paints the horizontal part of the leg.
|
protected void |
paintHorizontalSeparators(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the horizontal separators.
|
protected void |
paintVerticalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
javax.swing.tree.TreePath path)
Paints the vertical part of the leg.
|
void |
uninstallUI(javax.swing.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, updateSizepublic MetalTreeUI()
MetalTreeUI.public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent component)
MetalTreeUI.component - the component for which we return an UI instanceMetalTreeUI.protected int getHorizontalLegBuffer()
getHorizontalLegBuffer in class javax.swing.plaf.basic.BasicTreeUIpublic void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.basic.BasicTreeUIc - the component to install UI forComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.basic.BasicTreeUIc - the component to uninstall UI forComponentUI.installUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()protected void decodeLineStyle(java.lang.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(java.awt.Graphics g, javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicTreeUIg - - the current graphics configuration.c - - the current component to drawprotected void paintHorizontalSeparators(java.awt.Graphics g, javax.swing.JComponent c)
g - - the current graphics configuration.c - - the current component to drawprotected void paintVerticalPartOfLeg(java.awt.Graphics g, java.awt.Rectangle clipBounds, java.awt.Insets insets, javax.swing.tree.TreePath path)
paintVerticalPartOfLeg in class javax.swing.plaf.basic.BasicTreeUIg - - the current graphics configuration.clipBounds - -insets - -path - - the current pathprotected void paintHorizontalPartOfLeg(java.awt.Graphics g, java.awt.Rectangle clipBounds, java.awt.Insets insets, java.awt.Rectangle bounds, javax.swing.tree.TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
paintHorizontalPartOfLeg in class javax.swing.plaf.basic.BasicTreeUIg - - 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