org.problets.lib.conceptmap.view.navigable
Class NavigableNodeView

java.lang.Object
  extended by org.problets.lib.conceptmap.view.NodeView
      extended by org.problets.lib.conceptmap.view.navigable.NavigableNodeView
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class NavigableNodeView
extends NodeView
implements java.awt.event.ActionListener

Derived from NodeView. Adds to the functionality of a nodeview in order to handle a navigable node view.


Field Summary
 
Fields inherited from class org.problets.lib.conceptmap.view.NodeView
NO_NODE_PRESSED, NO_NODE_RELEASED, NON_ROOT_PRESSED, NON_ROOT_RELEASED, ROOT_PRESSED, ROOT_RELEASED
 
Constructor Summary
NavigableNodeView(NodeView parent, NodeModel nodeModel)
          Creates a NavigableNodeView object using the parent node view and the corresponding model as arguments.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Processes the actionPerformed event.
 javax.swing.JPopupMenu createPopupMenu(java.util.Vector menuItemNames)
          Creates the popup menu for this node.
 MousePressedInfo handleMousePressed(java.awt.event.MouseEvent e)
          Handles the mousePressed event.
 int handleMouseReleased(int xCoord, int yCoord)
          Handles the mouseReleased event.
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.problets.lib.conceptmap.view.NodeView
draw, findNode, getChildLink, getChildNode, getCurrentXEnd, getCurrentXStart, getCurrentYEnd, getCurrentYStart, getIndex, getIsExpanded, getIsHighlighted, getIsVisible, getMaxHeightOfDescendants, getMaxWidthOfDescendants, getMouseoverVisible, getMouseoverVisibleNode, getNodeModel, getNumChildren, getParent, handleMouseClicked, handleMouseDragged, handleMouseMoved, isOnChildLinks, isOnNode, layout, paintMouseover, setCoord, setExpandedUpToDepth, setIsHighlighted, setIsHighlightedAncestorPath, setIsLastPressed, setIsVisible, setLinksVisible, setMouseoverVisible, setParent, setTextFont
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigableNodeView

public NavigableNodeView(NodeView parent,
                         NodeModel nodeModel)
Creates a NavigableNodeView object using the parent node view and the corresponding model as arguments.

Parameters:
parent - this node view's parent
nodeModel - the model representing this node view
Method Detail

createPopupMenu

public javax.swing.JPopupMenu createPopupMenu(java.util.Vector menuItemNames)
Creates the popup menu for this node.

Parameters:
menuItemsVector - the vector with the names of the items in the popup menu
Returns:
the popup menu just created

handleMousePressed

public MousePressedInfo handleMousePressed(java.awt.event.MouseEvent e)
Handles the mousePressed event.

Overrides:
handleMousePressed in class NodeView
Parameters:
e - the mousePressed event
Returns:
a MousePressedInfo object

handleMouseReleased

public int handleMouseReleased(int xCoord,
                               int yCoord)
Handles the mouseReleased event.

Overrides:
handleMouseReleased in class NodeView
Parameters:
xCoord - the x-coordinate of the mouse event
yCoord - the y-coordinate of the mouse event
Returns:
ROOT_RELEASED if the mouse has been released on a root, NON_ROOT_RELEASED if the mouse was released on a node other than the root and NO_NODE_RELEASED if the was mouse wasn't released on any node

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Processes the actionPerformed event.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - the action event

main

public static void main(java.lang.String[] args)