|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
javax.swing.plaf.metal.MetalTreeUI
public class MetalTreeUI
A UI delegate for the JTree
component.
Nested Class Summary |
---|
Field Summary |
---|
Fields inherited from class javax.swing.plaf.basic.BasicTreeUI |
---|
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 Summary | |
---|---|
MetalTreeUI()
Constructs a new instance of MetalTreeUI . |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetalTreeUI()
MetalTreeUI
.
Method Detail |
---|
public static ComponentUI createUI(JComponent component)
MetalTreeUI
.
component
- the component for which we return an UI instance
MetalTreeUI
.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |