Squiz Matrix
4.12.2
|
Data Structures | |
class | CueGestureHandler |
class | CueTreeUI |
Public Member Functions | |
CueTree () | |
CueTree (TreeModel model) | |
void | addCueGestureListener (CueGestureListener cgl) |
void | removeCueGestureListener (CueGestureListener cgl) |
void | setShowsGhostedNode (boolean b) |
boolean | getShowsGhostedNode () |
void | setMoveEnabled (boolean b) |
boolean | isMoveEnabled () |
TreePath | getCuePath () |
void | setCueLineStroke (Stroke stroke) |
Stroke | getCueLineStroke () |
void | setCueLineColor (Color color) |
Color | getCueLineColor () |
void | setHighlightPathStroke (Stroke stroke) |
Stroke | getHighlightPathStroke () |
void | setMoveCursor (Cursor cursor) |
void | setNoMoveCursor (Cursor cursor) |
void | setCueLineOffset (int offset) |
boolean | inCueMode () |
Rectangle | getPathBounds (TreePath[] paths) |
Image | getGhostedNode (TreePath path) |
Image | getGhostedNode (TreePath[] paths) |
Rectangle | getNodeIconBounds (TreePath path) |
void | initiateAddMode (TreePath[] paths, Point initPoint) |
void | startCueMode (TreePath[] paths) |
void | stopCueMode () |
void | setTriggersPath (boolean b) |
void | fireMoveGestureRecognized (TreePath sourcePath, TreePath parentPath, int index, Point p) |
void | fireMoveGestureRecognized (TreePath[] sourcePaths, TreePath parentPath, int index, Point p) |
void | fireMoveGestureCompleted (TreePath sourcePath, TreePath parentPath, int index, int prevIndex, Point p) |
void | fireMoveGestureCompleted (TreePath[] sourcePaths, TreePath parentPath, int index, int prevIndex, Point p) |
void | fireAddGestureRecognized (TreePath sourcePath, TreePath parentPath, int index, Point p) |
void | fireAddGestureRecognized (TreePath[] sourcePaths, TreePath parentPath, int index, Point p) |
void | fireAddGestureCompleted (TreePath sourcePath, TreePath parentPath, int index, Point p) |
void | fireAddGestureCompleted (TreePath[] sourcePaths, TreePath parentPath, int index, Point p) |
String[] | getCueModeParentIds () |
void | setCueModeParentIds (TreePath[] selectedPaths) |
void | setLastKeyPressed (int keyCode) |
int | getLastKeyPressed () |
Static Public Member Functions | |
static void | main (String[] args) |
Static Public Attributes | |
static final int | DRAG_MODE = 1 |
static final int | CLICK_MODE = 2 |
static final int | ADD_REQUEST_MODE = 1 |
static final int | MOVE_REQUEST_MODE = 2 |
static final String | INVALID_CURSOR = "Invalid.32x32" |
static final Rectangle | VOID_RECTANGLE = new Rectangle(0, 0, 0, 0) |
Protected Member Functions | |
CueGestureHandler | getCueGestureHandler () |
Component | getComponentForPath (TreePath path) |
void | paintGhostedNode (int x, int y, TreePath path) |
boolean | nodeIconContainsPoint (TreePath path, Point point) |
boolean | nodeIconContainsPoint (Point point) |
void | drawCueLine (TreePath path, boolean pathIsNewParent, boolean aboveTopPath) |
void | drawCueLine (TreePath path, int mouseY) |
Rectangle | highlightPath (TreePath path, Color color) |
boolean | canMoveNode (Object node) |
Protected Attributes | |
boolean | inCueMode = false |
int | cueLineOffset = 5 |
Rectangle | dirtyCueBounds = VOID_RECTANGLE |
Rectangle | dirtyGhostBounds = VOID_RECTANGLE |
A CueTree provides a means for moving nodes within a tree. The cue tree does not handle the moving operations, but mearly provides an interface for moving nodes within the tree.
Definition at line 38 of file CueTree.java.
|
inline |
Creates a CueTree
and adds some sample data
Definition at line 98 of file CueTree.java.
|
inline |
Constructs a CueTree
and sets the tree model.
model | the tree model |
Definition at line 107 of file CueTree.java.
|
inline |
Adds a listener for Cue Events
cl | the listener |
Definition at line 141 of file CueTree.java.
|
inlineprotected |
Returns TRUE if the node can be moved
node | the node the check |
Definition at line 1415 of file CueTree.java.
|
inlineprotected |
Draws a cue line to indicate where the node will be placed. The cue line will be drawn underneath the specified TreePath
path | the TreePath where the cue line will be drawn underneath |
pathIsNewParent | if TRUE the specified path is the new parent for this node. |
Definition at line 577 of file CueTree.java.
|
inlineprotected |
draws a cue line for the specifed path. The cue line may depict that the new position will be a child of the path specifed based on the specified mouse Y co-ordinate.
path | the treePath to draw the cue line |
mouseY | the mouse Y co-ordinate |
Definition at line 683 of file CueTree.java.
|
inline |
Fires an addGestureCompleted event to CueGestureListener
s to indicate that the operation for a new node has requested to be added has completed
sourcePath | the source path of the node where the add completed |
parentPath | the parent path to the node where the add completed |
index | the index of the the add completed |
p | the mouse point where the event occured |
Definition at line 907 of file CueTree.java.
|
inline |
Fires an addGestureRecognized event to CueGestureListener
s to indicate that a new node has requested to be added
sourcePath | the source path of the node to be added, use this as information carrier about the new node |
parentPath | the parent path to the node to be added |
index | the index of the the add started |
p | the mouse point where the event occured |
Definition at line 860 of file CueTree.java.
|
inline |
sourcePath | the source path to the node which is moving |
parentPath | the parent path to the node which is moving |
index | the index of the node that is moving |
p | the mouse point where the event occured |
Definition at line 811 of file CueTree.java.
|
inline |
Fires an moveGestureRecognized event to CueGestureListener
s to indicate that a move request has begin
sourcePath | the source path to the node which is moving |
parentPath | the parent path to the node which is moving |
index | the index of the node that is moving |
p | the mouse point where the event occured |
Definition at line 757 of file CueTree.java.
|
inlineprotected |
Returns the renderable component for the specified path
path | the TreePath to the wanted renderable component |
Definition at line 320 of file CueTree.java.
|
inlineprotected |
Returns the CueRequestHandler that will be used to handle cue requests
Definition at line 158 of file CueTree.java.
|
inline |
Returns the color of the cue line.
Definition at line 254 of file CueTree.java.
|
inline |
Gets the stroke used for the cue line
Definition at line 236 of file CueTree.java.
|
inline |
Returns the sourcePath of the cue, or null if not in cue mode.
Definition at line 214 of file CueTree.java.
|
inline |
Returns the Image for the component at the specified TreePath
path | the TreePath for the wanted component Image |
Definition at line 372 of file CueTree.java.
|
inline |
Returns a ghosted image for the specfied TreePaths
paths | the paths of the wanted ghosted node |
Definition at line 402 of file CueTree.java.
|
inline |
Gets the highlight path stroke that is used to indicate that a move will move the node under the highlighted parent
Definition at line 278 of file CueTree.java.
|
inline |
Returns the bounds of the Icon that belongs to the cell of the node at the specified TreePath
If the component returned by the cellrenderer is not an Instance of JLabel
, null is returned
path | the TreePath of the wanted cell to whom the Icon belongs |
Definition at line 450 of file CueTree.java.
|
inline |
Returns a union of the path bounds of all the paths in the specified TreePath array
paths | the paths of the wanted bounds |
Definition at line 353 of file CueTree.java.
|
inline |
Returns the ghosted node property
Definition at line 181 of file CueTree.java.
|
inlineprotected |
Highlights the specified path by drawing a rectangle around its bounds in the specified colour. The bounds of the painted rectangle are returned so the highlighted area can be erased.
path | the path of the node to be highlighted |
color | the color of the highlighting rectangled |
Definition at line 721 of file CueTree.java.
|
inline |
initiates that a new node will be added to the tree use the specified TreePath to specify information about the new node that will be added. eg.
TreePath path = new TreePath(new TreeNode(userObject));
path | the treepath that the fireAddStarted event will use as the sourcePath |
initPoint | where the add gesture initiated |
Definition at line 521 of file CueTree.java.
|
inline |
Returns TRUE if move opeations are enabled.
Definition at line 205 of file CueTree.java.
|
inlineprotected |
Returns TRUE if the specified point is within the specified path's icon's bounds
path | the path to the node |
point | the point to check |
Definition at line 483 of file CueTree.java.
|
inlineprotected |
Returns true if the specified point is within the bounds of a node's icon
point | the point to check |
Definition at line 500 of file CueTree.java.
|
inlineprotected |
Paints the ghosted node with the given TreePath at the specified location
x | the x co-ordinate |
y | the y co-ordinate |
path | the TreePath of the node to paint |
Definition at line 429 of file CueTree.java.
|
inline |
Removes a listener from Cue Events
cl | the listener |
Definition at line 150 of file CueTree.java.
|
inline |
Sets the color of the cue line that is drawn in move operations.
color | the color of the cue line |
Definition at line 245 of file CueTree.java.
|
inline |
Sets offset a which the cue line is drawn above/below the mouse pointer The default is 5. A negative integer will draw the cue line below the mouse pointer.
offset | the offset at which to draw the cue line from the mouse pointer |
Definition at line 307 of file CueTree.java.
|
inline |
Sets the stroke used for the cue line
stroke | the stroke to use for the cue line |
Definition at line 225 of file CueTree.java.
|
inline |
Sets the highlight path stroke that is used to indicate that a move will move the node under the highlighted parent
stroke | the stroke to use for the cue line |
Definition at line 266 of file CueTree.java.
|
inline |
Sets the cursor to indicate that a move operation will occur
cursor | the cursor |
Definition at line 287 of file CueTree.java.
|
inline |
Sets if moves are enabled on this tree. The tree has move enabled by default
enabled | if TRUE move opreations will be enabled |
Definition at line 190 of file CueTree.java.
|
inline |
Sets the cursor to indicate that this node cannot be moved
cursor | the cursor |
Definition at line 296 of file CueTree.java.
|
inline |
Sets the showsGhostedNode property. If TRUE during a drag sequence the node in question is shown as a ghosted image and follows the mouse.
value | If TRUE the node will be shown as a ghosted image during a drag sequence |
Definition at line 172 of file CueTree.java.
|
inline |
Sets whether a path is triggered when the move operation has completed. This is enabled by default.
b | if TRUE the path will be triggered when the move operation has completed |
Definition at line 564 of file CueTree.java.
|
inline |
Explicitly starts cue mode with the specified paths in the move operation.
paths | the paths in the move operation |
Definition at line 537 of file CueTree.java.
|
inline |
Explicitly stops Cue mode operations
Definition at line 551 of file CueTree.java.
|
static |
Mode that indicates that the tree is adding a node Mode that indicates that we are adding a node
Definition at line 47 of file CueTree.java.
|
static |
The mode that indicate that the tree supports clicking to move nodes
Definition at line 43 of file CueTree.java.
|
protected |
the offset that a cue line is drawn above or below the selected path
Definition at line 58 of file CueTree.java.
|
static |
The mode that indicate that the tree supports dragging
Definition at line 41 of file CueTree.java.
|
protected |
TRUE if we are in cue mode
Definition at line 56 of file CueTree.java.
|
static |
the cursor shown when the mouse hovers over a node that cannot be moved
Definition at line 51 of file CueTree.java.
|
static |
Mode that indicates that the tree is moving a node
Definition at line 49 of file CueTree.java.
|
static |
A non-null void rectangle
Definition at line 53 of file CueTree.java.