| Package | org.aswing |
| Class | public class JTree |
| Inheritance | JTree Container Component AWSprite flash.display.Sprite |
| Implements | CellEditorListener, TreeModelListener, Viewportable |
A specific node in a tree can be identified either by a
TreePath (an object
that encapsulates a node and all of its ancestors), or by its
display row, where each row in the display area displays one node.
An expanded node is a non-leaf node (as identified by
TreeModel.isLeaf(node) returning false) that will displays
its children when all its ancestors are expanded.
A collapsed
node is one which hides them. A hidden node is one which is
under a collapsed ancestor. All of a viewable nodes parents
are expanded, but may or may not be displayed. A displayed node
is both viewable and in the display area, where it can be seen.
JTree methods use "visible" to mean "displayed":
isRootVisible()
setRootVisible()
scrollPathToVisible()
scrollRowToVisible()
getVisibleRowCount()
setVisibleRowCount()
JTree methods use "visible" to mean
"viewable" (under an expanded parent):
isPathVisible()
makePathVisible()
If you are interested in knowing when the selection listen the
the TreeSelectionEvent.TREE_SELECTION_CHANGED event.
yourTree.addEventListener(MouseEvent.MOUSE_DOWN, __onPressed);
....
public function __onPressed(e:Event):void {
var selPath:TreePath = tree.getMousePointedPath();
....
}
};
To use JTree to display compound nodes
(for example, nodes containing both
a graphic icon and text), subclass {
See also
| Method | Defined by | ||
|---|---|---|---|
|
JTree(newModel:TreeModel)
; JTree() a defaul model will be created Returns an instance of JTree which displays the root node
-- the tree is created using the specified data model. | JTree | ||
![]() |
addChild(dis:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
| AWSprite | |
![]() |
addChildAt(child:DisplayObject, index:int):DisplayObject
| AWSprite | |
![]() |
addDragAcceptableInitiator(com:Component):void
Adds a component to be the acceptable drag initiator to this component.
| Component | |
|
addSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Adds the paths between index0 and index1, inclusive, to the
selection.
| JTree | ||
|
addSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds a listener for tree selection events.
| JTree | ||
|
addSelectionPath(path:TreePath, programmatic:Boolean = true):void
Adds the node identified by the specified
TreePath
to the current selection. | JTree | ||
|
addSelectionPaths(paths:Array, programmatic:Boolean = true):void
Adds each path in the array of paths to the current selection.
| JTree | ||
|
addSelectionRow(row:int, programmatic:Boolean = true):void
Adds the path at the specified row to the current selection.
| JTree | ||
|
addSelectionRows(rows:Array, programmatic:Boolean = true):void
Adds the paths at each of the specified rows to the current selection.
| JTree | ||
|
addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a listener to listen the viewpoat state change event.
| JTree | ||
![]() |
On Component just can add to one Container.
| Container | |
![]() |
appendAll(... coms):void
Adds one or more component to the container with null constraints
| Container | |
![]() |
bringToBottom(child:DisplayObject):void
Brings a child to bottom.
| AWSprite | |
![]() |
bringToTop(child:DisplayObject):void
Brings a child to top.
| AWSprite | |
|
cancelEditing():void
Cancels the current editing session.
| JTree | ||
|
clearSelection(programmatic:Boolean = true):void
Clears the selection.
| JTree | ||
|
collapsePath(path:TreePath):void
Ensures that the node identified by the specified path is
collapsed and viewable.
| JTree | ||
|
collapseRow(row:int):void
Ensures that the node in the specified row is collapsed.
| JTree | ||
![]() | Component | ||
![]() |
containsChild(child:DisplayObject):Boolean
Returns whether child is directly child of this sprite, true only if getChildIndex(child) >= 0.
| AWSprite | |
![]() |
doLayout():void
layout this container
| Container | |
|
editingCanceled(source:CellEditor):void
| JTree | ||
|
editingStopped(source:CellEditor):void
| JTree | ||
|
expandPath(path:TreePath):void
Ensures that the node identified by the specified path is
expanded and viewable.
| JTree | ||
|
expandRow(row:int):void
Ensures that the node in the specified row is expanded and
viewable.
| JTree | ||
![]() |
fireFocusKeyDownEvent(e:KeyboardEvent):void
| Component | |
![]() |
fireFocusKeyUpEvent(e:KeyboardEvent):void
| Component | |
|
fireTreeCollapsed(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type.
| JTree | ||
|
fireTreeExpanded(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type.
| JTree | ||
|
fireTreeWillCollapse(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type.
| JTree | ||
|
fireTreeWillExpand(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type.
| JTree | ||
![]() |
getAlignmentX():Number
Returns the alignment along the x axis.
| Component | |
![]() |
getAlignmentY():Number
Returns the alignment along the y axis.
| Component | |
![]() |
getAlpha():Number
Returns the alpha of this component.
| Component | |
|
Returns the path identified as the anchor.
| JTree | ||
![]() |
getAwmlID():String
Returns ID used to identify components created from AWML.
| Component | |
![]() |
getAwmlIndex():Number
Returns position index of the component inside its AWML container.
| Component | |
![]() |
getAwmlNamespace():String
Returns namespace name used to identify components created from AWML.
| Component | |
![]() |
Gets the background color of this component.
| Component | |
![]() |
Returns the background decorator of this component.
| Component | |
![]() |
Returns the border.
| Component | |
![]() |
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
Same to DisplayObject.getBounds(),
just add a explaination here that if you want to get the component bounds,
see {
| Component | |
|
Returns the editor used to edit entries in the tree.
| JTree | ||
|
Returns the current
TreeCellFactory
that is rendering each cell. | JTree | ||
![]() |
getChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
getChildByName(name:String):DisplayObject
| AWSprite | |
![]() |
getChildIndex(child:DisplayObject):int
| AWSprite | |
![]() |
getClientProperty(key:*):*
Returns the value of the property with the specified key.
| Component | |
![]() |
Returns the clip bounds.
| Component | |
|
getClosestPathForLocation(x:int, y:int):TreePath
Returns the path to the node that is closest to x,y.
| JTree | ||
|
getClosestRowForLocation(x:int, y:int):int
Returns the row to the node that is closest to x,y.
| JTree | ||
![]() |
Stores the bounds value of this component into "return value" rv and returns rv. | Component | |
![]() |
getComponent(index:int):Component
Gets the nth(index) component in this container.
| Container | |
![]() |
getComponentCount():int
Gets the number of components in this container.
| Container | |
![]() |
getConstraints():Object
Gets cpmponent's constraints.
| Component | |
|
getDefaultBasicUIClass():Class
| JTree | ||
|
Returns the path to the element that is currently being edited.
| JTree | ||
|
getExpandedDescendants(parent:TreePath):Array
Returns an
Array of the descendants of the
path parent that
are currently expanded. | JTree | ||
| JTree | |||
|
getFixedCellWidth():int
Returns the fixed cell width value -- the value specified by setting
the
fixedCellWidth property, rather than that calculated
from the cell elements. | JTree | ||
![]() |
Returns the focus manager for this component's stage,
or null if this component is not on stage.
| Component | |
![]() |
Returns the focus traversal policy of this container, it will return its parent's
focus traversal policy if its self is null.
| Container | |
![]() |
Gets the font of this component.
| Component | |
![]() |
Gets the foreground color of this component.
| Component | |
![]() |
Returns the foreground decorator of this component.
| Component | |
![]() |
Stores the global location value of this component into "return value" p and returns p.
| Component | |
![]() |
getHeight():int
Returns the current height of this component
| Component | |
![]() |
Returns the current top index for a new child(none forground child).
| AWSprite | |
| JTree | |||
| JTree | |||
![]() |
Returns the index of the child component in this container.
| Container | |
![]() |
If a border has been set on this component, returns the border's insets;
otherwise returns an empty insets.
| Component | |
![]() |
getInternalFocusObject():InteractiveObject
Returns the object to receive the focus for this component.
| Component | |
![]() |
Returns the keyboard manager of this component's
JRootPane ancestor. | Component | |
|
getLastSelectedPathComponent():Object
Returns the last path component in the first node of the current
selection.
| JTree | ||
![]() | Container | ||
|
Returns the path identified as the lead.
| JTree | ||
|
getLeadSelectionRow():int
Returns the row index corresponding to the lead path.
| JTree | ||
![]() |
Stores the location value of this component into "return value" rv and returns rv.
| Component | |
|
Returns the location in the JTree view area of the logic location.
| JTree | ||
![]() |
Returns the current bottom index for none background child.
| AWSprite | |
![]() |
getMaximumHeight():int
Returns
getMaximumSize().height
| Component | |
![]() |
| Component | |
![]() |
getMaximumWidth():int
Returns
getMaximumSize().width
| Component | |
|
getMaxSelectionRow():int
Returns the last selected row.
| JTree | ||
![]() |
getMinimumHeight():int
Returns
getMinimumSize().height
| Component | |
![]() |
| Component | |
![]() |
getMinimumWidth():int
Returns
getMinimumSize().width
| Component | |
|
getMinSelectionRow():int
Gets the first selected row.
| JTree | ||
|
Returns the
TreeModel that is providing the data. | JTree | ||
|
Returns the treePath that the user mouse pointed, null if no path was pointed.
| JTree | ||
![]() |
Returns the coordinate of the mouse position, in pixels, in the component scope.
| Component | |
![]() |
getName():String
Returns the name of the component
| Component | |
![]() |
Returns the bounds that component should paint in.
| Component | |
![]() |
Returns the
Container parent,
if it parent is not a Container, null will be returned. | Component | |
|
Returns the
IntRectangle that the specified node will be drawn
into. | JTree | ||
|
getPathForLocation(x:int, y:int):TreePath
Returns the path for the node at the specified location.
| JTree | ||
|
getPathForRow(row:int):TreePath
Returns the path for the specified row.
| JTree | ||
|
Returns the location in the JTree view area of the logic location.
| JTree | ||
![]() |
getPreferredHeight():int
Returns
getPreferredSize().height
| Component | |
![]() |
| Component | |
![]() |
getPreferredWidth():int
Returns
getPreferredSize().width
| Component | |
![]() |
Returns the first
JRootPane ancestor of this component. | Component | |
|
getRowBounds(row:int):IntRectangle
Returns the
IntRectangle that the node at the specified row is
drawn in. | JTree | ||
|
getRowCount():int
Returns the number of rows that are currently being displayed.
| JTree | ||
|
getRowForLocation(x:int, y:int):int
Returns the row for the specified location.
| JTree | ||
|
getRowForPath(path:TreePath):int
Returns the row that displays the node identified by the specified
path.
| JTree | ||
|
getRowHeight():int
Returns the height of each row.
| JTree | ||
|
Returns the background color for selected cells.
| JTree | ||
|
getSelectionCount():int
Returns the number of nodes selected.
| JTree | ||
|
Returns the foreground color for selected cells.
| JTree | ||
|
Returns the model for selections.
| JTree | ||
|
Returns the path to the first selected node.
| JTree | ||
|
getSelectionPaths():Array
Returns the paths of all selected values.
| JTree | ||
|
getSelectionRow():int
Returns the first selected row.
| JTree | ||
|
getSelectionRows():Array
Returns all of the currently selected rows.
| JTree | ||
![]() |
Stores the size value of this component into "return value" rv and returns rv.
| Component | |
|
getToggleClickCount():int
Returns the number of mouse clicks needed to expand or close a node.
| JTree | ||
![]() |
getToolTipText():String
Returns the tooltip string that has been set with setToolTipText.
| Component | |
|
getTreeUI():TreeUI
Returns the L&F object that renders this component.
| JTree | ||
![]() | Component | ||
|
getUIClassID():String
Returns the name of the L&F class that renders this component.
| JTree | ||
| JTree | |||
|
getVerticalUnitIncrement():int
| JTree | ||
| JTree | |||
| JTree | |||
| JTree | |||
| JTree | |||
|
getVisibleRowCount():int
Returns the number of rows that are displayed in the display area.
| JTree | ||
![]() |
getWidth():int
Returns the current width of this component
| Component | |
![]() |
getX():int
Returns the current x coordinate of the components.
| Component | |
![]() |
getY():int
Returns the current y coordinate of the components.
| Component | |
![]() | Component | ||
|
hasBeenExpanded(path:TreePath):Boolean
Returns true if the node identified by the path has ever been
expanded.
| JTree | ||
![]() |
hitTestMouse():Boolean
Returns whether the component hit the mouse.
| Component | |
![]() |
hitTestObject(obj:DisplayObject):Boolean
| AWSprite | |
![]() |
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
| AWSprite | |
![]() |
Add component to spesified index.
| Container | |
![]() |
insertAll(index:int, ... coms):void
Insets one or more component to the container with null constraints at specified starting index.
| Container | |
![]() |
invalidate():void
Invalidates the container.
| Container | |
![]() |
invalidatePreferSizeCaches():void
Clears this component and all parents above it's preferred size caches.
| Component | |
![]() |
isAncestorOf(c:Component):Boolean
Checks if the component is contained in the component hierarchy of
this container.
| Container | |
![]() |
isCachePreferSizes():Boolean
Returns whether or not the preferred size, minimum size and
max size cache is turned on.
| Component | |
![]() |
isClipMasked():Boolean
Returns whether the component clip should be masked by its bounds.
| AWSprite | |
|
isCollapsed(path:TreePath):Boolean
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.
| JTree | ||
|
isCollapsedOfRow(row:int):Boolean
Returns true if the node at the specified display row is collapsed.
| JTree | ||
![]() |
isDragAcceptableInitiator(com:Component):Boolean
Returns whether the component is acceptable drag initiator for this component.
| Component | |
![]() |
isDragEnabled():Boolean
Returns whether this component can fire ON_DRAG_RECOGNIZED event.
| Component | |
![]() |
isDropTrigger():Boolean
Returns whether this component can trigger dragging component to fire drag events
when dragging over to this component.(Default value is false)
| Component | |
|
isEditable():Boolean
Returns true if the tree is editable.
| JTree | ||
|
isEditing():Boolean
Returns true if the tree is being edited.
| JTree | ||
![]() |
isEnabled():Boolean
Returns whether the component is enabled.
| Component | |
|
isExpanded(path:TreePath):Boolean
Returns true if the node identified by the path is currently expanded,
| JTree | ||
|
isExpandedOfRow(row:int):Boolean
Returns true if the node at the specified display row is currently
expanded.
| JTree | ||
|
isExpandsSelectedPaths():Boolean
Returns the
expandsSelectedPaths property. | JTree | ||
![]() |
isFocusable():Boolean
Returns whether this Component can be focused.
| Component | |
![]() |
isFocusableSet():Boolean
Returns whether or not the opaque property is set by user.
| Component | |
![]() |
isFocusOwner():Boolean
Returns
true if this Component is the
focus owner. | Component | |
![]() |
isFontValidated():Boolean
Returns whether the new font are applied and taked effect.
| Component | |
|
isInvokesStopCellEditing():Boolean
Returns the indicator that tells what happens when editing is
interrupted.
| JTree | ||
![]() |
isOnStage():Boolean
Determines whether or not this component is on stage(on the display list).
| Component | |
![]() |
isOpaque():Boolean
Returns true if this component is completely opaque.
| Component | |
![]() |
isOpaqueSet():Boolean
Returns whether or not the opaque property is set by user.
| Component | |
|
isPathEditable(path:TreePath):Boolean
Returns
isEditable. | JTree | ||
|
isPathSelected(path:TreePath):Boolean
Returns true if the item identified by the path is currently selected.
| JTree | ||
|
isPathVisible(path:TreePath):Boolean
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.
| JTree | ||
|
isRootVisible():Boolean
Returns true if the root node of the tree is displayed.
| JTree | ||
|
isRowHeightSet():Boolean
Returns whether or not row height is set by user.
| JTree | ||
|
isRowSelected(row:int):Boolean
Returns true if the node identified by row is selected.
| JTree | ||
|
isScrollsOnExpand():Boolean
Returns the value of the
scrollsOnExpand property. | JTree | ||
|
isScrollsOnExpandSet():Boolean
Returns whether or not scrolls on expand is set by user.
| JTree | ||
|
isSelectionEmpty():Boolean
Returns true if the selection is currently empty.
| JTree | ||
![]() |
isShowing():Boolean
Determines whether this component is showing on screen.
| Component | |
![]() |
isUIElement():Boolean
Returns true if this component is just a ui element component,
false means this component is a regular use created component.
| Component | |
![]() |
isValid():Boolean
Determines whether this component is valid.
| Component | |
![]() |
isValidateRoot():Boolean
If this method returns true, revalidate calls by descendants of this
component will cause the entire tree beginning with this root to be validated.
| Component | |
![]() |
isVisible():Boolean
| Component | |
![]() |
makeFocus():void
Makes this component's internal focus object to be the stage focus directly,
without any judgement.
| Component | |
|
makePathVisible(path:TreePath):void
Ensures that the node identified by path is currently viewable.
| JTree | ||
![]() |
pack():void
Causes this component to be sized to fit the preferred size.
| Component | |
![]() |
paintFocusRect(force:Boolean = false):void
Paints the focus rect if need.
| Component | |
![]() |
paintImmediately():void
Redraw the component UI face immediately if it is visible and ready to paint.
| Component | |
![]() |
parentReAppendChildren():void
Calls parent reAppendChildren if parent is a container.
| Component | |
![]() |
putClientProperty(key:*, value:*):void
Adds an arbitrary key/value "client property" to this component.
| Component | |
![]() |
reAppendChildren():void
Removes all children and then append them with their constraints.
| Container | |
![]() |
reAppendToParent(constraints:Object = null):void
Removes this component from its parent and then append it with specified constraints.
| Component | |
![]() |
Remove the specified child component.
| Container | |
![]() |
removeAll():void
Remove all child components.
| Container | |
![]() |
Remove the specified index child component.
| Container | |
![]() |
removeChild(child:DisplayObject):DisplayObject
Removes a normal display object child.
| Container | |
![]() |
removeChildAt(index:int):DisplayObject
Removes a normal display object child with index.
| Container | |
|
Removes any paths from the selection model that are descendants of
the nodes identified by in
e. | JTree | ||
![]() |
removeDragAcceptableInitiator(com:Component):void
Removes a component to be the acceptable drag initiator to this component.
| Component | |
![]() |
removeFromContainer():void
Removes this component from its parent,
whatever it is as a component child or only a display object child,
or it's parent is just a display object container.
| Component | |
|
removeSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Removes the nodes between index0 and index1, inclusive, from the
selection.
| JTree | ||
|
removeSelectionListener(listener:Function):void
| JTree | ||
|
removeSelectionPath(path:TreePath, programmatic:Boolean = true):void
Removes the node identified by the specified path from the current
selection.
| JTree | ||
|
removeSelectionPaths(paths:Array, programmatic:Boolean = true):void
Removes the nodes identified by the specified paths from the
current selection.
| JTree | ||
|
removeSelectionRow(row:int, programmatic:Boolean = true):void
Removes the row at the index
row from the current
selection. | JTree | ||
|
removeSelectionRows(rows:Array, programmatic:Boolean = true):void
Removes the rows that are selected at each of the specified
rows.
| JTree | ||
|
removeStateListener(listener:Function):void
Removes a state listener.
| JTree | ||
![]() |
repaint():void
Redraws the component face next RENDER event.This method can
be called often, so it needs to execute quickly.
| Component | |
![]() |
repaintAndRevalidate():void
| Component | |
![]() |
requestFocus():Boolean
Requests that this Component get the input focus, and that this
Component's top-level ancestor become the focused Window.
| Component | |
![]() |
revalidate():void
Supports deferred automatic layout.
| Component | |
![]() |
revalidateIfNecessary():void
| Component | |
|
scrollPathToVisible(path:TreePath):void
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.
| JTree | ||
|
scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):void
| JTree | ||
|
scrollRowToVisible(row:int):void
Scrolls the item identified by row until it is displayed.
| JTree | ||
![]() |
setAlignmentX(ax:Number):void
| Component | |
![]() |
setAlignmentY(ay:Number):void
| Component | |
![]() |
setAlpha(alpha:Number):void
Indicates the alpha transparency value of the component.
| Component | |
|
setAnchorSelectionPath(newPath:TreePath):void
Sets the path identified as the anchor.
| JTree | ||
![]() |
setAwmlID(id:String):void
Sets ID used to identify components created from AWML.
| Component | |
![]() |
setAwmlIndex(index:Number):void
Sets ID used to identify components created from AWML.
| Component | |
![]() |
setAwmlNamespace(theNamespace:String):void
Sets namespace used to identify components created from AWML.
| Component | |
![]() |
setBackground(c:ASColor):void
Sets the background color of this component.
| Component | |
![]() |
setBackgroundDecorator(bg:GroundDecorator):void
Sets a decorator to be the component background, it will represent the component background
with a
DisplayObject. | Component | |
![]() |
Sets the border for the component, null to remove border.
| Component | |
![]() |
setBounds(b:IntRectangle):void
This method will call setComBounds()
| Component | |
![]() |
setCachePreferSizes(b:Boolean):void
Sets whether or not turn on the preferred size, minimum size and
max size cache.
| Component | |
|
setCellEditor(cellEditor:TreeCellEditor):void
Sets the cell editor.
| JTree | ||
|
setCellFactory(x:TreeCellFactory):void
Sets the
TreeCellFactory that will be used to
draw each cell. | JTree | ||
![]() |
setChildIndex(child:DisplayObject, index:int):void
| AWSprite | |
![]() |
setClipBounds(b:IntRectangle):void
Sets the clip bounds, a rectangle mask to make specified bounds visible.
| Component | |
![]() |
setClipMasked(m:Boolean):void
Sets whether the component clip should be masked by its bounds.
| AWSprite | |
![]() |
setClipSize(size:IntDimension):void
Sets the clip size, a rectangle mask to make specified bounds visible.
| Component | |
![]() |
setComBounds(b:IntRectangle):void
Moves and resizes this component.
| Component | |
![]() |
setComBoundsXYWH(x:int, y:int, w:int, h:int):void
Moves and resizes this component.
| Component | |
![]() |
setConstraints(constraints:Object):void
Sets component's constraints.
| Component | |
![]() |
setDragAcceptableInitiatorAppraiser(func:Function):void
Sets a function to judge whether a component is acceptable drag initiator.
| Component | |
![]() |
setDragEnabled(b:Boolean):void
Sets whether this component can fire ON_DRAG_RECOGNIZED event.
| Component | |
![]() |
setDropTrigger(b:Boolean):void
Sets whether this component can trigger dragging component to fire drag events
when dragging over to this component.
| Component | |
|
setEditable(flag:Boolean):void
Determines whether the tree is editable.
| JTree | ||
![]() |
setEnabled(b:Boolean):void
Enable or disable the component.
| Component | |
|
setExpandsSelectedPaths(newValue:Boolean):void
Configures the
expandsSelectedPaths property. | JTree | ||
|
setFixedCellWidth(width:int):void
Sets the width of every cell in the list.
| JTree | ||
![]() |
setFocusable(b:Boolean):void
Sets the focusable state of this Component to the specified value.
| Component | |
![]() |
setFocusableSet(b:Boolean):void
Indicate that the
focusable property is set by user or not. | Component | |
![]() |
setFocusTraversalPolicy(ftp:FocusTraversalPolicy):void
Sets the focus traversal policy to this container, or sets null to
make this container use its parent's focus traversal policy.
| Container | |
| JTree | |||
![]() |
setFontValidated(b:Boolean):void
Sets whether the new font are applied and taked effect.
| Component | |
![]() |
setForeground(c:ASColor):void
Sets the foreground color of this component.
| Component | |
![]() |
setForegroundDecorator(fg:GroundDecorator):void
Sets a decorator to be the component foreground, it will represent the component foreground
with a
DisplayObject on top of other children of this component. | Component | |
![]() |
setGlobalLocation(gp:IntPoint):void
Set the component's location in global coordinate.
| Component | |
![]() |
setGlobalLocationXY(x:int, y:int):void
Set the component's location in global coordinate.
| Component | |
![]() |
setHeight(height:Number):void
Sets the component's height.
| Component | |
|
setHorizontalBlockIncrement(increment:int):void
| JTree | ||
|
setHorizontalUnitIncrement(increment:int):void
| JTree | ||
|
setInvokesStopCellEditing(newValue:Boolean):void
Determines what happens when editing is interrupted by selecting
another node in the tree, a change in the tree's data, or by some
other means.
| JTree | ||
|
setLayout(layout:LayoutManager):void
You can not set layout to JTree, it's handled by TreeUI.
| JTree | ||
|
setLeadSelectionPath(newPath:TreePath):void
Sets the path identifies as the lead.
| JTree | ||
![]() |
setLocation(newPos:IntPoint):void
Set the component's location, if it is diffs from old location, invalidate it to wait validate.
| Component | |
![]() |
setLocationXY(x:int, y:int):void
| Component | |
![]() |
setMaximumHeight(maximumHeight:int):void
Sets maximum height, -1 means auto count.
| Component | |
![]() |
setMaximumSize(maximumSize:IntDimension):void
setMaximumSize(d:IntDimension)
setMaximumSize(width:Number, height:Number) Set the maximumSize, then the component's maximumSize is specified. | Component | |
![]() |
setMaximumWidth(maximumWidth:int):void
Sets maximum width, -1 means auto count.
| Component | |
![]() |
setMinimumHeight(minimumHeight:int):void
Sets minimum height, -1 means auto count.
| Component | |
![]() |
setMinimumSize(minimumSize:IntDimension):void
setMinimumSize(d:IntDimension)
setMinimumSize(width:Number, height:Number) Set the minimumSize, then the component's minimumSize is specified. | Component | |
![]() |
setMinimumWidth(minimumWidth:int):void
Sets minimum width, -1 means auto count.
| Component | |
|
Sets the
TreeModel that will provide the data. | JTree | ||
![]() |
setName(name:String):void
Sets the name of this component
| Component | |
![]() |
setOpaque(b:Boolean):void
If true the component paints every pixel within its bounds.
| Component | |
![]() |
setOpaqueSet(b:Boolean):void
This method will be called to set true when you set the opaque by
setOpaque(). | Component | |
![]() |
setPreferredHeight(preferredHeight:int):void
Sets preferred width, -1 means auto count.
| Component | |
![]() |
setPreferredSize(preferredSize:IntDimension):void
setPreferredSize(d:IntDimension)
setPreferredSize(width:Number, height:Number) Set the preferredSize, then the component's preferredSize is specified. | Component | |
![]() |
setPreferredWidth(preferredWidth:int):void
Sets preferred width, -1 means auto count.
| Component | |
|
setRootVisible(rootVisible:Boolean):void
Determines whether or not the root node from
the
TreeModel is visible. | JTree | ||
|
setRowHeight(rowHeight:int):void
Sets the height of each cell, in pixels.
| JTree | ||
|
setRowHeightSet(b:Boolean):void
Sets whether or not row height is set by user.
| JTree | ||
|
setScrollsOnExpand(newValue:Boolean):void
Sets the
scrollsOnExpand property,
which determines whether the
tree might scroll to show previously hidden children. | JTree | ||
|
setScrollsOnExpandSet(b:Boolean):void
Sets whether or not scrolls on expand is set by user.
| JTree | ||
|
setSelectionBackground(selectionBackground:ASColor):void
Sets the background color for selected cells.
| JTree | ||
|
setSelectionForeground(selectionForeground:ASColor):void
Sets the foreground color for selected cells.
| JTree | ||
|
setSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Selects the nodes between index0 and index1, inclusive.
| JTree | ||
|
setSelectionMode(mode:int):void
Proxy method which passes specified selection mode to the currently
configured selection model.
| JTree | ||
|
setSelectionModel(selectionModel:TreeSelectionModel):void
Sets the tree's selection model.
| JTree | ||
|
setSelectionPath(path:TreePath, programmatic:Boolean = true):void
Selects the node identified by the specified path.
| JTree | ||
|
setSelectionPaths(paths:Array, programmatic:Boolean = true):void
Selects the nodes identified by the specified array of paths.
| JTree | ||
|
setSelectionRow(row:int, programmatic:Boolean = true):void
Selects the node at the specified row in the display.
| JTree | ||
|
setSelectionRows(rows:Array, programmatic:Boolean = true):void
Selects the nodes corresponding to each of the specified rows
in the display.
| JTree | ||
![]() |
setSize(newSize:IntDimension):void
Set the component's size, the width and height all will be setted to not less than zero,
then set the size.
| Component | |
![]() |
setSizeWH(w:int, h:int):void
| Component | |
|
setToggleClickCount(clickCount:int):void
Sets the number of mouse clicks before a node will expand or close.
| JTree | ||
![]() |
setToolTipText(t:String):void
Registers the text to display in a tool tip.
| Component | |
|
setUI(ui:ComponentUI):void
Sets the L&F object that renders this component.
| JTree | ||
![]() |
setUIElement(b:Boolean):void
Sets the component is a ui element or not.
| Component | |
|
setVerticalBlockIncrement(increment:int):void
| JTree | ||
|
setVerticalUnitIncrement(increment:int):void
| JTree | ||
|
setViewportTestSize(s:IntDimension):void
| JTree | ||
|
setViewPosition(p:IntPoint, programmatic:Boolean = true):void
| JTree | ||
![]() |
setVisible(v:Boolean):void
Set a component to be hide or shown.
| Component | |
|
setVisibleRowCount(newCount:int):void
Sets the number of rows that are to be displayed.
| JTree | ||
![]() |
setWidth(width:int):void
Sets the component's width.
| Component | |
![]() |
setX(x:int):void
Sets the x coordinate of the components.
| Component | |
![]() |
setY(y:int):void
Sets the y coordinate of the components.
| Component | |
|
startEditingAtPath(path:TreePath):void
Selects the node identified by the specified path and initiates
editing.
| JTree | ||
|
stopEditing():Boolean
Ends the current editing session.
| JTree | ||
![]() |
swapChildren(child1:DisplayObject, child2:DisplayObject):void
| AWSprite | |
![]() |
swapChildrenAt(index1:int, index2:int):void
| AWSprite | |
![]() |
toString():String
| Component | |
![]() |
transferFocus():Boolean
Transfers the focus to the next component, as though this Component were
the focus owner.
| Component | |
![]() |
transferFocusBackward():Boolean
Transfers the focus to the previous component, as though this Component
were the focus owner.
| Component | |
|
treeDidChange():void
Notifies all listeners that have registered interest for
notification on this event type.
| JTree | ||
|
treeNodesChanged(e:TreeModelEvent):void
| JTree | ||
|
treeNodesInserted(e:TreeModelEvent):void
| JTree | ||
|
treeNodesRemoved(e:TreeModelEvent):void
| JTree | ||
|
treeStructureChanged(e:TreeModelEvent):void
| JTree | ||
|
updateUI():void
Notification from the
UIManager that the L&F has changed. | JTree | ||
![]() |
validate():void
Validates this container and all of its subcomponents.
| Container | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
clearPreferSizeCaches():void
| Component | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
d_addChild(child:DisplayObject):DisplayObject
| AWSprite | |
![]() |
d_addChildAt(child:DisplayObject, index:int):DisplayObject
| AWSprite | |
![]() |
d_getChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
d_getChildByName(name:String):DisplayObject
| AWSprite | |
![]() |
d_getChildIndex(child:DisplayObject):int
| AWSprite | |
![]() |
d_removeChild(child:DisplayObject):DisplayObject
| AWSprite | |
![]() |
d_removeChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
d_setChildIndex(child:DisplayObject, index:int):void
| AWSprite | |
![]() |
d_swapChildren(child1:DisplayObject, child2:DisplayObject):void
| AWSprite | |
![]() |
d_swapChildrenAt(index1:int, index2:int):void
| AWSprite | |
|
expandRoot():void
Expands the root path, assuming the current TreeModel has been set.
| JTree | ||
|
firePropertyChange(pn:String, oldValue:*, newValue:*):void
| JTree | ||
|
fireStateChanged(programmatic:Boolean = true):void
| JTree | ||
![]() |
getBackgroundChild():DisplayObject
Returns the background child.
| AWSprite | |
![]() |
getChildIndexWithComponentIndex(index:int):int
| Container | |
![]() |
getComponentIndexWithChildIndex(index:int):int
| Container | |
![]() |
Override this to return another component that the focus should be transmit to.
| Component | |
![]() |
getForegroundChild():DisplayObject
Returns the foreground child.
| AWSprite | |
|
getModelIndexsForPath(path:TreePath):Array
Returns an array of integers specifying the indexs of the
components in the
path. | JTree | ||
|
getPathForIndexs(indexs:Array):TreePath
Returns a
TreePath created by obtaining the children
for each of the indices in indexs. | JTree | ||
![]() |
| Container | |
![]() |
invalidateTree():void
Makes this component and all parents
above it are marked as needing to be laid out.
| Component | |
![]() |
isChild(child:DisplayObject):Boolean
Returns whether or not the child is this sprite's direct child.
| AWSprite | |
![]() |
locate():void
Locate the component to the current location.
| Component | |
![]() |
paint(b:IntRectangle):void
draw the component interface in specified bounds.
| Component | |
![]() |
removeAtImp(i:int):Component
| Container | |
![]() |
setBackgroundChild(child:DisplayObject = null):void
Sets the child to be the component background, it will be add to the bottom of all other children.
| AWSprite | |
![]() |
setClipMaskRect(b:IntRectangle):void
| AWSprite | |
|
setExpandedState(path:TreePath, state:Boolean):void
Sets the expanded state of this
JTree. | JTree | ||
![]() |
setForegroundChild(child:DisplayObject = null):void
Sets the child to be the component foreground, it will be add to the top of all other children.
| AWSprite | |
![]() |
size():void
Do the process when size changed.
| Component | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
![]() | Dispatched when the component is clicked continuesly. | Component | ||
![]() | Dispatched when a component is added to a container. | Container | ||
![]() | Dispatched when a component is removed from a container. | Container | ||
![]() | Dispatched when a drag is drop on this component. | Component | ||
![]() | Dispatched when a drag is enter this component area. | Component | ||
![]() | Dispatched when a drag is exit this component area. | Component | ||
![]() | Dispatched when the component is recongnized that it can be drag start. | Component | ||
![]() | Dispatched when the component gained the focus from it is not the focus owner | Component | ||
![]() | Dispatched when the key down and the component is the focus owner. | Component | ||
![]() | Dispatched when the key up and the component is the focus owner. | Component | ||
![]() | Dispatched when the component lost the focus from it was the focus owner. | Component | ||
![]() | Dispatched when the component visible is set to false from true. | Component | ||
![]() | Dispatched when the component is moved. | Component | ||
![]() | Dispatched when the component is painted. | Component | ||
| Dispatched when a property changed. | JTree | |||
![]() | Dispatched when the mouse released or released out side. | AWSprite | ||
![]() | Dispatched only when the mouse released out side. | AWSprite | ||
![]() | Dispatched when the component is resized. | Component | ||
![]() | Dispatched when the component visible is set to true from false. | Component | ||
| Dispatched when the cell editing canceled. | JTree | |||
| Dispatched when the cell editing started. | JTree | |||
| Dispatched when the cell editing finished. | JTree | |||
| Dispatched when an item in the tree has been collapsed. | JTree | |||
| Dispatched when an item in the tree has been expanded. | JTree | |||
| Dispatched when tree items selection changed. | JTree | |||
|
Dispatched whenever a node in the tree is about to be expanded. You can throw a ExpandVetoException in this event handler to indicate that this
action is veto. | JTree | |||
|
Dispatched whenever a node in the tree is about to be expanded. You can throw a ExpandVetoException in this event handler to indicate that this
action is veto. | JTree | |||
| Constant | Defined by | ||
|---|---|---|---|
| ANCHOR_SELECTION_PATH_PROPERTY : String = "anchorSelectionPath" [static] Bound property name for anchor selection path.
| JTree | ||
| AUTO_INCREMENT : int = -2.147483648E9 [static]
The default unit/block increment, it means auto count a value.
| JTree | ||
| CELL_EDITOR_PROPERTY : String = "cellEditor" [static] Bound property name for
cellEditor. | JTree | ||
| CELL_FACTORY_PROPERTY : String = "cellFactory" [static] Bound property name for
cellFactory. | JTree | ||
| CONTIGUOUS_TREE_SELECTION : int = 2 [static] Selection can only be contiguous.
| JTree | ||
| DISCONTIGUOUS_TREE_SELECTION : int = 4 [static] Selection can contain any number of items that are not necessarily
contiguous.
| JTree | ||
| EDITABLE_PROPERTY : String = "editable" [static] Bound property name for
editable. | JTree | ||
| EXPANDS_SELECTED_PATHS_PROPERTY : String = "expandsSelectedPaths" [static] Bound property name for expands selected paths property
| JTree | ||
| FONT_PROPERTY : String = "font" [static] Bound property name for font property
| JTree | ||
| INVOKES_STOP_CELL_EDITING_PROPERTY : String = "invokesStopCellEditing" [static] Bound property name for
messagesStopCellEditing. | JTree | ||
| LEAD_SELECTION_PATH_PROPERTY : String = "leadSelectionPath" [static] Bound property name for
leadSelectionPath. | JTree | ||
| ROOT_VISIBLE_PROPERTY : String = "rootVisible" [static] Bound property name for
rootVisible. | JTree | ||
| ROW_HEIGHT_PROPERTY : String = "rowHeight" [static] Bound property name for
showsRootHandles. | JTree | ||
| SCROLLS_ON_EXPAND_PROPERTY : String = "scrollsOnExpand" [static] Bound property name for
scrollsOnExpand. | JTree | ||
| SELECTION_MODEL_PROPERTY : String = "selectionModel" [static] Bound property name for selectionModel.
| JTree | ||
| SINGLE_TREE_SELECTION : int = 1 [static] Selection can only contain one path at a time.
| JTree | ||
| TOGGLE_CLICK_COUNT_PROPERTY : String = "toggleClickCount" [static] Bound property name for
toggleClickCount. | JTree | ||
| TREE_MODEL_PROPERTY : String = "model" [static] Bound property name for
treeModel. | JTree | ||
| VISIBLE_ROW_COUNT_PROPERTY : String = "visibleRowCount" [static] Bound property name for
visibleRowCount. | JTree | ||
| JTree | () | constructor |
public function JTree(newModel:TreeModel = null)
JTree(newModel:TreeModel)
;
JTree() a defaul model will be created
Returns an instance of JTree which displays the root node
-- the tree is created using the specified data model.
newModel:TreeModel (default = null) — (optional)the TreeModel to use as the data model. If miss
it, a defaul model will be created.
|
See also
| addSelectionInterval | () | method |
public function addSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidAdds the paths between index0 and index1, inclusive, to the selection.
Parametersindex0:int — an integer specifying a display row, where 0 is the
first row in the display
|
|
index1:int — an integer specifying a second display row
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| addSelectionListener | () | method |
public function addSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):voidAdds a listener for tree selection events. the listenerthat will be notified when a node is selected or deselected (a "negative selection")
Parameterslistener:Function — the new listener to be added
|
|
priority:int (default = 0) — the priority
|
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.
|
| addSelectionPath | () | method |
public function addSelectionPath(path:TreePath, programmatic:Boolean = true):void
Adds the node identified by the specified TreePath
to the current selection. If any component of the path isn't
viewable, and getExpandsSelectedPaths is true it is
made viewable.
Note that JTree does not allow duplicate nodes to
exist as children under the same parent -- each sibling must be
a unique object.
Parameters
path:TreePath — the TreePath to add
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| addSelectionPaths | () | method |
public function addSelectionPaths(paths:Array, programmatic:Boolean = true):void
Adds each path in the array of paths to the current selection. If
any component of any of the paths isn't viewable and
getExpandsSelectedPaths is true, it is
made viewable.
Note that JTree does not allow duplicate nodes to
exist as children under the same parent -- each sibling must be
a unique object.
Parameters
paths:Array — an array of TreePath objects that specifies
the nodes to add
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| addSelectionRow | () | method |
public function addSelectionRow(row:int, programmatic:Boolean = true):voidAdds the path at the specified row to the current selection.
Parametersrow:int — an integer specifying the row of the node to add,
where 0 is the first row in the display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| addSelectionRows | () | method |
public function addSelectionRows(rows:Array, programmatic:Boolean = true):voidAdds the paths at each of the specified rows to the current selection.
Parametersrows:Array — an array of ints specifying the rows to add,
where 0 indicates the first row in the display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| addStateListener | () | method |
public function addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):voidAdd a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
listener:Function — the listener
|
|
priority:int (default = 0) — the priority
|
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.
|
See also
| cancelEditing | () | method |
public function cancelEditing():voidCancels the current editing session. Has no effect if the tree isn't being edited.
| clearSelection | () | method |
public function clearSelection(programmatic:Boolean = true):voidClears the selection.
Parametersprogrammatic:Boolean (default = true) — indicate if this is a programmatic change
|
| collapsePath | () | method |
public function collapsePath(path:TreePath):voidEnsures that the node identified by the specified path is collapsed and viewable.
Parameterspath:TreePath — the TreePath identifying a node
|
| collapseRow | () | method |
public function collapseRow(row:int):voidEnsures that the node in the specified row is collapsed.
If row is < 0 or >= getRowCount this
will have no effect.
Parameters
row:int — an integer specifying a display row, where 0 is the
first row in the display
|
| editingCanceled | () | method |
| editingStopped | () | method |
| expandPath | () | method |
public function expandPath(path:TreePath):voidEnsures that the node identified by the specified path is expanded and viewable. If the last item in the path is a leaf, this will have no effect.
Parameterspath:TreePath — the TreePath identifying a node
|
| expandRoot | () | method |
protected function expandRoot():voidExpands the root path, assuming the current TreeModel has been set.
| expandRow | () | method |
public function expandRow(row:int):voidEnsures that the node in the specified row is expanded and viewable.
If row is < 0 or >= getRowCount this
will have no effect.
Parameters
row:int — an integer specifying a display row, where 0 is the
first row in the display
|
| firePropertyChange | () | method |
protected function firePropertyChange(pn:String, oldValue:*, newValue:*):voidParameters
pn:String |
|
oldValue:* |
|
newValue:* |
| fireStateChanged | () | method |
protected function fireStateChanged(programmatic:Boolean = true):voidParameters
programmatic:Boolean (default = true) |
| fireTreeCollapsed | () | method |
public function fireTreeCollapsed(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the path parameter.
path:TreePath — the TreePath indicating the node that was
collapsed
|
See also
| fireTreeExpanded | () | method |
public function fireTreeExpanded(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the path parameter.
path:TreePath — the TreePath indicating the node that was
expanded
|
See also
| fireTreeWillCollapse | () | method |
public function fireTreeWillCollapse(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the path parameter.
path:TreePath — the TreePath indicating the node that was
expanded
|
See also
| fireTreeWillExpand | () | method |
public function fireTreeWillExpand(path:TreePath):void
Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the path parameter.
path:TreePath — the TreePath indicating the node that was
expanded
|
See also
| getAnchorSelectionPath | () | method |
public function getAnchorSelectionPath():TreePathReturns the path identified as the anchor.
ReturnsTreePath —
path identified as the anchor
|
| getCellEditor | () | method |
public function getCellEditor():TreeCellEditorReturns the editor used to edit entries in the tree.
ReturnsTreeCellEditor —
the TreeCellEditor in use,
or null if the tree cannot be edited
|
| getCellFactory | () | method |
public function getCellFactory():TreeCellFactory
Returns the current TreeCellFactory
that is rendering each cell.
TreeCellFactory —
the TreeCellFactory that is rendering each cell
|
| getClosestPathForLocation | () | method |
public function getClosestPathForLocation(x:int, y:int):TreePath
Returns the path to the node that is closest to x,y. If
no nodes are currently viewable, or there is no model, returns
null, otherwise it always returns a valid path. To test if
the node is exactly at x, y, get the node's bounds and
test x, y against that.
x:int — an integer giving the number of pixels horizontally from
the left edge of the display area, minus any left margin
|
|
y:int — an integer giving the number of pixels vertically from
the top of the display area, minus any top margin
|
TreePath —
the TreePath for the node closest to that location,
null if nothing is viewable or there is no model
|
See also
| getClosestRowForLocation | () | method |
public function getClosestRowForLocation(x:int, y:int):intReturns the row to the node that is closest to x,y. If no nodes are viewable or there is no model, returns -1. Otherwise, it always returns a valid row. To test if the returned object is exactly at x, y, get the bounds for the node at the returned row and test x, y against that.
Parametersx:int — an integer giving the number of pixels horizontally from
the left edge of the display area, minus any left margin
|
|
y:int — an integer giving the number of pixels vertically from
the top of the display area, minus any top margin
|
int — the row closest to the location, -1 if nothing is
viewable or there is no model
|
See also
| getDefaultBasicUIClass | () | method |
public override function getDefaultBasicUIClass():Class
Returns
Class |
| getEditingPath | () | method |
public function getEditingPath():TreePathReturns the path to the element that is currently being edited.
ReturnsTreePath —
the TreePath for the node being edited
|
| getExpandedDescendants | () | method |
public function getExpandedDescendants(parent:TreePath):Array
Returns an Array of the descendants of the
path parent that
are currently expanded. If parent is not currently
expanded, this will return null.
If you expand/collapse nodes while
iterating over the returned Array
this may not return all
the expanded paths, or may return paths that are no longer expanded.
parent:TreePath — the path which is to be examined
|
Array — an Array of the descendents of
parent, or null if
parent is not currently expanded
|
| getExtentSize | () | method |
| getFixedCellWidth | () | method |
public function getFixedCellWidth():int
Returns the fixed cell width value -- the value specified by setting
the fixedCellWidth property, rather than that calculated
from the cell elements.
int — the fixed cell width
|
See also
| getHorizontalBlockIncrement | () | method |
public function getHorizontalBlockIncrement():int
Returns
int |
| getHorizontalUnitIncrement | () | method |
public function getHorizontalUnitIncrement():int
Returns
int |
| getLastSelectedPathComponent | () | method |
public function getLastSelectedPathComponent():ObjectReturns the last path component in the first node of the current selection.
ReturnsObject — the last Object in the first selected node's
TreePath,
or null if nothing is selected
|
See also
| getLeadSelectionPath | () | method |
public function getLeadSelectionPath():TreePathReturns the path identified as the lead.
ReturnsTreePath —
path identified as the lead
|
| getLeadSelectionRow | () | method |
public function getLeadSelectionRow():intReturns the row index corresponding to the lead path.
Returnsint — an integer giving the row index of the lead path,
where 0 is the first row in the display; or -1
if leadPath is null
|
| getLogicLocationFromPixelLocation | () | method |
public function getLogicLocationFromPixelLocation(p:IntPoint):IntPointReturns the location in the JTree view area of the logic location.
Parametersp:IntPoint |
IntPoint |
| getMaxSelectionRow | () | method |
public function getMaxSelectionRow():intReturns the last selected row.
Returnsint — an integer designating the last selected row, where 0 is the
first row in the display
|
| getMinSelectionRow | () | method |
public function getMinSelectionRow():intGets the first selected row.
Returnsint — an integer designating the first selected row, where 0 is the
first row in the display
|
| getModel | () | method |
public function getModel():TreeModel
Returns the TreeModel that is providing the data.
TreeModel —
the TreeModel that is providing the data
|
| getModelIndexsForPath | () | method |
protected function getModelIndexsForPath(path:TreePath):Array
Returns an array of integers specifying the indexs of the
components in the path. If path is
the root, this will return an empty array. If path
is null, null will be returned.
path:TreePath |
Array |
| getMousePointedPath | () | method |
public function getMousePointedPath():TreePathReturns the treePath that the user mouse pointed, null if no path was pointed.
ReturnsTreePath —
the path mouse pointed, null if not pointed any one.
|
| getPathBounds | () | method |
public function getPathBounds(path:TreePath):IntRectangle
Returns the IntRectangle that the specified node will be drawn
into. Returns null if any component in the path is hidden
(under a collapsed parent).
Note:
This method returns a valid rectangle, even if the specified
node is not currently displayed.
Parameters
path:TreePath — the TreePath identifying the node
|
IntRectangle —
the IntRectangle the node is drawn in,
or null
|
| getPathForIndexs | () | method |
protected function getPathForIndexs(indexs:Array):TreePath
Returns a TreePath created by obtaining the children
for each of the indices in indexs. If indexs
or the TreeModel is null, it will return
null.
indexs:Array |
TreePath |
| getPathForLocation | () | method |
public function getPathForLocation(x:int, y:int):TreePathReturns the path for the node at the specified location.
Parametersx:int — an integer giving the number of pixels horizontally from
the left edge of the display area, minus any left margin
|
|
y:int — an integer giving the number of pixels vertically from
the top of the display area, minus any top margin
|
TreePath —
the TreePath for the node at that location
|
| getPathForRow | () | method |
public function getPathForRow(row:int):TreePath
Returns the path for the specified row. If row is
not visible, null is returned.
row:int — an integer specifying a row
|
TreePath —
the TreePath to the specified node,
null if row < 0
or row > getRowCount()
|
| getPixelLocationFromLogicLocation | () | method |
public function getPixelLocationFromLogicLocation(p:IntPoint):IntPointReturns the location in the JTree view area of the logic location.
Parametersp:IntPoint |
IntPoint |
| getRowBounds | () | method |
public function getRowBounds(row:int):IntRectangle
Returns the IntRectangle that the node at the specified row is
drawn in.
row:int — the row to be drawn, where 0 is the first row in the
display
|
IntRectangle —
the IntRectangle the node is drawn in
|
| getRowCount | () | method |
public function getRowCount():intReturns the number of rows that are currently being displayed.
Returnsint — the number of rows that are being displayed
|
| getRowForLocation | () | method |
public function getRowForLocation(x:int, y:int):intReturns the row for the specified location.
Parametersx:int — an integer giving the number of pixels horizontally from
the left edge of the display area, minus any left margin
|
|
y:int — an integer giving the number of pixels vertically from
the top of the display area, minus any top margin
|
int — the row corresponding to the location, or -1 if the
location is not within the bounds of a displayed cell
|
See also
| getRowForPath | () | method |
public function getRowForPath(path:TreePath):intReturns the row that displays the node identified by the specified path.
Parameterspath:TreePath — the TreePath identifying a node
|
int — an integer specifying the display row, where 0 is the first
row in the display, or -1 if any of the elements in path
are hidden under a collapsed parent.
|
| getRowHeight | () | method |
public function getRowHeight():intReturns the height of each row. Default is 16.
Returnsint |
| getSelectionBackground | () | method |
public function getSelectionBackground():ASColorReturns the background color for selected cells.
ReturnsASColor —
the Color used for the background of selected list items
|
See also
| getSelectionCount | () | method |
public function getSelectionCount():intReturns the number of nodes selected.
Returnsint — the number of nodes selected
|
| getSelectionForeground | () | method |
public function getSelectionForeground():ASColorReturns the foreground color for selected cells.
ReturnsASColor —
the Color object for the foreground property
|
See also
| getSelectionModel | () | method |
public function getSelectionModel():TreeSelectionModel
Returns the model for selections. This should always return a
non-null value. If you don't want to allow anything
to be selected
set the selection model to null, which forces an empty
selection model to be used.
TreeSelectionModel |
See also
| getSelectionPath | () | method |
public function getSelectionPath():TreePathReturns the path to the first selected node.
ReturnsTreePath —
the TreePath for the first selected node,
or null if nothing is currently selected
|
| getSelectionPaths | () | method |
public function getSelectionPaths():ArrayReturns the paths of all selected values.
ReturnsArray — an array of TreePath objects indicating the selected
nodes, or null if nothing is currently selected
|
| getSelectionRow | () | method |
public function getSelectionRow():intReturns the first selected row. If nothing is selected -1 will be returned.
Returnsint — the first selected row. If nothing is selected -1 will be returned.
|
| getSelectionRows | () | method |
public function getSelectionRows():Array
Returns all of the currently selected rows. This method is simply
forwarded to the TreeSelectionModel.
If nothing is selected null or an empty array will
be returned, based on the TreeSelectionModel
implementation.
Array — an array of integers that identifies all currently selected rows
where 0 is the first row in the display
|
| getToggleClickCount | () | method |
public function getToggleClickCount():intReturns the number of mouse clicks needed to expand or close a node.
Returnsint — number of mouse clicks before node is expanded
|
| getTreeUI | () | method |
public function getTreeUI():TreeUIReturns the L&F object that renders this component.
ReturnsTreeUI — the TreeUI object that renders this component
|
| getUIClassID | () | method |
public override function getUIClassID():StringReturns the name of the L&F class that renders this component.
ReturnsString — the string "TreeUI"
|
See also
| getVerticalBlockIncrement | () | method |
public function getVerticalBlockIncrement():int
Returns
int |
| getVerticalUnitIncrement | () | method |
public function getVerticalUnitIncrement():int
Returns
int |
| getViewportPane | () | method |
| getViewPosition | () | method |
| getViewSize | () | method |
| getVisibleRect | () | method |
| getVisibleRowCount | () | method |
public function getVisibleRowCount():intReturns the number of rows that are displayed in the display area.
Returnsint — the number of rows displayed
|
| hasBeenExpanded | () | method |
public function hasBeenExpanded(path:TreePath):BooleanReturns true if the node identified by the path has ever been expanded.
Parameterspath:TreePath |
Boolean — true if the path has ever been expanded
|
| isCollapsed | () | method |
public function isCollapsed(path:TreePath):BooleanReturns 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.
Parameterspath:TreePath — the TreePath to check
|
Boolean — true if any of the nodes in the node's path are collapsed,
false if all nodes in the path are expanded
|
| isCollapsedOfRow | () | method |
public function isCollapsedOfRow(row:int):BooleanReturns true if the node at the specified display row is collapsed.
Parametersrow:int — the row to check, where 0 is the first row in the
display
|
Boolean — true if the node is currently collapsed, otherwise false
|
| isEditable | () | method |
public function isEditable():BooleanReturns true if the tree is editable.
ReturnsBoolean — true if the tree is editable
|
| isEditing | () | method |
public function isEditing():Boolean
Returns true if the tree is being edited. The item that is being
edited can be obtained using getSelectionPath.
Boolean — true if the user is currently editing a node
|
See also
| isExpanded | () | method |
public function isExpanded(path:TreePath):BooleanReturns true if the node identified by the path is currently expanded,
Parameterspath:TreePath — the TreePath specifying the node to check
|
Boolean — false if any of the nodes in the node's path are collapsed,
true if all nodes in the path are expanded
|
| isExpandedOfRow | () | method |
public function isExpandedOfRow(row:int):BooleanReturns true if the node at the specified display row is currently expanded.
Parametersrow:int — the row to check, where 0 is the first row in the
display
|
Boolean — true if the node is currently expanded, otherwise false
|
| isExpandsSelectedPaths | () | method |
public function isExpandsSelectedPaths():Boolean
Returns the expandsSelectedPaths property.
Boolean — true if selection changes result in the parent path being
expanded
|
See also
| isInvokesStopCellEditing | () | method |
public function isInvokesStopCellEditing():BooleanReturns the indicator that tells what happens when editing is interrupted.
ReturnsBoolean — the indicator that tells what happens when editing is
interrupted
|
See also
| isPathEditable | () | method |
public function isPathEditable(path:TreePath):Boolean
Returns isEditable. This is invoked from the UI before
editing begins to insure that the given path can be edited. This
is provided as an entry point for subclassers to add filtered
editing without having to resort to creating a new editor.
path:TreePath |
Boolean — true if every parent node and the node itself is editable
|
See also
| isPathSelected | () | method |
public function isPathSelected(path:TreePath):BooleanReturns true if the item identified by the path is currently selected.
Parameterspath:TreePath — a TreePath identifying a node
|
Boolean — true if the node is selected
|
| isPathVisible | () | method |
public function isPathVisible(path:TreePath):BooleanReturns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false.
Parameterspath:TreePath |
Boolean — true if the node is viewable, otherwise false
|
| isRootVisible | () | method |
public function isRootVisible():BooleanReturns true if the root node of the tree is displayed.
ReturnsBoolean — true if the root node of the tree is displayed
|
| isRowHeightSet | () | method |
public function isRowHeightSet():BooleanReturns whether or not row height is set by user. If it is set by user, the LAF will not change the row height value.
ReturnsBoolean — set or not
|
| isRowSelected | () | method |
public function isRowSelected(row:int):BooleanReturns true if the node identified by row is selected.
Parametersrow:int — an integer specifying a display row, where 0 is the first
row in the display
|
Boolean — true if the node is selected
|
| isScrollsOnExpand | () | method |
public function isScrollsOnExpand():Boolean
Returns the value of the scrollsOnExpand property.
Boolean — the value of the scrollsOnExpand property
|
| isScrollsOnExpandSet | () | method |
public function isScrollsOnExpandSet():BooleanReturns whether or not scrolls on expand is set by user. If it is set by user, the LAF will not change the scrolls on expand value.
ReturnsBoolean — set or not
|
| isSelectionEmpty | () | method |
public function isSelectionEmpty():BooleanReturns true if the selection is currently empty.
ReturnsBoolean — true if the selection is currently empty
|
| makePathVisible | () | method |
public function makePathVisible(path:TreePath):voidEnsures that the node identified by path is currently viewable.
Parameterspath:TreePath — the TreePath to make visible
|
| removeDescendantSelectedPathsWithEvent | () | method |
public function removeDescendantSelectedPathsWithEvent(e:TreeModelEvent):void
Removes any paths from the selection model that are descendants of
the nodes identified by in e.
e:TreeModelEvent |
| removeSelectionInterval | () | method |
public function removeSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidRemoves the nodes between index0 and index1, inclusive, from the selection.
Parametersindex0:int — an integer specifying a display row, where 0 is the
first row in the display
|
|
index1:int — an integer specifying a second display row
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| removeSelectionListener | () | method |
public function removeSelectionListener(listener:Function):voidParameters
listener:Function |
| removeSelectionPath | () | method |
public function removeSelectionPath(path:TreePath, programmatic:Boolean = true):voidRemoves the node identified by the specified path from the current selection.
Parameterspath:TreePath — the TreePath identifying a node
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| removeSelectionPaths | () | method |
public function removeSelectionPaths(paths:Array, programmatic:Boolean = true):voidRemoves the nodes identified by the specified paths from the current selection.
Parameterspaths:Array — an array of TreePath objects that
specifies the nodes to remove
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| removeSelectionRow | () | method |
public function removeSelectionRow(row:int, programmatic:Boolean = true):void
Removes the row at the index row from the current
selection.
row:int — the row to remove
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| removeSelectionRows | () | method |
public function removeSelectionRows(rows:Array, programmatic:Boolean = true):voidRemoves the rows that are selected at each of the specified rows.
Parametersrows:Array — an array of ints specifying display rows, where 0 is
the first row in the display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| removeStateListener | () | method |
public function removeStateListener(listener:Function):voidRemoves a state listener.
Parameterslistener:Function — the listener to be removed.
|
See also
| scrollPathToVisible | () | method |
public function scrollPathToVisible(path:TreePath):void
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. Only works when this
JTree is contained in a JScrollPane.
path:TreePath — the TreePath identifying the node to
bring into view
|
| scrollRectToVisible | () | method |
public function scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):voidParameters
contentRect:IntRectangle |
|
programmatic:Boolean (default = true) |
| scrollRowToVisible | () | method |
public function scrollRowToVisible(row:int):void
Scrolls the item identified by row until it is displayed. The minimum
of amount of scrolling necessary to bring the row into view
is performed. Only works when this JTree is contained in a
JScrollPane.
row:int — an integer specifying the row to scroll, where 0 is the
first row in the display
|
| setAnchorSelectionPath | () | method |
public function setAnchorSelectionPath(newPath:TreePath):void
Sets the path identified as the anchor.
The anchor is not maintained by JTree, rather the UI will
update it.
newPath:TreePath — the new anchor path
|
| setCellEditor | () | method |
public function setCellEditor(cellEditor:TreeCellEditor):void
Sets the cell editor. A null value implies that the
tree cannot be edited. If this represents a change in the
cellEditor, the propertyChange
method is invoked on all listeners.
cellEditor:TreeCellEditor — the TreeCellEditor to use
|
| setCellFactory | () | method |
public function setCellFactory(x:TreeCellFactory):void
Sets the TreeCellFactory that will be used to
draw each cell.
x:TreeCellFactory — the TreeCellFactory that is to render each cell
|
| setEditable | () | method |
public function setEditable(flag:Boolean):voidDetermines whether the tree is editable. Fires a property change event if the new setting is different from the existing setting.
Parametersflag:Boolean — a boolean value, true if the tree is editable
|
| setExpandedState | () | method |
protected function setExpandedState(path:TreePath, state:Boolean):void
Sets the expanded state of this JTree.
If state is
true, all parents of path and path are marked as
expanded. If state is false, all parents of
path are marked EXPANDED, but path itself
is marked collapsed.
This will fail if a TreeWillExpandListener vetos it.
Parameters
path:TreePath |
|
state:Boolean |
| setExpandsSelectedPaths | () | method |
public function setExpandsSelectedPaths(newValue:Boolean):void
Configures the expandsSelectedPaths property. If
true, any time the selection is changed, either via the
TreeSelectionModel, or the cover methods provided by
JTree, the TreePaths parents will be
expanded to make them visible (visible meaning the parent path is
expanded, not necessarily in the visible rectangle of the
JTree). If false, when the selection
changes the nodes parent is not made visible (all its parents expanded).
This is useful if you wish to have your selection model maintain paths
that are not always visible (all parents expanded).
newValue:Boolean — the new value for expandsSelectedPaths
the parent of the path visible.
|
| setFixedCellWidth | () | method |
public function setFixedCellWidth(width:int):void
Sets the width of every cell in the list. If width is -1,
cell widths are computed by applying getPreferredSize
to the TreeCell component for each list element.
The default value of this property is -1.
If your tree model is very large or all of your tree item has same width,
i recommend you set a fixed cell with it will speed up the performance.
Parameters
width:int — the width, in pixels, for all cells in this list
|
See also
| setFont | () | method |
| setHorizontalBlockIncrement | () | method |
public function setHorizontalBlockIncrement(increment:int):voidParameters
increment:int |
| setHorizontalUnitIncrement | () | method |
public function setHorizontalUnitIncrement(increment:int):voidParameters
increment:int |
| setInvokesStopCellEditing | () | method |
public function setInvokesStopCellEditing(newValue:Boolean):void
Determines what happens when editing is interrupted by selecting
another node in the tree, a change in the tree's data, or by some
other means. Setting this property to true causes the
changes to be automatically saved when editing is interrupted.
Fires a property change for the INVOKES_STOP_CELL_EDITING_PROPERTY. Parameters
newValue:Boolean — true means that stopCellEditing is invoked
when editing is interrupted, and data is saved; false means that
cancelCellEditing is invoked, and changes are lost
|
| setLayout | () | method |
public override function setLayout(layout:LayoutManager):voidYou can not set layout to JTree, it's handled by TreeUI.
Parameterslayout:LayoutManager |
— when set any layout.
|
| setLeadSelectionPath | () | method |
public function setLeadSelectionPath(newPath:TreePath):void
Sets the path identifies as the lead. The lead may not be selected.
The lead is not maintained by JTree,
rather the UI will update it.
newPath:TreePath — the new lead path
|
| setModel | () | method |
public function setModel(newModel:TreeModel):void
Sets the TreeModel that will provide the data.
newModel:TreeModel — the TreeModel that is to provide the data
|
| setRootVisible | () | method |
public function setRootVisible(rootVisible:Boolean):void
Determines whether or not the root node from
the TreeModel is visible.
rootVisible:Boolean — true if the root node of the tree is to be displayed
|
| setRowHeight | () | method |
public function setRowHeight(rowHeight:int):voidSets the height of each cell, in pixels. If the specified value is less than or equal to zero nothing will changed.(the current cell height will not change.)
ParametersrowHeight:int — the height of each cell, in pixels
|
| setRowHeightSet | () | method |
public function setRowHeightSet(b:Boolean):voidSets whether or not row height is set by user. If it is set by user, the LAF will not change the row height value.
Parametersb:Boolean — set or not
|
| setScrollsOnExpand | () | method |
public function setScrollsOnExpand(newValue:Boolean):void
Sets the scrollsOnExpand property,
which determines whether the
tree might scroll to show previously hidden children.
If this property is true (the default),
when a node expands
the tree can use scrolling to make
the maximum possible number of the node's descendants visible.
In some look and feels, trees might not need to scroll when expanded;
those look and feels will ignore this property.
newValue:Boolean — false to disable scrolling on expansion;
true to enable it
|
See also
| setScrollsOnExpandSet | () | method |
public function setScrollsOnExpandSet(b:Boolean):voidSets whether or not scrolls on expand is set by user. If it is set by user, the LAF will not change the scrolls on expand value.
Parametersb:Boolean — set or not
|
| setSelectionBackground | () | method |
public function setSelectionBackground(selectionBackground:ASColor):voidSets the background color for selected cells. Cell renderers can use this color to the fill selected cells.
The default value of this property is defined by the look and feel implementation. Parameters
selectionBackground:ASColor — the Color to use for the background
of selected cells
|
See also
| setSelectionForeground | () | method |
public function setSelectionForeground(selectionForeground:ASColor):voidSets the foreground color for selected cells. Cell renderers can use this color to render text and graphics for selected cells.
The default value of this property is defined by the look and feel implementation. Parameters
selectionForeground:ASColor — the Color to use in the foreground
for selected list items
|
See also
| setSelectionInterval | () | method |
public function setSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):voidSelects the nodes between index0 and index1, inclusive.
Parametersindex0:int — an integer specifying a display row, where 0 is the
first row in the display
|
|
index1:int — an integer specifying a second display row
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| setSelectionMode | () | method |
public function setSelectionMode(mode:int):voidProxy method which passes specified selection mode to the currently configured selection model.
Parametersmode:int — the selection mode identifier
|
| setSelectionModel | () | method |
public function setSelectionModel(selectionModel:TreeSelectionModel):void
Sets the tree's selection model. When a null value is
specified an emtpy
selectionModel is used, which does not allow selections.
selectionModel:TreeSelectionModel — the TreeSelectionModel to use,
or null to disable selections
|
See also
| setSelectionPath | () | method |
public function setSelectionPath(path:TreePath, programmatic:Boolean = true):void
Selects the node identified by the specified path. If any
component of the path is hidden (under a collapsed node), and
getExpandsSelectedPaths is true it is
exposed (made viewable).
path:TreePath — the TreePath specifying the node to select
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| setSelectionPaths | () | method |
public function setSelectionPaths(paths:Array, programmatic:Boolean = true):void
Selects the nodes identified by the specified array of paths.
If any component in any of the paths is hidden (under a collapsed
node), and getExpandsSelectedPaths is true
it is exposed (made viewable).
paths:Array — an array of TreePath objects that specifies
the nodes to select
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| setSelectionRow | () | method |
public function setSelectionRow(row:int, programmatic:Boolean = true):voidSelects the node at the specified row in the display.
Parametersrow:int — the row to select, where 0 is the first row in
the display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| setSelectionRows | () | method |
public function setSelectionRows(rows:Array, programmatic:Boolean = true):void
Selects the nodes corresponding to each of the specified rows
in the display. If a particular element of rows is
< 0 or >= getRowCount, it will be ignored.
If none of the elements
in rows are valid rows, the selection will
be cleared. That is it will be as if clearSelection
was invoked.
rows:Array — an array of ints specifying the rows to select,
where 0 indicates the first row in the display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change
|
| setToggleClickCount | () | method |
public function setToggleClickCount(clickCount:int):voidSets the number of mouse clicks before a node will expand or close. The default is 3.
ParametersclickCount:int |
| setUI | () | method |
public override function setUI(ui:ComponentUI):voidSets the L&F object that renders this component.
Parametersui:ComponentUI — the TreeUI L&F object
|
See also
| setVerticalBlockIncrement | () | method |
public function setVerticalBlockIncrement(increment:int):voidParameters
increment:int |
| setVerticalUnitIncrement | () | method |
public function setVerticalUnitIncrement(increment:int):voidParameters
increment:int |
| setViewportTestSize | () | method |
| setViewPosition | () | method |
public function setViewPosition(p:IntPoint, programmatic:Boolean = true):voidParameters
p:IntPoint |
|
programmatic:Boolean (default = true) |
| setVisibleRowCount | () | method |
public function setVisibleRowCount(newCount:int):void
Sets the number of rows that are to be displayed.
This will only work if the tree is contained in a
JScrollPane,
and will adjust the preferred size and size of that scrollpane.
newCount:int — the number of rows to display
|
| startEditingAtPath | () | method |
public function startEditingAtPath(path:TreePath):void
Selects the node identified by the specified path and initiates
editing. The edit-attempt fails if the CellEditor
does not allow
editing for the specified item.
path:TreePath — the TreePath identifying a node
|
| stopEditing | () | method |
public function stopEditing():Boolean
Ends the current editing session.
(The DefaultTreeCellEditor
object saves any edits that are currently in progress on a cell.
Other implementations may operate differently.)
Has no effect if the tree isn't being edited.
Note:
To make edit-saves automatic whenever the user changes their position in the tree, use { Returns
Boolean— true if editing was in progress and is now stopped, false if editing was not in progress
| treeDidChange | () | method |
public function treeDidChange():voidNotifies all listeners that have registered interest for notification on this event type.
See also
| treeNodesChanged | () | method |
| treeNodesInserted | () | method |
| treeNodesRemoved | () | method |
| treeStructureChanged | () | method |
| updateUI | () | method |
public override function updateUI():void
Notification from the UIManager that the L&F has changed.
Replaces the current UI object with the latest version from the
UIManager.
See also
| propertyChange | event |
org.aswing.event.PropertyChangeEvent
org.aswing.event.PropertyChangeEvent.PROPERTY_CHANGE
Dispatched when a property changed.
The PropertyChangeEvent.PROPERTY_CHANGE constant defines the value of the
type property of the event object for a propertyChange event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPropertyName() | value changed property name |
getOldValue() | old value |
getNewValue() | new value |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeCellEditingCanceled | event |
org.aswing.event.TreeCellEditEvent
org.aswing.event.TreeCellEditEvent.EDITING_CANCELED
Dispatched when the cell editing canceled.
The TreeCellEditEvent.EDITING_CANCELED constant defines the value of the
type property of the event object for a treeCellEditingCanceled event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the path be edit |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeCellEditingStarted | event |
org.aswing.event.TreeCellEditEvent
org.aswing.event.TreeCellEditEvent.EDITING_STARTED
Dispatched when the cell editing started.
The TreeCellEditEvent.EDITING_STARTED constant defines the value of the
type property of the event object for a treeCellEditingStarted event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the path be edit |
getOldValue() | the old value |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeCellEditingStopped | event |
org.aswing.event.TreeCellEditEvent
org.aswing.event.TreeCellEditEvent.EDITING_STOPPED
Dispatched when the cell editing finished.
The TreeCellEditEvent.EDITING_STOPPED constant defines the value of the
type property of the event object for a treeCellEditingStopped event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the path be edit |
getOldValue() | the old value |
getNewValue() | the new value edited |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeCollapsed | event |
org.aswing.event.TreeEvent
org.aswing.event.TreeEvent.TREE_COLLAPSED
Dispatched when an item in the tree has been collapsed.
The TreeEvent.TREE_COLLAPSED constant defines the value of the
type property of the event object for a treeCollapsed event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the tree path |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeExpanded | event |
org.aswing.event.TreeEvent
org.aswing.event.TreeEvent.TREE_EXPANDED
Dispatched when an item in the tree has been expanded.
The TreeEvent.TREE_EXPANDED constant defines the value of the
type property of the event object for a treeExpanded event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the tree path |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeSelectionChanged | event |
org.aswing.event.TreeSelectionEvent
org.aswing.event.TreeSelectionEvent.TREE_SELECTION_CHANGED
Dispatched when tree items selection changed.
The TreeSelectionEvent.TREE_SELECTION_CHANGED constant defines the value of the
type property of the event object for a treeSelectionChanged event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
isProgrammatic() | True means this event is fired by the programmatic reason, false means user mouse/keyboard interaction reason. |
getPaths() | changed paths. |
getPath() | first path. |
isAddedPath() | is the first path element has been added to the selection. |
isAddedPathOfPath() | is path is added. |
isAddedPathOfIndex() | is path specified by index is added. |
getOldLeadSelectionPath() | previously the lead path. |
getNewLeadSelectionPath() | current lead path. |
cloneWithSource() | clone with source. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeWillCollapse | event |
org.aswing.event.TreeEvent
org.aswing.event.TreeEvent.TREE_WILL_COLLAPSE
Dispatched whenever a node in the tree is about to be expanded.
You can throw a ExpandVetoException in this event handler to indicate that this
action is veto.
The TreeEvent.TREE_WILL_COLLAPSE constant defines the value of the
type property of the event object for a treeWillCollapse event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the tree path |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| treeWillExpand | event |
org.aswing.event.TreeEvent
org.aswing.event.TreeEvent.TREE_WILL_EXPAND
Dispatched whenever a node in the tree is about to be expanded.
You can throw a ExpandVetoException in this event handler to indicate that this
action is veto.
The TreeEvent.TREE_WILL_EXPAND constant defines the value of the
type property of the event object for a treeWillExpand event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPath() | the tree path |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| ANCHOR_SELECTION_PATH_PROPERTY | constant |
public static const ANCHOR_SELECTION_PATH_PROPERTY:String = "anchorSelectionPath"Bound property name for anchor selection path.
| AUTO_INCREMENT | constant |
public static const AUTO_INCREMENT:int = -2.147483648E9The default unit/block increment, it means auto count a value.
| CELL_EDITOR_PROPERTY | constant |
public static const CELL_EDITOR_PROPERTY:String = "cellEditor" Bound property name for cellEditor.
| CELL_FACTORY_PROPERTY | constant |
public static const CELL_FACTORY_PROPERTY:String = "cellFactory" Bound property name for cellFactory.
| CONTIGUOUS_TREE_SELECTION | constant |
public static const CONTIGUOUS_TREE_SELECTION:int = 2Selection can only be contiguous. This will only be enforced if a RowMapper instance is provided. That is, if no RowMapper is set this behaves the same as DISCONTIGUOUS_TREE_SELECTION.
| DISCONTIGUOUS_TREE_SELECTION | constant |
public static const DISCONTIGUOUS_TREE_SELECTION:int = 4Selection can contain any number of items that are not necessarily contiguous.
| EDITABLE_PROPERTY | constant |
public static const EDITABLE_PROPERTY:String = "editable" Bound property name for editable.
| EXPANDS_SELECTED_PATHS_PROPERTY | constant |
public static const EXPANDS_SELECTED_PATHS_PROPERTY:String = "expandsSelectedPaths"Bound property name for expands selected paths property
| FONT_PROPERTY | constant |
public static const FONT_PROPERTY:String = "font"Bound property name for font property
| INVOKES_STOP_CELL_EDITING_PROPERTY | constant |
public static const INVOKES_STOP_CELL_EDITING_PROPERTY:String = "invokesStopCellEditing" Bound property name for messagesStopCellEditing.
| LEAD_SELECTION_PATH_PROPERTY | constant |
public static const LEAD_SELECTION_PATH_PROPERTY:String = "leadSelectionPath" Bound property name for leadSelectionPath.
| ROOT_VISIBLE_PROPERTY | constant |
public static const ROOT_VISIBLE_PROPERTY:String = "rootVisible" Bound property name for rootVisible.
| ROW_HEIGHT_PROPERTY | constant |
public static const ROW_HEIGHT_PROPERTY:String = "rowHeight" Bound property name for showsRootHandles.
| SCROLLS_ON_EXPAND_PROPERTY | constant |
public static const SCROLLS_ON_EXPAND_PROPERTY:String = "scrollsOnExpand" Bound property name for scrollsOnExpand.
| SELECTION_MODEL_PROPERTY | constant |
public static const SELECTION_MODEL_PROPERTY:String = "selectionModel"Bound property name for selectionModel.
| SINGLE_TREE_SELECTION | constant |
public static const SINGLE_TREE_SELECTION:int = 1Selection can only contain one path at a time.
| TOGGLE_CLICK_COUNT_PROPERTY | constant |
public static const TOGGLE_CLICK_COUNT_PROPERTY:String = "toggleClickCount" Bound property name for toggleClickCount.
| TREE_MODEL_PROPERTY | constant |
public static const TREE_MODEL_PROPERTY:String = "model" Bound property name for treeModel.
| VISIBLE_ROW_COUNT_PROPERTY | constant |
public static const VISIBLE_ROW_COUNT_PROPERTY:String = "visibleRowCount" Bound property name for visibleRowCount.