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

Data Structures

class  DragHandler
 
class  DropHandler
 
class  InspectorTreeModelListener
 
class  MatrixTableUI
 
class  MenuHandler
 

Public Member Functions

 InspectorGadget (TableModel model, MatrixTree tree)
 
InspectorNavigator getNavigator ()
 
MatrixTree getTree ()
 
void autoscroll (Point pt)
 
Insets getAutoscrollInsets ()
 
void addTransferListener (TransferListener l)
 
void removeTransferListener (TransferListener l)
 
NodePosition getSelectionNode ()
 
NodePosition[] getSelectionNodes ()
 
NodePosition getTopMostSelection (NodePosition[] positions)
 
NodePosition getBottomMostSelection (NodePosition[] positions)
 
NodePosition getLeftMostSelection (NodePosition[] positions)
 
NodePosition getRightMostSelection (NodePosition[] positions)
 
TreePath[] getSelectionPaths ()
 
TreePath getSelectionPath ()
 
Rectangle getSelectionBounds (NodePosition[] positions)
 
NodePosition getLastDraggableNode ()
 
void populateInspector (TreePath path)
 
void redrawInspector ()
 
void mouseEntered (MouseEvent evt)
 
void mouseExited (MouseEvent evt)
 
void mouseReleased (MouseEvent evt)
 
void mousePressed (MouseEvent evt)
 
void mouseClicked (MouseEvent evt)
 
void componentHidden (ComponentEvent e)
 
void componentMoved (ComponentEvent e)
 
void componentShown (ComponentEvent e)
 
void componentResized (ComponentEvent e)
 
void fireTransfer (int dragIndex, int dropIndex, MatrixTreeNode node, MatrixTreeNode dropParent)
 
void nodeDoubleClicked (NodeDoubleClickedEvent e)
 
void transferGestureRecognized (TransferEvent evt)
 
void initialisationComplete (InitialisationEvent e)
 
boolean mouseInsideCellComponent (Point point)
 
void paintComponent (Graphics g)
 

Protected Member Functions

boolean filtersAllowNode (MatrixTreeNode node)
 
DragHandler getDragHandler ()
 
DropHandler getDropHandler ()
 
MenuHandler getMenuHandler ()
 
InspectorTreeModelListener getInspectorTreeModelListener ()
 
Image getGhostedNode (NodePosition position)
 
Image getGhostedNode (NodePosition[] positions)
 
Image getDragImageForPosition (NodePosition[] positions)
 
Component getComponentForPosition (NodePosition position)
 

Protected Attributes

BufferedImage dblBuffer = null
 

Detailed Description

The InspectorGadget class is the Explorer style table in the Matrix asset map.

Author
Nathan de Vries ndvri.nosp@m.es@s.nosp@m.quiz..nosp@m.net

Definition at line 50 of file InspectorGadget.java.

Constructor & Destructor Documentation

InspectorGadget ( TableModel  model,
MatrixTree  tree 
)
inline

Returns an InspectorGadget which is a table representation of the tree passed as a parameter.

Parameters
modelthe table model to construct the table with.
treethe tree that the table represents.

Definition at line 88 of file InspectorGadget.java.

Member Function Documentation

void addTransferListener ( TransferListener  l)
inline

Adds a TransferListener to listen for transfer events

Parameters
lthe TransferListener to add

Definition at line 201 of file InspectorGadget.java.

void componentHidden ( ComponentEvent  e)
inline

Invoked when the component has been made invisible

Parameters
ea low-level event which indicates that a component moved, changed size, or changed visibility

Definition at line 574 of file InspectorGadget.java.

void componentMoved ( ComponentEvent  e)
inline

Invoked when the component's position changes

Parameters
ea low-level event which indicates that a component moved, changed size, or changed visibility

Definition at line 582 of file InspectorGadget.java.

void componentResized ( ComponentEvent  e)
inline

Invoked when the component's position changes

Parameters
ea low-level event which indicates that a component moved, changed size, or changed visibility

Definition at line 598 of file InspectorGadget.java.

void componentShown ( ComponentEvent  e)
inline

Invoked when the component's position changes

Parameters
ea low-level event which indicates that a component moved, changed size, or changed visibility

Definition at line 590 of file InspectorGadget.java.

boolean filtersAllowNode ( MatrixTreeNode  node)
inlineprotected

Checks if the filter allows this node to be displayed.

Parameters
nodethe MatrixTreeNode to check
Returns
TRUE if the filters don't block the node, FALSE otherwise.

Definition at line 764 of file InspectorGadget.java.

void fireTransfer ( int  dragIndex,
int  dropIndex,
MatrixTreeNode  node,
MatrixTreeNode  dropParent 
)
inline

Fires an event about the nodes that were dragged, and where they were dropped

Parameters
dragIndexindex of the node which was clicked to start the drag
dropIndexindex of the node which was dropped onto
nodethe node that was dragged
dropParentthe parent of the node at dropIndex

Definition at line 611 of file InspectorGadget.java.

NodePosition getBottomMostSelection ( NodePosition[]  positions)
inline

Returns the cell position of the bottom most selected node.

Returns
the cell position

Definition at line 281 of file InspectorGadget.java.

Component getComponentForPosition ( NodePosition  position)
inlineprotected

Returns the renderable component for the specified position

Parameters
positionthe NodePosition to the wanted renderable component
Returns
the renderable component for the specified position

Definition at line 910 of file InspectorGadget.java.

DragHandler getDragHandler ( )
inlineprotected

Returns the drag handler that handles drag operations.

Returns
the drag handler

Definition at line 779 of file InspectorGadget.java.

Image getDragImageForPosition ( NodePosition[]  positions)
inlineprotected

Returns a drag image for the specifed positions. If there is multiple positions, the drag image will reflect the cell layout offsets in the table

Parameters
positionsthe positions for the wanted drag image
Returns
the drag image that reflects the specfied positions

Definition at line 893 of file InspectorGadget.java.

DropHandler getDropHandler ( )
inlineprotected

Returns the Drop handler that handles Drop operations.

Returns
the drop handler

Definition at line 788 of file InspectorGadget.java.

Image getGhostedNode ( NodePosition  position)
inlineprotected

Returns the Image for the component at the specified NodePosition

Parameters
positionthe NodePosition for the wanted component Image
Returns
the image representation of the component at the given NodePosition
See Also
getGhostedNode(NodePosition[])

Definition at line 808 of file InspectorGadget.java.

Image getGhostedNode ( NodePosition[]  positions)
inlineprotected

Returns a ghosted image for the specfied NodePosition

Parameters
positionsthe positions of the wanted ghosted node
Returns
the ghosted node of the specifed positions
See Also
getGhostedNode(NodePosition)

Definition at line 838 of file InspectorGadget.java.

NodePosition getLastDraggableNode ( )
inline

Returns the NodePosition of the last !null cell in the table

Returns
the NodePosition

Definition at line 374 of file InspectorGadget.java.

NodePosition getLeftMostSelection ( NodePosition[]  positions)
inline

Returns the cell position of the left most selected node.

Returns
the cell position

Definition at line 296 of file InspectorGadget.java.

InspectorNavigator getNavigator ( )
inline

Returns the InspectorNavigator which provides navigational tools.

Returns
the inspector navigator

Definition at line 161 of file InspectorGadget.java.

NodePosition getRightMostSelection ( NodePosition[]  positions)
inline

Returns the cell position of the right most selected node.

Returns
the cell position

Definition at line 311 of file InspectorGadget.java.

Rectangle getSelectionBounds ( NodePosition[]  positions)
inline

Returns the Rectangle that the selected nodes are drawn into.

Parameters
positionsthe NodePositions of each selected node
Returns
the Rectangle the selected nodes are drawn in

Definition at line 350 of file InspectorGadget.java.

NodePosition getSelectionNode ( )
inline

Returns the first node that is currently selected in table

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

Definition at line 221 of file InspectorGadget.java.

NodePosition [] 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 238 of file InspectorGadget.java.

TreePath [] getSelectionPaths ( )
inline

Returns the paths of all selected values.

Returns
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected

Definition at line 327 of file InspectorGadget.java.

NodePosition getTopMostSelection ( NodePosition[]  positions)
inline

Returns the cell position of the top most selected node.

Returns
the cell position

Definition at line 266 of file InspectorGadget.java.

MatrixTree getTree ( )
inline

Returns the MatrixTree that this table is linked to.

Returns
the tree.

Definition at line 170 of file InspectorGadget.java.

void initialisationComplete ( InitialisationEvent  e)
inline

InitialisationListener event that is fired when the tree has completely finished loading

Parameters
ethe InitialisationEvent
See Also
InitialisationListener::initialisationComplete(InitialisationEvent)

Definition at line 666 of file InspectorGadget.java.

void mouseClicked ( MouseEvent  evt)
inline

Invoked when the mouse button has been clicked (pressed and released) on a component

Parameters
evtan event which indicates that a mouse action occurred in a component

Definition at line 520 of file InspectorGadget.java.

void mouseEntered ( MouseEvent  evt)
inline

Invoked when the mouse enters a component

Parameters
evtan event which indicates that a mouse action occurred in a component

Definition at line 487 of file InspectorGadget.java.

void mouseExited ( MouseEvent  evt)
inline

Invoked when the mouse exits a component

Parameters
evtan event which indicates that a mouse action occurred in a component

Definition at line 495 of file InspectorGadget.java.

boolean mouseInsideCellComponent ( Point  point)
inline

Checks whether the location specified by point is within the bounds of a cell's label or icon (JLabel)

Parameters
pointthe point to check for
Returns
TRUE if the point is within a component
FALSE if the point isn't within a component

Definition at line 680 of file InspectorGadget.java.

void mousePressed ( MouseEvent  evt)
inline

Invoked when a mouse button has been pressed on a component

Parameters
evtan event which indicates that a mouse action occurred in a component

Definition at line 511 of file InspectorGadget.java.

void mouseReleased ( MouseEvent  evt)
inline

Invoked when a mouse button has been released on a component

Parameters
evtan event which indicates that a mouse action occurred in a component

Definition at line 503 of file InspectorGadget.java.

void nodeDoubleClicked ( NodeDoubleClickedEvent  e)
inline

NodeDoubleClickedListener event that is fired when a node in a tree is double clicked

Parameters
ethe CueEvent
See Also
NodeDoubleClickedListener::nodeDoubleClicked(NodeDoubleClickedEvent)

Definition at line 639 of file InspectorGadget.java.

void paintComponent ( Graphics  g)
inline

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

Parameters
gthe graphics set to paint to.

Definition at line 736 of file InspectorGadget.java.

void populateInspector ( TreePath  path)
inline

Fills the table with all the nodes in one level of a TreePath

Parameters
paththe path of the nodes to display in the table

Definition at line 387 of file InspectorGadget.java.

void redrawInspector ( )
inline

Strips the nodes from a table and recreates the model according to the number of columns, usually after the table is resized

Definition at line 433 of file InspectorGadget.java.

void removeTransferListener ( TransferListener  l)
inline

Removes a TransferListener

Parameters
lthe TransferListener to remove

Definition at line 210 of file InspectorGadget.java.

void transferGestureRecognized ( TransferEvent  evt)
inline

TransferListener event that is fired when a valid node (or nodes) is dropped in an InspectorGadget component

Parameters
ethe TransferEvent
See Also
TransferListener::transferGestureRecognized(TransferEvent)

Implements TransferListener.

Definition at line 652 of file InspectorGadget.java.


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