Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
MatrixTree Class Reference
Inheritance diagram for MatrixTree:
FinderTree

Data Structures

class  DoubleClickHandler
 
class  DragHandler
 
class  DropHandler
 
class  MatrixCueGestureHandler
 
class  MatrixTreeUI
 
class  MenuHandler
 

Public Member Functions

 MatrixTree ()
 
 MatrixTree (TreeModel model)
 
void autoscroll (Point pt)
 
Insets getAutoscrollInsets ()
 
void addNewLinkListener (NewLinkListener l)
 
void removeNewLinkListener (NewLinkListener l)
 
void addNewAssetListener (NewAssetListener l)
 
void removeNewAssetListener (NewAssetListener l)
 
void addNodeDoubleClickedListener (NodeDoubleClickedListener cl)
 
void removeNodeDoubleClickedListener (NodeDoubleClickedListener cl)
 
MatrixTreeNode[] getSelectionNodes ()
 
MatrixTreeNode getSelectionNode ()
 
boolean isMultipleSelection ()
 
boolean isEmptySelection ()
 
TreePath getPathToRoot (MatrixTreeNode node)
 
TreePath[] pathsToArray (java.util.List paths)
 
void startAssetFinderMode ()
 
void stopAssetFinderMode ()
 
void createSelection ()
 
void treeWillExpand (TreeExpansionEvent evt)
 
boolean parentIsRoot (MatrixTreeNode child)
 
boolean nodeIsRoot (MatrixTreeNode node)
 
boolean hasPreviousNode (MatrixTreeNode parent)
 
boolean hasNextNode (MatrixTreeNode parent)
 
void loadChildAssets (final String[] assetids, final String[] sort_orders, final boolean selectAll, final boolean teleport)
 
void loadChildAssets (final MatrixTreeNode node)
 
void loadChildAssets (final MatrixTreeNode node, final String direction, final int start, final int limit)
 
void treeWillCollapse (TreeExpansionEvent evt)
 
void moveGestureRecognized (CueEvent evt)
 
void addGestureRecognized (CueEvent evt)
 
void multipleMoveGestureRecognized (CueEvent evt)
 
void multipleAddGestureRecognized (CueEvent evt)
 
void multipleAddGestureCompleted (CueEvent evt)
 
void moveGestureCompleted (CueEvent evt)
 
void addGestureCompleted (CueEvent evt)
 
void multipleMoveGestureCompleted (CueEvent evt)
 
void teleportToRoot (MatrixTreeNode node)
 
void fireCreateLink (String type, MatrixTreeNode[] sources, MatrixTreeNode parent, int index, int prevIndex)
 
void fireCreateLink (String type, MatrixTreeNode[] sources, MatrixTreeNode parent, int index)
 
void fireNewAsset (String typeCode, MatrixTreeNode parent, int index)
 
void fireNodeDoubleClicked (TreePath clickedPath, Point point)
 
void paintComponent (Graphics g)
 
Image getDragImage (TreePath[] paths)
 
boolean isInAssetFinderMode ()
 
Font getFontInUse ()
 
void removeKeyStroke (String key)
 
void insertExpandNextNode (MatrixTreeNode parentNode)
 
void insertExpandPreviousNode (MatrixTreeNode parentNode)
 

Static Public Attributes

static final Color ASSET_FINDER_BG_COLOR = new Color(0xE9D4F4)
 

Protected Member Functions

MenuHandler getMenuHandler ()
 
DoubleClickHandler getDoubleClickHandler ()
 
DragHandler getDragHandler ()
 
DropHandler getDropHandler ()
 
CueGestureHandler getCueGestureHandler ()
 
Image getDragImageForPaths (TreePath[] paths)
 
boolean canMoveNode (Object node)
 
boolean canMoveNodes (Object[] nodes)
 
void setKeyboardActions ()
 

Detailed Description

The MatrixTree class is the main tree in the Matrix asset map.

Author
Marc McIntyre mmcin.nosp@m.tyre.nosp@m.@squi.nosp@m.z.ne.nosp@m.t

Definition at line 51 of file MatrixTree.java.

Constructor & Destructor Documentation

MatrixTree ( )
inline

Returns a MatrixTree with some sample data.

Definition at line 81 of file MatrixTree.java.

MatrixTree ( TreeModel  model)
inline

Returns a MatrixTree constructed by the tree model.

Parameters
modelthe tree model to construct the tree with.

Definition at line 90 of file MatrixTree.java.

Member Function Documentation

void addGestureCompleted ( CueEvent  evt)
inline

CueListener event method that is fired when a request for a new node to be added is recognized.

Parameters
evtthe CueEvent
See Also
CueListener::requestForAddCompleted(CueEvent)

Definition at line 738 of file MatrixTree.java.

void addNewAssetListener ( NewAssetListener  l)
inline

Adds a NewAssetListener to listen for new asset events

Parameters
lthe NewLinkListener to add

Definition at line 186 of file MatrixTree.java.

void addNewLinkListener ( NewLinkListener  l)
inline

Adds a NewLinkListener to listen for new link events

Parameters
lthe NewLinkListener to add

Definition at line 170 of file MatrixTree.java.

void addNodeDoubleClickedListener ( NodeDoubleClickedListener  cl)
inline

Adds a NodeDoubleClickedListener

Parameters
clthe listener

Definition at line 202 of file MatrixTree.java.

void autoscroll ( Point  pt)
inline

Autoscrolls to the specified point

Parameters
ptthe point to scroll to

Definition at line 140 of file MatrixTree.java.

boolean canMoveNode ( Object  node)
inlineprotected

Returns TRUE if the specified node can be moved

Parameters
objectnode the node to be moved
Returns
TRUE if the specified node can be moved

Definition at line 988 of file MatrixTree.java.

boolean canMoveNodes ( Object[]  nodes)
inlineprotected

Returns TRUE if the specified nodes can be moved

Parameters
nodesthe nodes to check
Returns
TRUE if the nodes can be moved

Definition at line 1004 of file MatrixTree.java.

void createSelection ( )
inline

Creates a selection from the currently selected nodes in the tree. Any nodes in the current selection are replaced with the currently selected nodes.

Definition at line 312 of file MatrixTree.java.

void fireCreateLink ( String  type,
MatrixTreeNode[]  sources,
MatrixTreeNode  parent,
int  index,
int  prevIndex 
)
inline

Fires an event for a create link operation to all the NewLinkListeners.

Parameters
typethe type link that will be created
sourcethe source of the new link
parentthe parent where the source will be linked underneath
indexthe index under the parent where the link will be created

Definition at line 790 of file MatrixTree.java.

void fireNewAsset ( String  typeCode,
MatrixTreeNode  parent,
int  index 
)
inline

Fires an event for a new asset operation to all the NewAssetListeners.

Parameters
assetTypethe type of asset that will be created
parentthe parent where the new asset will be created
indexthe index where the new asset will be created

Definition at line 833 of file MatrixTree.java.

void fireNodeDoubleClicked ( TreePath  clickedPath,
Point  point 
)
inline

Fires an event to indicate that a node has been double clicked

Parameters
clickedPaththe path of the node that has been clicked
pointthe point where the click occured

Definition at line 862 of file MatrixTree.java.

Insets getAutoscrollInsets ( )
inline

Returns the Insets for use during autoscrolling

Returns
the Insets for use during autoscrolling

Definition at line 156 of file MatrixTree.java.

CueGestureHandler getCueGestureHandler ( )
inlineprotected

Returns thr Cue Gesture Handler to handle cue lines

Returns
the CueGestureHandler

Definition at line 962 of file MatrixTree.java.

DoubleClickHandler getDoubleClickHandler ( )
inlineprotected

Returns the double click handler that handles double clicks.

Returns
the double click handler

Definition at line 938 of file MatrixTree.java.

DragHandler getDragHandler ( )
inlineprotected

Returns the drag handler that handles drag operations.

Returns
the drag handler

Definition at line 946 of file MatrixTree.java.

Image getDragImage ( TreePath[]  paths)
inline

Returns the drag image for the specified TreePaths

Parameters
pathsthe tree paths for the wanted drag image
Returns
the drag image for the specified TreePaths
See Also
Draggable.getDragImage(TreePath[])
DragExchange

Definition at line 909 of file MatrixTree.java.

Image getDragImageForPaths ( TreePath[]  paths)
inlineprotected

Returns a drag image for the specifed paths. If there is multiple paths, the drag image will reflect the path traversal offsets in the path tree

Parameters
pathsthe paths for the wanted drag image
Returns
the drag image that reflects the specfied paths

Definition at line 973 of file MatrixTree.java.

DropHandler getDropHandler ( )
inlineprotected

Returns the Drop handler that handles Drop operations.

Returns
the drop handler

Definition at line 954 of file MatrixTree.java.

MenuHandler getMenuHandler ( )
inlineprotected

Returns the menu handler that handles menus.

Returns
the menu handler

Definition at line 930 of file MatrixTree.java.

TreePath getPathToRoot ( MatrixTreeNode  node)
inline

Returns the TreePath for the specfied node

Parameters
nodethe node of the wanted TreePath
Returns
the TreePath for the specified node

Definition at line 267 of file MatrixTree.java.

MatrixTreeNode getSelectionNode ( )
inline

Returns the first node that is currently selected in tree

Returns
the first node that is selected in the tree, or null if there are no nodes currently selected
See Also
getSelectionNodes()

Definition at line 236 of file MatrixTree.java.

MatrixTreeNode [] getSelectionNodes ( )
inline

Returns the nodes in the current selection.

Returns
the nodes in the current selection, or null if there are no nodes in the current selection
See Also
getSelectionNode()

Definition at line 220 of file MatrixTree.java.

boolean hasNextNode ( MatrixTreeNode  parent)
inline

Returns true if parent node has Next button (node)

Parameters
parent

Definition at line 385 of file MatrixTree.java.

boolean hasPreviousNode ( MatrixTreeNode  parent)
inline

Returns true if parent node has Previous button (node)

Parameters
parent

Definition at line 370 of file MatrixTree.java.

void insertExpandNextNode ( MatrixTreeNode  parentNode)
inline

Inserts a node that allows users to get next set of assets

Parameters
parentNodethe parent node to add the placeholder node

Definition at line 1222 of file MatrixTree.java.

void insertExpandPreviousNode ( MatrixTreeNode  parentNode)
inline

Inserts a node that allows users to get previous set of assets

Parameters
parentNodethe parent node to add the placeholder node

Definition at line 1249 of file MatrixTree.java.

boolean isEmptySelection ( )
inline

Returns TRUE if no nodes are currently selected

Returns
TRUE if no nodes are currently selected
See Also
isMultipleSelection()

Definition at line 258 of file MatrixTree.java.

boolean isInAssetFinderMode ( )
inline

Returns whether the tree is in finder mode

Returns
TRUE if in finder mode
FALSE otherwise

Definition at line 918 of file MatrixTree.java.

boolean isMultipleSelection ( )
inline

Returns TRUE if there more than one node selected, FALSE otherwise

Returns
TRUE if there more than one node selected, FALSE otherwise
See Also
isEmptySelection()

Definition at line 248 of file MatrixTree.java.

void loadChildAssets ( final String[]  assetids,
final String[]  sort_orders,
final boolean  selectAll,
final boolean  teleport 
)
inline

Works like original loadChildAssets but uses asset ids to locate nodes in the tree

Parameters
assetidsIds of the assets that are in the lineage of the asset that we are searching for
sort_ordersSort orders of the assets. This will make search quicker
selectAllSelects all the nodes that are in the lineage
teleportTeleport to the last selected node (i.e. searched asset)

Definition at line 452 of file MatrixTree.java.

void loadChildAssets ( final MatrixTreeNode  node,
final String  direction,
final int  start,
final int  limit 
)
inline

Makes a request to the Matrix system for the child nodes of the specifed node. The nodes will be automagically appended to the root node, and any assets that are not currently apart of the Asset map will be loaded, and their appropriate nodes will be added to the Asset's node list. A placeholder loading node will be appended to the parent node during the loading process, and will be removed once the loading of the child nodes has completed. If the nodes have already been loaded in a previous operation, and are not loaded under the specified parent, they are propagated to the parent. If the nodes have been loaded under the specfied parent, then the branch is simply expanded.

Parameters
nodeThe node whos children are to be loaded

Definition at line 618 of file MatrixTree.java.

void moveGestureCompleted ( CueEvent  evt)
inline

CueListener event that is fired when the request for a move operation is completed.

Parameters
evtthe CueEvent
See Also
CueListener::requestForMoveCompleted(CueEvent)

Definition at line 690 of file MatrixTree.java.

void multipleMoveGestureCompleted ( CueEvent  evt)
inline

CueListener event method that is fired when a request for a multiple move operation has completed

Parameters
evtthe CueEvent
See Also
CueListener::requestForMoveCompleted(CueEvent)

Definition at line 754 of file MatrixTree.java.

boolean nodeIsRoot ( MatrixTreeNode  node)
inline

Returns true if this node is the root node

Parameters
parent

Definition at line 357 of file MatrixTree.java.

void paintComponent ( Graphics  g)
inline

Overrides the paintComponent() method in CueTree to perform double buffering operations

Parameters
gthe graphics set to paint to.

Definition at line 884 of file MatrixTree.java.

boolean parentIsRoot ( MatrixTreeNode  child)
inline

Returns true if parent of this node is the root node

Parameters
parent

Definition at line 344 of file MatrixTree.java.

TreePath [] pathsToArray ( java.util.List  paths)
inline

Returns an array of TreePaths for the specifed List of TreePaths

Parameters
pathsthe List of TreePaths
Returns
the array of TreePaths

Definition at line 279 of file MatrixTree.java.

void removeNewAssetListener ( NewAssetListener  l)
inline

Removes a NewAssetListener

Parameters
lthe NewAssetListener to remove

Definition at line 194 of file MatrixTree.java.

void removeNewLinkListener ( NewLinkListener  l)
inline

Removes a NewLinkListener

Parameters
lthe NewLinkListener to remove

Definition at line 178 of file MatrixTree.java.

void removeNodeDoubleClickedListener ( NodeDoubleClickedListener  cl)
inline

Removes a NodeDoubleClickedListener

Parameters
clthe listener

Definition at line 210 of file MatrixTree.java.

void setKeyboardActions ( )
inlineprotected

Sets the keyboard actions for the tree to trigger ui components

Definition at line 1074 of file MatrixTree.java.

void startAssetFinderMode ( )
inline

Starts asset finder mode

See Also
stopAssetFinderMode()

Definition at line 287 of file MatrixTree.java.

void stopAssetFinderMode ( )
inline

Stops asset finder move

See Also
startAssetFinderMode()

Definition at line 299 of file MatrixTree.java.

void teleportToRoot ( MatrixTreeNode  node)
inline

Teleports the specified node to the root node in the tree

Parameters
nodethe node that will become the root node in the tree

Definition at line 777 of file MatrixTree.java.

void treeWillExpand ( TreeExpansionEvent  evt)
inline

Event listener method that is triggered when an expansion event is recognized

Parameters
evtthe TreeExpansionEvent

Definition at line 329 of file MatrixTree.java.


The documentation for this class was generated from the following file: