org.problets.lib.conceptmap.view.userbuilt
Class TempUserBuiltNodeView

java.lang.Object
  extended by org.problets.lib.conceptmap.view.NodeView
      extended by org.problets.lib.conceptmap.view.userbuilt.UserBuiltNodeView
          extended by org.problets.lib.conceptmap.view.userbuilt.TempUserBuiltNodeView

public class TempUserBuiltNodeView
extends UserBuiltNodeView

Derived from UserBuiltNodeView. Adds to the functionality of user-built node view in order to handle a temporary user-built node view.

Author:
Adrian Maries

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
TempUserBuiltNodeView(UserBuiltNodeView parent, UserBuiltNodeModel nodeModel)
          Creates a TempUserBuiltNodeView object using the parent node view and the corresponding model as arguments.
 
Method Summary
static void main(java.lang.String[] args)
           
 void setArbitraryCoord(int xPos, int yPos, int cellWidth, int cellHeight)
          Sets the current x-coordinates and y-coordinates (start and end) of the temporary node view using the coordinates of the mouse cursor and the width and height of the cell as arguments.
 
Methods inherited from class org.problets.lib.conceptmap.view.userbuilt.UserBuiltNodeView
addChildIfOverlap, addChildLink, getOverlappedNode, handleActionPerformed, isOnChildLinks
 
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, handleMousePressed, handleMouseReleased, 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

TempUserBuiltNodeView

public TempUserBuiltNodeView(UserBuiltNodeView parent,
                             UserBuiltNodeModel nodeModel)
Creates a TempUserBuiltNodeView 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

setArbitraryCoord

public void setArbitraryCoord(int xPos,
                              int yPos,
                              int cellWidth,
                              int cellHeight)
Sets the current x-coordinates and y-coordinates (start and end) of the temporary node view using the coordinates of the mouse cursor and the width and height of the cell as arguments. The width and height of the cell are used (not the ones of the node) because we want the temporary nodes to be larger than the other nodes.

Parameters:
xPos - the x-coordinate of the center of the node view
yPos - the y-coordinate of the center of the node view
cellWidth - the width of a cell in the grid
cellHeight - the height of a cell in the grid

main

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