apps.mathpadapp.conceptmapping
Class GraphNode

java.lang.Object
  extended by apps.mathpadapp.conceptmapping.GraphNode
Direct Known Subclasses:
MTFrame, ProjectorNode, RemoteDesktop

public class GraphNode
extends java.lang.Object

The Class GraphNode.


Nested Class Summary
static interface GraphNode.ConceptMapListener
          The listener interface for receiving conceptMap events.
 
Constructor Summary
GraphNode(GraphManager graphManager, OrthoContentItem nodeItem)
          Instantiates a new graph node.
 
Method Summary
 void addConceptMapListener(GraphNode.ConceptMapListener listener)
          Adds the concept map listener.
 void fireNodeConnected(GraphLink link)
          Fire node connected.
 void fireNodeDisconnected(GraphLink link)
          Fire node disconnected.
 OrthoContentItem getClosePoint()
          Gets the close point.
 GraphManager getGraphManager()
          Gets the graph manager.
 java.util.ArrayList<GraphLink> getIncomingLinks()
          Gets the incoming links.
 OrthoContentItem getLinkPoint()
          Gets the link point.
 Location getLocation()
          Gets the location.
 java.lang.String getName()
          Gets the name.
 OrthoContentItem getNodeItem()
          Gets the node item.
 java.util.ArrayList<GraphLink> getOutgoingLinks()
          Gets the outgoing links.
 boolean isLinkable()
          Checks if is linkable.
 void registerIncomingLink(GraphLink link)
          Register incoming link.
 void registerOutgoingLink(GraphLink link)
          Register outgoing link.
 void remove()
          Removes the.
 void removeConceptMapListeners()
          Removes the concept map listeners.
 void setClosePoint(OrthoContentItem closePoint)
          Sets the close point.
 void setLinkable(boolean isLinkable)
          Sets the linkable.
 void setLinkPoint(OrthoContentItem linkPoint)
          Sets the link point.
 void setLocation(float x, float y)
          Sets the location.
 void unregisterAllLinks()
          Unregister all links.
 boolean unregisterLink(GraphLink link)
          Unregister link.
 void updateConnectionPoints()
          Update connection points.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphNode

public GraphNode(GraphManager graphManager,
                 OrthoContentItem nodeItem)
Instantiates a new graph node.

Parameters:
graphManager - the graph manager
nodeItem - the node item
Method Detail

addConceptMapListener

public void addConceptMapListener(GraphNode.ConceptMapListener listener)
Adds the concept map listener.

Parameters:
listener - the listener

fireNodeConnected

public void fireNodeConnected(GraphLink link)
Fire node connected.

Parameters:
link - the link

fireNodeDisconnected

public void fireNodeDisconnected(GraphLink link)
Fire node disconnected.

Parameters:
link - the link

getClosePoint

public OrthoContentItem getClosePoint()
Gets the close point.

Returns:
the close point

getGraphManager

public GraphManager getGraphManager()
Gets the graph manager.

Returns:
the graph manager

getIncomingLinks

public java.util.ArrayList<GraphLink> getIncomingLinks()
Gets the incoming links.

Returns:
the incoming links

getLinkPoint

public OrthoContentItem getLinkPoint()
Gets the link point.

Returns:
the link point

getLocation

public Location getLocation()
Gets the location.

Returns:
the location

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

getNodeItem

public OrthoContentItem getNodeItem()
Gets the node item.

Returns:
the node item

getOutgoingLinks

public java.util.ArrayList<GraphLink> getOutgoingLinks()
Gets the outgoing links.

Returns:
the outgoing links

isLinkable

public boolean isLinkable()
Checks if is linkable.

Returns:
true, if is linkable

registerIncomingLink

public void registerIncomingLink(GraphLink link)
Register incoming link.

Parameters:
link - the link

registerOutgoingLink

public void registerOutgoingLink(GraphLink link)
Register outgoing link.

Parameters:
link - the link

remove

public void remove()
Removes the.


removeConceptMapListeners

public void removeConceptMapListeners()
Removes the concept map listeners.


setClosePoint

public void setClosePoint(OrthoContentItem closePoint)
Sets the close point.

Parameters:
closePoint - the new close point

setLinkable

public void setLinkable(boolean isLinkable)
Sets the linkable.

Parameters:
isLinkable - the new linkable

setLinkPoint

public void setLinkPoint(OrthoContentItem linkPoint)
Sets the link point.

Parameters:
linkPoint - the new link point

setLocation

public void setLocation(float x,
                        float y)
Sets the location.

Parameters:
x - the x
y - the y

unregisterAllLinks

public void unregisterAllLinks()
Unregister all links.


unregisterLink

public boolean unregisterLink(GraphLink link)
Unregister link.

Parameters:
link - the link
Returns:
true, if successful

updateConnectionPoints

public void updateConnectionPoints()
Update connection points.