| Package | Description |
|---|---|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
|
| javax.swing.event |
Provides for events fired by Swing components.
|
| javax.swing.plaf |
Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
|
| javax.swing.plaf.basic |
Provides user interface objects built according to the Basic look and feel.
|
| javax.swing.plaf.metal |
Provides user interface objects built according to the Java look and feel (once codenamed
Metal), which is the default look and feel.
|
| javax.swing.plaf.multi |
Provides user interface objects that combine two or more look and feels.
|
| javax.swing.plaf.synth |
Synth is a skinnable look and feel in which all painting is delegated.
|
| javax.swing.tree |
Provides classes and interfaces for dealing with
javax.swing.JTree.
|
| Modifier and Type | Method and Description |
|---|---|
TreePath |
JTree.getAnchorSelectionPath()
Returns the path identified as the anchor.
|
TreePath |
JTree.getClosestPathForLocation(int x, int y)
Returns the path to the node that is closest to x,y.
|
TreePath |
JTree.getEditingPath()
Returns the path to the element that is currently being edited.
|
TreePath |
JTree.getLeadSelectionPath()
Returns the path identified as the lead.
|
TreePath |
JTree.getNextMatch(String
Returns the TreePath to the next tree element that begins with a prefix.
|
TreePath |
JTree.DropLocation.getPath()
Returns the path where dropped data should be placed in the tree.
|
protected TreePath |
JTree.getPathBetweenRows(int index0, int index1)
Returns the paths (inclusive) between the specified rows.
|
TreePath |
JTree.getPathForLocation(int x, int y)
Returns the path for the node at the specified location.
|
TreePath |
JTree.getPathForRow(int row)
Returns the path for the specified row.
|
TreePath |
JTree.getSelectionPath()
Returns the path to the first selected node.
|
TreePath |
JTree.getSelectionPaths()
Returns the paths of all selected values.
|
| Modifier and Type | Method and Description |
|---|---|
protected Enumeration |
JTree.getDescendantToggledPaths(TreePath
Returns an
Enumeration of
TreePaths that have been expanded that are descendants of
parent.
|
Enumeration |
JTree.getExpandedDescendants(TreePath
Returns an
Enumeration of the descendants of the path
parent that are currently expanded.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JTree.addSelectionPath(TreePath
Adds the node identified by the specified
TreePath to the current selection.
|
void |
JTree.addSelectionPaths(TreePath
Adds each path in the array of paths to the current selection.
|
void |
JTree.EmptySelectionModel.addSelectionPaths(TreePath
This is overriden to do nothing;
EmptySelectionModel does not allow a selection.
|
void |
JTree.collapsePath(TreePath
Ensures that the node identified by the specified path is collapsed and viewable.
|
void |
JTree.expandPath(TreePath
Ensures that the node identified by the specified path is expanded and viewable.
|
void |
JTree.fireTreeCollapsed(TreePath
Notifies all listeners that have registered interest for notification on this event type.
|
void |
JTree.fireTreeExpanded(TreePath
Notifies all listeners that have registered interest for notification on this event type.
|
void |
JTree.fireTreeWillCollapse(TreePath
Notifies all listeners that have registered interest for notification on this event type.
|
void |
JTree.fireTreeWillExpand(TreePath
Notifies all listeners that have registered interest for notification on this event type.
|
protected Enumeration |
JTree.getDescendantToggledPaths(TreePath
Returns an
Enumeration of
TreePaths that have been expanded that are descendants of
parent.
|
Enumeration |
JTree.getExpandedDescendants(TreePath
Returns an
Enumeration of the descendants of the path
parent that are currently expanded.
|
Rectangle |
JTree.getPathBounds(TreePath
Returns the
Rectangle that the specified node will be drawn into.
|
int |
JTree.getRowForPath(TreePath
Returns the row that displays the node identified by the specified path.
|
boolean |
JTree.hasBeenExpanded(TreePath
Returns true if the node identified by the path has ever been expanded.
|
boolean |
JTree.isCollapsed(TreePath
Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.
|
boolean |
JTree.isExpanded(TreePath
Returns true if the node identified by the path is currently expanded,
|
boolean |
JTree.isPathEditable(TreePath
Returns
isEditable.
|
boolean |
JTree.isPathSelected(TreePath
Returns true if the item identified by the path is currently selected.
|
boolean |
JTree.isVisible(TreePath
Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.
|
void |
JTree.makeVisible(TreePath
Ensures that the node identified by path is currently viewable.
|
protected boolean |
JTree.removeDescendantSelectedPaths(TreePath
Removes any paths in the selection that are descendants of
path.
|
void |
JTree.removeSelectionPath(TreePath
Removes the node identified by the specified path from the current selection.
|
void |
JTree.removeSelectionPaths(TreePath
Removes the nodes identified by the specified paths from the current selection.
|
void |
JTree.EmptySelectionModel.removeSelectionPaths(TreePath
This is overriden to do nothing;
EmptySelectionModel does not allow a selection.
|
void |
JTree.scrollPathToVisible(TreePath
Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.
|
void |
JTree.setAnchorSelectionPath(TreePath
Sets the path identified as the anchor.
|
protected void |
JTree.setExpandedState(TreePath
Sets the expanded state of this
JTree.
|
void |
JTree.setLeadSelectionPath(TreePath
Sets the path identifies as the lead.
|
void |
JTree.setSelectionPath(TreePath
Selects the node identified by the specified path.
|
void |
JTree.setSelectionPaths(TreePath
Selects the nodes identified by the specified array of paths.
|
void |
JTree.EmptySelectionModel.setSelectionPaths(TreePath
This is overriden to do nothing;
EmptySelectionModel does not allow a selection.
|
void |
JTree.startEditingAtPath(TreePath
Selects the node identified by the specified path and initiates editing.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
JTree.removeDescendantToggledPaths(Enumeration
Removes any descendants of the
TreePaths in
toRemove that have been expanded.
|
| Constructor and Description | |
|---|---|
AccessibleJTreeNode(JTree
Constructs an AccessibleJTreeNode
|
| Modifier and Type | Field and Description |
|---|---|
protected TreePath |
TreeSelectionEvent.newLeadSelectionPath
leadSelectionPath after the paths changed, may be null.
|
protected TreePath |
TreeSelectionEvent.oldLeadSelectionPath
leadSelectionPath before the paths changed, may be null.
|
protected TreePath |
TreeModelEvent.path
Path to the parent of the nodes that have changed.
|
protected TreePath |
TreeExpansionEvent.path
Path to the value this event represents.
|
protected TreePath |
TreeSelectionEvent.paths
Paths this event represents.
|
| Modifier and Type | Method and Description |
|---|---|
TreePath |
TreeSelectionEvent.getNewLeadSelectionPath()
Returns the current lead path.
|
TreePath |
TreeSelectionEvent.getOldLeadSelectionPath()
Returns the path that was previously the lead path.
|
TreePath |
TreeSelectionEvent.getPath()
Returns the first path element.
|
TreePath |
TreeExpansionEvent.getPath()
Returns the path to the value that has been expanded/collapsed.
|
TreePath |
TreeSelectionEvent.getPaths()
Returns the paths that have been added or removed from the selection.
|
TreePath |
TreeModelEvent.getTreePath()
For all events, except treeStructureChanged, returns the parent of the changed nodes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
TreeSelectionEvent.isAddedPath(TreePath
Returns whether the specified path was added to the selection.
|
| Constructor and Description | |
|---|---|
TreeExpansionEvent(Object
Constructs a TreeExpansionEvent object.
|
|
TreeModelEvent(Object
Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.
|
|
TreeModelEvent(Object
Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.
|
|
TreeSelectionEvent(Object
Represents a change in the selection of a TreeSelectionModel.
|
|
TreeSelectionEvent(Object
Represents a change in the selection of a TreeSelectionModel.
|
|
TreeSelectionEvent(Object
Represents a change in the selection of a TreeSelectionModel.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TreePath |
TreeUI.getClosestPathForLocation(JTree
Returns the path to the node that is closest to x,y.
|
abstract TreePath |
TreeUI.getEditingPath(JTree
Returns the path to the element that is being edited.
|
abstract TreePath |
TreeUI.getPathForRow(JTree
Returns the path for passed in row.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Rectangle |
TreeUI.getPathBounds(JTree
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
|
abstract int |
TreeUI.getRowForPath(JTree
Returns the row that the last item identified in path is visible at.
|
abstract void |
TreeUI.startEditingAtPath(JTree
Selects the last item in path and tries to edit it.
|
| Modifier and Type | Field and Description |
|---|---|
protected TreePath |
BasicTreeUI.editingPath
Path that is being edited.
|
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable |
BasicTreeUI.drawingCache
Used for minimizing the drawing of vertical lines.
|
| Modifier and Type | Method and Description |
|---|---|
TreePath |
BasicTreeUI.getClosestPathForLocation(JTree
Returns the path to the node that is closest to x,y.
|
TreePath |
BasicTreeUI.getEditingPath(JTree
Returns the path to the element that is being edited.
|
protected TreePath |
BasicTreeUI.getLastChildPath(TreePath
Returns a path to the last child of
parent.
|
TreePath |
BasicTreeUI.getPathForRow(JTree
Returns the path for passed in row.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
BasicTreeUI.checkForClickInExpandControl(TreePath
If the
mouseX and
mouseY are in the expand/collapse region of the
row, this will toggle the row.
|
protected TreePath |
BasicTreeUI.getLastChildPath(TreePath
Returns a path to the last child of
parent.
|
Rectangle |
BasicTreeUI.getPathBounds(JTree
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.
|
int |
BasicTreeUI.getRowForPath(JTree
Returns the row that the last item identified in path is visible at.
|
protected void |
BasicTreeUI.handleExpandControlClick(TreePath
Messaged when the user clicks the particular row, this invokes toggleExpandState.
|
protected boolean |
BasicTreeUI.isLocationInExpandControl(TreePath
Returns true if
mouseX and
mouseY fall in the area of row that is used to expand/collapse the node and the node at
row does not represent a leaf.
|
protected void |
BasicTreeUI.paintExpandControl(Graphics
Paints the expand (toggle) part of a row.
|
protected void |
BasicTreeUI.paintHorizontalPartOfLeg(Graphics
Paints the horizontal part of the leg.
|
protected void |
BasicTreeUI.paintRow(Graphics
Paints the renderer part of a row.
|
protected void |
BasicTreeUI.paintVerticalPartOfLeg(Graphics
Paints the vertical part of the leg.
|
protected void |
BasicTreeUI.pathWasCollapsed(TreePath
Messaged from the VisibleTreeNode after it has collapsed.
|
protected void |
BasicTreeUI.pathWasExpanded(TreePath
Messaged from the VisibleTreeNode after it has been expanded.
|
protected void |
BasicTreeUI.selectPathForEvent(TreePath
Messaged to update the selection based on a MouseEvent over a particular row.
|
protected boolean |
BasicTreeUI.shouldPaintExpandControl(TreePath
Returns true if the expand (toggle) control should be drawn for the specified row.
|
protected boolean |
BasicTreeUI.startEditing(TreePath
Will start editing for node if there is a cellEditor and shouldSelectCell returns true.
|
void |
BasicTreeUI.startEditingAtPath(JTree
Selects the last item in path and tries to edit it.
|
protected void |
BasicTreeUI.toggleExpandState(TreePath
Expands path if it is not expanded, or collapses row if it is expanded.
|
protected void |
BasicTreeUI.updateExpandedDescendants(TreePath
Updates the expanded state of all the descendants of
path by getting the expanded descendants from the tree and forwarding to the tree state.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
MetalTreeUI.paintHorizontalPartOfLeg(Graphics
|
protected void |
MetalTreeUI.paintVerticalPartOfLeg(Graphics
|
| Modifier and Type | Method and Description |
|---|---|
TreePath |
MultiTreeUI.getClosestPathForLocation(JTree
Invokes the
getClosestPathForLocation method on each UI handled by this object.
|
TreePath |
MultiTreeUI.getEditingPath(JTree
Invokes the
getEditingPath method on each UI handled by this object.
|
TreePath |
MultiTreeUI.getPathForRow(JTree
Invokes the
getPathForRow method on each UI handled by this object.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
MultiTreeUI.getPathBounds(JTree
Invokes the
getPathBounds method on each UI handled by this object.
|
int |
MultiTreeUI.getRowForPath(JTree
Invokes the
getRowForPath method on each UI handled by this object.
|
void |
MultiTreeUI.startEditingAtPath(JTree
Invokes the
startEditingAtPath method on each UI handled by this object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SynthTreeUI.paintExpandControl(Graphics
Paints the expand (toggle) part of a row.
|
protected void |
SynthTreeUI.paintHorizontalPartOfLeg(Graphics
Paints the horizontal part of the leg.
|
protected void |
SynthTreeUI.paintVerticalPartOfLeg(Graphics
Paints the vertical part of the leg.
|
| Modifier and Type | Field and Description |
|---|---|
protected TreePath |
DefaultTreeCellEditor.lastPath
Last path that was selected.
|
protected TreePath |
DefaultTreeSelectionModel.leadPath
Last path that was added.
|
protected TreePath |
DefaultTreeSelectionModel.selection
Paths that are currently selected.
|
| Modifier and Type | Method and Description |
|---|---|
TreePath |
TreeSelectionModel.getLeadSelectionPath()
Returns the last path that was added.
|
TreePath |
DefaultTreeSelectionModel.getLeadSelectionPath()
Returns the last path that was added.
|
TreePath |
TreePath.getParentPath()
Returns the
TreePath of the parent.
|
abstract TreePath |
AbstractLayoutCache.getPathClosestTo(int x, int y)
Returns the path to the node that is closest to x,y.
|
TreePath |
VariableHeightLayoutCache.getPathClosestTo(int x, int y)
Returns the path to the node that is closest to x,y.
|
TreePath |
FixedHeightLayoutCache.getPathClosestTo(int x, int y)
Returns the path to the node that is closest to x,y.
|
abstract TreePath |
AbstractLayoutCache.getPathForRow(int row)
Returns the path for passed in row.
|
TreePath |
VariableHeightLayoutCache.getPathForRow(int row)
Returns the path for
row.
|
TreePath |
FixedHeightLayoutCache.getPathForRow(int row)
Returns the path for passed in row.
|
TreePath |
TreeSelectionModel.getSelectionPath()
Returns the first path in the selection.
|
TreePath |
DefaultTreeSelectionModel.getSelectionPath()
Returns the first path in the selection.
|
TreePath |
TreeSelectionModel.getSelectionPaths()
Returns the paths in the selection.
|
TreePath |
DefaultTreeSelectionModel.getSelectionPaths()
Returns the selection.
|
TreePath |
TreePath.pathByAddingChild(Object
Returns a new path containing all the elements of this path plus
child.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Enumeration |
AbstractLayoutCache.getVisiblePathsFrom(TreePath
Returns an
Enumerator that increments over the visible paths starting at the passed in location.
|
Enumeration |
VariableHeightLayoutCache.getVisiblePathsFrom(TreePath
Returns an
Enumerator that increments over the visible paths starting at the passed in location.
|
Enumeration |
FixedHeightLayoutCache.getVisiblePathsFrom(TreePath
Returns an Enumerator that increments over the visible paths starting at the passed in location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
TreeSelectionModel.addSelectionPath(TreePath
Adds path to the current selection.
|
void |
DefaultTreeSelectionModel.addSelectionPath(TreePath
Adds path to the current selection.
|
void |
TreeSelectionModel.addSelectionPaths(TreePath
Adds paths to the current selection.
|
void |
DefaultTreeSelectionModel.addSelectionPaths(TreePath
Adds paths to the current selection.
|
protected boolean |
DefaultTreeSelectionModel.arePathsContiguous(TreePath
Returns true if the paths are contiguous, or this object has no RowMapper.
|
protected boolean |
DefaultTreeSelectionModel.canPathsBeAdded(TreePath
Used to test if a particular set of
TreePaths can be added.
|
protected boolean |
DefaultTreeSelectionModel.canPathsBeRemoved(TreePath
Returns true if the paths can be removed without breaking the continuity of the model.
|
abstract Rectangle |
AbstractLayoutCache.getBounds(TreePath
Returns a rectangle giving the bounds needed to draw path.
|
Rectangle |
VariableHeightLayoutCache.getBounds(TreePath
Returns the
Rectangle enclosing the label portion into which the item identified by
path will be drawn.
|
Rectangle |
FixedHeightLayoutCache.getBounds(TreePath
Returns a rectangle giving the bounds needed to draw path.
|
abstract boolean |
AbstractLayoutCache.getExpandedState(TreePath
Returns true if the path is expanded, and visible.
|
boolean |
VariableHeightLayoutCache.getExpandedState(TreePath
Returns true if the path is expanded, and visible.
|
boolean |
FixedHeightLayoutCache.getExpandedState(TreePath
Returns true if the path is expanded, and visible.
|
abstract int |
AbstractLayoutCache.getRowForPath(TreePath
Returns the row that the last item identified in path is visible at.
|
int |
VariableHeightLayoutCache.getRowForPath(TreePath
Returns the row where the last item identified in path is visible.
|
int |
FixedHeightLayoutCache.getRowForPath(TreePath
Returns the row that the last item identified in path is visible at.
|
int[] |
RowMapper.getRowsForPaths(TreePath
Returns the rows that the TreePath instances in
path are being displayed at.
|
int[] |
AbstractLayoutCache.getRowsForPaths(TreePath
Returns the rows that the
TreePath instances in
path are being displayed at.
|
abstract int |
AbstractLayoutCache.getVisibleChildCount(TreePath
Returns the number of visible children for row.
|
int |
VariableHeightLayoutCache.getVisibleChildCount(TreePath
Returns the number of visible children for
path.
|
int |
FixedHeightLayoutCache.getVisibleChildCount(TreePath
Returns the number of visible children for row.
|
abstract Enumeration |
AbstractLayoutCache.getVisiblePathsFrom(TreePath
Returns an
Enumerator that increments over the visible paths starting at the passed in location.
|
Enumeration |
VariableHeightLayoutCache.getVisiblePathsFrom(TreePath
Returns an
Enumerator that increments over the visible paths starting at the passed in location.
|
Enumeration |
FixedHeightLayoutCache.getVisiblePathsFrom(TreePath
Returns an Enumerator that increments over the visible paths starting at the passed in location.
|
abstract void |
AbstractLayoutCache.invalidatePathBounds(TreePath
Instructs the
LayoutCache that the bounds for
path are invalid, and need to be updated.
|
void |
VariableHeightLayoutCache.invalidatePathBounds(TreePath
Instructs the
LayoutCache that the bounds for
path are invalid, and need to be updated.
|
void |
FixedHeightLayoutCache.invalidatePathBounds(TreePath
Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.
|
boolean |
TreePath.isDescendant(TreePath
Returns true if
aTreePath is a descendant of this
TreePath.
|
abstract boolean |
AbstractLayoutCache.isExpanded(TreePath
Returns true if the value identified by row is currently expanded.
|
boolean |
VariableHeightLayoutCache.isExpanded(TreePath
Returns true if the value identified by
path is currently expanded.
|
boolean |
FixedHeightLayoutCache.isExpanded(TreePath
Returns true if the value identified by row is currently expanded.
|
boolean |
TreeSelectionModel.isPathSelected(TreePath
Returns true if the path,
path, is in the current selection.
|
boolean |
DefaultTreeSelectionModel.isPathSelected(TreePath
Returns true if the path,
path, is in the current selection.
|
protected void |
DefaultTreeSelectionModel.notifyPathChange(Vector
Deprecated.
As of JDK version 1.7
|
void |
TreeSelectionModel.removeSelectionPath(TreePath
Removes path from the selection.
|
void |
DefaultTreeSelectionModel.removeSelectionPath(TreePath
Removes path from the selection.
|
void |
TreeSelectionModel.removeSelectionPaths(TreePath
Removes paths from the selection.
|
void |
DefaultTreeSelectionModel.removeSelectionPaths(TreePath
Removes paths from the selection.
|
abstract void |
AbstractLayoutCache.setExpandedState(TreePath
Marks the path
path expanded state to
isExpanded.
|
void |
VariableHeightLayoutCache.setExpandedState(TreePath
Marks the path
path expanded state to
isExpanded.
|
void |
FixedHeightLayoutCache.setExpandedState(TreePath
Marks the path
path expanded state to
isExpanded.
|
void |
TreeSelectionModel.setSelectionPath(TreePath
Sets the selection to path.
|
void |
DefaultTreeSelectionModel.setSelectionPath(TreePath
Sets the selection to path.
|
void |
TreeSelectionModel.setSelectionPaths(TreePath
Sets the selection to path.
|
void |
DefaultTreeSelectionModel.setSelectionPaths(TreePath
Sets the selection.
|
void |
DefaultTreeModel.valueForPathChanged(TreePath
This sets the user object of the TreeNode identified by path and posts a node changed.
|
void |
TreeModel.valueForPathChanged(TreePath
Messaged when the user has altered the value for the item identified by
path to
newValue.
|
| Constructor and Description | |
|---|---|
TreePath(TreePath
Creates a
TreePath with the specified parent and element.
|