| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public class | BasicTreeUI.
Listener responsible for getting cell editing events and updating the tree accordingly. |
| public class | BasicTreeUI.
Updates the preferred size when scrolling (if necessary). |
| public class | BasicTreeUI.
Repaints the lead selection row when focus is lost/gained. |
| private class | |
| public class | BasicTreeUI.
This is used to get multiple key down events to appropriately generate events. |
| public class | BasicTreeUI.
TreeMouseListener is responsible for updating the selection based on mouse events. |
| public class | BasicTreeUI.
MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with. |
| public class | BasicTreeUI.
Class responsible for getting size of node, method is forwarded to BasicTreeUI method. |
| public class | BasicTreeUI.
PropertyChangeListener for the tree. |
| public class | BasicTreeUI.
Listener on the TreeSelectionModel, resets the row selection if any of the properties of the model change. |
| public class | BasicTreeUI.
ActionListener that invokes cancelEditing when action performed. |
| public class | BasicTreeUI.
Updates the TreeState in response to nodes expanding/collapsing. |
| public class | BasicTreeUI.
TreeHomeAction is used to handle end/home actions. |
| public class | BasicTreeUI.
TreeIncrementAction is used to handle up/down actions. |
| public class | BasicTreeUI.
Forwards all TreeModel events to the TreeState. |
| public class | BasicTreeUI.
TreePageAction handles page up and page down events. |
| public class | BasicTreeUI.
Listens for changes in the selection model and updates the display accordingly. |
| public class | BasicTreeUI.
For the first selected row expandedness will be toggled. |
| pack-priv static class | |
| public class | BasicTreeUI.
|
| Modifier and Type | Field and Description |
|---|---|
| private static final StringBuilder | |
| protected transient TreeCellEditor | cellEditor
Editor for the tree. |
| private CellEditorListener | cellEditorListener
Listens for CellEditor events. |
| protected transient Icon | collapsedIcon
The collapsed icon. |
| private ComponentListener | componentListener
Used for large models, listens for moved/resized events and updates the validCachedPreferredSize bit accordingly. |
| protected boolean | createdCellEditor
Set to true if editor that is currently in the tree was created by this instance. |
| protected boolean | createdRenderer
Set to true if the renderer that is currently in the tree was created by this instance. |
| protected transient TreeCellRenderer | currentCellRenderer
Renderer that is being used to do the actual cell drawing. |
| private static final TransferHandler | |
| protected int | depthOffset
How much the depth should be offset to properly calculate x locations. |
| protected Hashtable | drawingCache
Used for minimizing the drawing of vertical lines. |
| protected Component | editingComponent
When editing, this will be the Component that is doing the actual editing. |
| protected TreePath | editingPath
Path that is being edited. |
| protected int | editingRow
Row that is being edited. |
| protected boolean | editorHasDifferentSize
Set to true if the editor has a different size than the renderer. |
| protected transient Icon | expandedIcon
The expanded icon. |
| private FocusListener | |
| private BasicTreeUI. | |
| private Color | hashColor
Color used to draw hash marks. |
| private boolean | ignoreLAChange
If true, the property change event for LEAD_SELECTION_PATH_PROPERTY, or ANCHOR_SELECTION_PATH_PROPERTY will not generate a repaint. |
| private KeyListener | |
| protected boolean | largeModel
True if doing optimizations for a largeModel. |
| protected int | lastSelectedRow
Index of the row that was last selected. |
| private int | leadRow
Row corresponding to lead path. |
| protected int | leftChildIndent
Distance between left margin and where vertical dashes will be drawn. |
| private boolean | leftToRight
Indicates the orientation. |
| private boolean | lineTypeDashed
UI property for painting dashed lines |
| private MouseListener | |
| protected AbstractLayoutCache. | nodeDimensions
Responsible for telling the TreeState the size needed for a node. |
| private boolean | paintLines
UI property indicating whether to paint lines |
| protected Dimension | preferredMinSize
Minimum preferred size. |
| protected Dimension | preferredSize
Size needed to completely display all the nodes. |
| private PropertyChangeListener | |
| private MouseEvent | releaseEvent
A temporary variable for communication between startEditingOnRelease and startEditing. |
| protected CellRendererPane | rendererPane
Used to paint the TreeCellRenderer. |
| protected int | rightChildIndent
Distance to add to leftChildIndent to determine where cell contents will be drawn. |
| private PropertyChangeListener | |
| private static final BasicTreeUI. | |
| protected boolean | stopEditingInCompleteEditing
Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing. |
| private long | timeFactor
The time factor to treat the series of typed alphanumeric key as prefix for first letter navigation. |
| protected int | totalChildIndent
Total distance that will be indented. |
| protected JTree | tree
Component that we're going to be drawing into. |
| private TreeExpansionListener | treeExpansionListener
Updates the treestate as the nodes expand. |
| protected TreeModel | treeModel
Used to determine what to display. |
| private TreeModelListener | treeModelListener
Is responsible for updating the display based on model events. |
| private TreeSelectionListener | treeSelectionListener
Updates the display when the selection changes. |
| protected TreeSelectionModel | treeSelectionModel
Model maintaining the selection. |
| protected AbstractLayoutCache | treeState
Object responsible for handling sizing and expanded issues. |
| protected boolean | validCachedPreferredSize
Is the preferredSize valid? |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancelEditing(JTree tree)
Implements abstract javax. Cancels the current editing session. |
| protected void | checkForClickInExpandControl(TreePath
a tree path path, int an X coordinate mouseX, int an Y coordinate mouseY)If the |
| protected void | |
| protected void | completeEditing(boolean
message to stop editing messageStop, boolean message to cancel editing messageCancel, boolean message to tree messageTree)Stops the editing session. |
| protected void | |
| protected void | |
| protected void | configureLayoutCache()
Resets the TreeState instance based on the tree we're providing the look and feel for. |
| protected CellEditorListener | Returns: an instance of theCellEditorListenerCreates a listener to handle events from the current editor. |
| protected CellRendererPane | Returns: an instance of theCellRendererPaneReturns the renderer pane that renderer components are placed in. |
| protected ComponentListener | Returns: an instance of theComponentListenerCreates and returns a new ComponentHandler. |
| protected TreeCellEditor | |
| protected TreeCellRenderer | Returns: an instance ofTreeCellRendererReturns the default cell renderer that is used to do the stamping of each node. |
| protected FocusListener | Returns: an instance of theFocusListenerCreates a listener that is responsible for updating the display when focus is lost/gained. |
| protected KeyListener | Returns: an instance of theKeyListenerCreates the listener responsible for getting key events from the tree. |
| protected AbstractLayoutCache | Returns: the object responsible for managing what is expandedCreates the object responsible for managing what is expanded, as well as the size of nodes. |
| protected MouseListener | Returns: an instance of theMouseListenerCreates the listener responsible for updating the selection based on mouse events. |
| protected AbstractLayoutCache. | Returns: an instance ofNodeDimensionsCreates an instance of |
| protected PropertyChangeListener | Returns: an instance of thePropertyChangeListenerCreates a listener that is responsible that updates the UI based on how the tree changes. |
| protected PropertyChangeListener | Returns: an instance of thePropertyChangeListenerCreates the listener responsible for getting property change events from the selection model. |
| protected TreeExpansionListener | Returns: an instance of theTreeExpansionListenerCreates and returns the object responsible for updating the treestate when nodes expanded state changes. |
| protected TreeModelListener | Returns: an instance of theTreeModelListener.Returns a listener that can update the tree when the model changes. |
| protected TreeSelectionListener | Returns: an instance of theTreeSelectionListenerCreates the listener that updates the display based on selection change methods. |
| public static ComponentUI | Returns: a new instance ofBasicTreeUIa component x)Hides javax. Constructs a new instance of |
| 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)Draws the |
| protected void | drawDashedHorizontalLine(Graphics
an instance of g, int Graphicsan Y coordinate y, int an X1 coordinate x1, int an X2 coordinate x2)Draws a horizontal dashed line. |
| private void | |
| protected void | drawDashedVerticalLine(Graphics
an instance of g, int Graphicsan X coordinate x, int an Y1 coordinate y1, int an Y2 coordinate y2)Draws a vertical dashed line. |
| protected void | ensureRowsAreVisible(int
the begin row beginRow, int the end row endRow)Ensures that the rows identified by |
| private void | extendSelection(TreePath newLead)
Extends the selection from the anchor to make |
| private int | |
| private TreePath | |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| public Component. | getBaselineResizeBehavior(JComponent c)
Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes. |
| protected TreeCellEditor | getCellEditor()
Returns the editor used to edit entries in the drawn tree component, or
|
| protected TreeCellRenderer | Returns: theTreeCellRenderer instanceReturns the current instance of the |
| public TreePath | getClosestPathForLocation(JTree tree, int x, int y)
Implements abstract javax. Returns the path to the node that is closest to x,y. |
| public Icon | |
| protected Rectangle | Returns: bounding box for the drop linea locDropLocationReturns a unbounding box for the drop line. |
| public TreePath | getEditingPath(JTree tree)
Implements abstract javax. Returns the path to the element that is being edited. |
| public Icon | |
| private BasicTreeUI. | |
| protected Color | |
| protected int | Returns: the horizontal leg bufferThe horizontal element of legs between nodes starts at the right of the left-hand side of the child node by default. |
| pack-priv InputMap | |
| protected TreePath | Returns: a path to the last child ofparenta tree path parent)Returns a path to the last child of |
| private TreePath | |
| protected int | |
| public int | |
| public Dimension | getMaximumSize(JComponent c)
Overrides javax. Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0. |
| public Dimension | getMinimumSize(JComponent c)
Overrides javax. Returns the minimum size for this component. |
| protected TreeModel | |
| public Rectangle | getPathBounds(JTree tree, TreePath path)
Implements abstract javax. Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. |
| private Rectangle | |
| public TreePath | getPathForRow(JTree tree, int row)
Implements abstract javax. Returns the path for passed in row. |
| public Dimension | |
| public Dimension | Returns: the preferred size to represent the tree in the componenta component c)Overrides javax. Returns the preferred size to properly display the tree,
this is a cover method for |
| public Dimension | Returns: the preferred size to represent the tree in the componenta component c, boolean if checkConsistency)true consistency is checkedReturns the preferred size to represent the tree in c. |
| private Rectangle | |
| public int | |
| public int | getRowCount(JTree tree)
Implements abstract javax. Returns the number of rows that are being displayed. |
| public int | getRowForPath(JTree tree, TreePath path)
Implements abstract javax. Returns the row that the last item identified in path is visible at. |
| protected int | Returns: the height of each row, in pixelsReturns the height of each row in the drawn tree component. |
| protected int | Returns: amount to indent the given row.Row to return x location for row, int Depth of the row depth)Returns the location, along the x-axis, to render a particular row at. |
| protected TreeSelectionModel | Returns: theTreeSelectionModel instanceReturns the current instance of the |
| protected boolean | Returns: true if the root handles are to be displayedReturns |
| protected int | Returns: the vertical leg bufferThe vertical element of legs between nodes starts at the bottom of the parent node by default. |
| protected void | handleExpandControlClick(TreePath
a tree path path, int an X coordinate mouseX, int an Y coordinate mouseY)Messaged when the user clicks the particular row, this invokes
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | installUI(JComponent c)
Overrides javax. Configures the specified component appropriately for the look and feel. |
| protected boolean | Returns: true if the drop location should be shown as a linea locDropLocationTells if a |
| protected boolean | Returns: true if the tree is editableReturns whether the drawn tree component should be enabled for editing. |
| public boolean | isEditing(JTree tree)
Implements abstract javax. Returns true if the tree is being edited. |
| protected boolean | |
| protected boolean | Returns: true if the node at row is a leafa row row)Returns |
| protected boolean | Returns: true if the mouse cursor fall in the area of row that
is used to expand/collapse the node and the node is not a leaf.a tree path path, int an X coordinate mouseX, int an Y coordinate mouseY)Returns |
| protected boolean | Returns: true if a mouse event on the node should select
from the anchor pointa mouse event event)Returning |
| protected boolean | Returns: true if the root node of the tree is displayedReturns whether the root node of the drawn tree component should be displayed. |
| protected boolean | Returns: true if the row under the mouse should be toggleda mouse event event)Returning |
| protected boolean | Returns: true if a mouse event on the node should toggle the selectiona mouse event event)Returning |
| pack-priv static void | |
| public void | paint(Graphics g, JComponent c)
Overrides javax. Paints the specified component appropriately for the look and feel. |
| protected void | |
| 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 expandedtrue if the path has been expandedtrue if the row is leafPaints 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)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 expandedtrue if the path has been expandedtrue if the path is leafPaints the horizontal part of the leg. |
| protected void | paintRow(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 expandedtrue if the path has been expandedtrue if the path is leafPaints the renderer part of a row. |
| 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)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)Paints the vertical part of the leg. |
| protected void | |
| protected void | pathWasExpanded(TreePath
a tree path path)Messaged from the |
| protected void | prepareForUIInstall()
Invoked after the |
| protected void | |
| private void | |
| private void | |
| protected void | selectPathForEvent(TreePath
the selected path path, MouseEvent the mouse event event)Messaged to update the selection based on a |
| private void | |
| protected void | |
| protected void | setCellRenderer(TreeCellRenderer
the new value of the tcr)cellRenderer propertySets the |
| public void | |
| protected void | setEditable(boolean
the new value of the newValue)editable propertyConfigures the receiver to allow, or not allow, editing. |
| public void | |
| protected void | |
| protected void | |
| private void | |
| private void | |
| public void | |
| protected void | |
| public void | |
| public void | |
| protected void | setRootVisible(boolean
the new value of the newValue)rootVisible propertySets the root to being visible. |
| protected void | setRowHeight(int
the new value of the rowHeight)rowHeight propertySets the row height, this is forwarded to the treeState. |
| protected void | setSelectionModel(TreeSelectionModel
the new value of the newLSM)selectionModel propertyResets the selection model. |
| protected void | setShowsRootHandles(boolean
the new value of the newValue)showsRootHandles propertyDetermines whether the node handles are to be displayed. |
| protected boolean | Returns: true if the expand (toggle) control should be drawn
for the specified rowa tree path path, int a row row, boolean true if the path is expandedtrue if the path has been expandedtrue if the row is leafReturns |
| protected boolean | Returns: true if the editing is successfula tree path path, MouseEvent a mouse event event)Will start editing for node if there is a |
| public void | startEditingAtPath(JTree tree, TreePath path)
Implements abstract javax. Selects the last item in path and tries to edit it. |
| private boolean | |
| public boolean | stopEditing(JTree tree)
Implements abstract javax. Stops the current editing session. |
| protected void | toggleExpandState(TreePath
a tree path path)Expands path if it is not expanded, or collapses row if it is expanded. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | uninstallUI(JComponent c)
Overrides javax. Reverses configuration which was done on the specified component during
|
| protected void | updateCachedPreferredSize()
Updates the |
| protected void | updateCellEditor()
Updates the cellEditor based on the editability of the JTree that we're contained in. If the tree is editable but doesn't have a cellEditor, a basic one will be used. |
| protected void | |
| protected void | updateExpandedDescendants(TreePath
a tree path path)Updates the expanded state of all the descendants of |
| protected void | updateLayoutCacheExpandedNodes()
Makes all the nodes that are expanded in JTree expanded in LayoutCache. |
| private void | |
| protected void | |
| protected void | |
| protected void | |
| private void |