|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.problets.lib.conceptmap.view.NodeView
org.problets.lib.conceptmap.view.userbuilt.UserBuiltNodeView
public class UserBuiltNodeView
Derived from NodeView. Adds to the functionality of a node view in order to handle a user-built 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 | |
|---|---|
UserBuiltNodeView(UserBuiltNodeView parent,
UserBuiltNodeModel nodeModel)
Creates a UserBuiltNodeView object using the parent node view and the corresponding model as arguments. |
|
| Method Summary | |
|---|---|
boolean |
addChildIfOverlap(int xCoord,
int yCoord,
UserBuiltNodeView newChild)
Adss the node passed as argument to the current node's vector of child node views if the two nodes overlap. |
void |
addChildLink(UserBuiltLinkView childLink)
Adds a child link view to this node's vector of child links. |
UserBuiltNodeView |
getOverlappedNode(int xCoord,
int yCoord,
UserBuiltNodeView nodeView)
Returns the node that is overlapped by the node passed as argument. |
UserBuiltNodeView |
handleActionPerformed(int xCoord,
int yCoord)
Handles the actionPerformed event. |
NodeView |
isOnChildLinks(int x,
int y)
Checks if any mouse event (given by the coordinates passed as arguments) occurred inside any of this node view's child links. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserBuiltNodeView(UserBuiltNodeView parent,
UserBuiltNodeModel nodeModel)
parent - this node view's parentnodeModel - the model representing this node view| Method Detail |
|---|
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 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 may overlap this node
public NodeView isOnChildLinks(int x,
int y)
isOnChildLinks in class NodeViewx - the x-coordinate of the mouse eventy - the y-coordinate of the mouse event
public void addChildLink(UserBuiltLinkView childLink)
childLink - the link view to be added to this node's
vector of child links
public boolean addChildIfOverlap(int xCoord,
int yCoord,
UserBuiltNodeView newChild)
xCoord - the x-coordinate of the mouse eventyCoord - the y-coordinate of the mouse eventnewChild - 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 | |||||||||