|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.problets.lib.conceptmap.view.TreeView
org.problets.lib.conceptmap.view.userbuilt.UserBuiltTreeView
public class UserBuiltTreeView
Derived from TreeView. Adds to the functionality of a tree view in order to handle a user-built tree view.
| Constructor Summary | |
|---|---|
UserBuiltTreeView(TreeModel treeModel)
Creates a UserBuiltTreeView object using the corresponding tree model as argument. |
|
| Method Summary | |
|---|---|
boolean |
connectTree(int xCoord,
int yCoord,
UserBuiltNodeView nodeView)
Connects the node passed as argument to the current node (if they overlap). |
void |
draw(java.awt.Graphics g)
Performs the painting of the tree view. |
UserBuiltNodeView |
getOverlappedNode(int xCoord,
int yCoord,
UserBuiltNodeView nodeView)
Returns the node in the tree that is overlapped by the node passed as argument. |
NodeView |
getTempRoot()
Returns the temporary root of the tree. |
UserBuiltNodeView |
handleActionPerformed(int xCoord,
int yCoord)
Handles the actionPerformed event. |
boolean |
handleMouseDragged(int xCoord,
int yCoord)
Handles the mouseDragged event. |
MousePressedInfo |
handleMousePressed(java.awt.event.MouseEvent e)
Handles the mousePressed event. |
boolean |
handleMouseReleased(int xCoord,
int yCoord)
Handles the mouseReleased. |
static void |
main(java.lang.String[] args)
|
void |
setCoord(int inWidth,
int inHeight,
int horizSpacing,
int verticalSpacing)
Sets the coordinates of each node view in the tree. |
| Methods inherited from class org.problets.lib.conceptmap.view.TreeView |
|---|
findNode, getColumnsInTree, getLeftColumn, getMouseoverVisibleNode, getRoot, getRowsInTree, getTopRow, getTreeModel, handleMouseClicked, handleMouseMoved, highlightNode, highlightNode, highlightPath, highlightPath, layout, setColumnsInTree, setExpandedUpToDepth, setLeftColumn, setRowsInTree, setTextFont, setTopRow, updateSize |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserBuiltTreeView(TreeModel treeModel)
treeModel - the model representing this view| Method Detail |
|---|
public void draw(java.awt.Graphics g)
draw in class TreeViewg - the graphics contextpublic MousePressedInfo handleMousePressed(java.awt.event.MouseEvent e)
handleMousePressed in class TreeViewe - the mousePressed event
public boolean handleMouseReleased(int xCoord,
int yCoord)
handleMouseReleased in class TreeViewxCoord - the x-coordinate of the mouse eventyCoord - the y-coordinate of the mouse event
public boolean handleMouseDragged(int xCoord,
int yCoord)
handleMouseDragged in class TreeViewxCoord - the x-coordinate of the mouse eventyCoord - the y-coordinate of the mouse event
public UserBuiltNodeView handleActionPerformed(int xCoord,
int yCoord)
xCoord - the x-coordinate of the last mousePressed eventyCoord - the y-coordinate of the last mousePressed event
public NodeView getTempRoot()
public UserBuiltNodeView getOverlappedNode(int xCoord,
int yCoord,
UserBuiltNodeView nodeView)
xCoord - the x-coordinate of the mouse eventyCoord - the y-coordinate of the mouse eventnodeView - the node that overlaps one of the nodes in the current tree
public void setCoord(int inWidth,
int inHeight,
int horizSpacing,
int verticalSpacing)
setCoord in class TreeViewwidth - the width of one node viewheight - the height of one node viewhorizSpacing - the width of one cell in the gridverticalSpacing - the height of one cell in the grid
public boolean connectTree(int xCoord,
int yCoord,
UserBuiltNodeView nodeView)
xCoord - the x-coordinate of the mouse eventyCoord - the y-coordinate of the mouse eventnodeView - the node to compare with the current node
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||