org.problets.lib.conceptmap.view
Class LinkView

java.lang.Object
  extended by org.problets.lib.conceptmap.view.LinkView
Direct Known Subclasses:
UserBuiltLinkView

public class LinkView
extends java.lang.Object

The LinkView class performs the painting for each link. Each link instantiates a view for painting its connection.

Author:
Eric Fernandes, Adrian Maries December 2003

Constructor Summary
LinkView(NodeView inSource, NodeView inTarget, LinkModel inLinkModel)
          Creates a LinkView object using the source and target node views and the link model as arguments.
 
Method Summary
 void draw(java.awt.Graphics g)
          Performs the painting of the link view.
 boolean getIsHighlighted()
          Returns the highlighting status for this link.
 boolean getIsVisible()
          Returns the visibility status for this link.
 NodeView getSource()
          Returns the source node view for this link.
 NodeView getTarget()
          Returns the target node view for this link.
static void main(java.lang.String[] args)
           
 void setIsHighlighted(boolean inIsHighlighted)
          Sets the flag for this link's highlighting status.
 void setIsVisible(boolean inIsVisible)
          Sets the flag for this link's visibility status.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkView

public LinkView(NodeView inSource,
                NodeView inTarget,
                LinkModel inLinkModel)
Creates a LinkView object using the source and target node views and the link model as arguments.

Parameters:
inSource - the source (originating) node view
inTarget - the target (destinatiuon) node view
inLinkModel - the link model for which this view is created
Method Detail

draw

public void draw(java.awt.Graphics g)
Performs the painting of the link view.

Parameters:
g - the graphics context

getIsHighlighted

public boolean getIsHighlighted()
Returns the highlighting status for this link.

Returns:
true if the link is highlighted, false otherwise

getIsVisible

public boolean getIsVisible()
Returns the visibility status for this link.

Returns:
true if the link is visible, false otherwise

getSource

public NodeView getSource()
Returns the source node view for this link.

Returns:
the source node for this link

getTarget

public NodeView getTarget()
Returns the target node view for this link.

Returns:
the target node for this link

setIsHighlighted

public void setIsHighlighted(boolean inIsHighlighted)
Sets the flag for this link's highlighting status.

Parameters:
inIsHighlihgted - the highlighting status for this link

setIsVisible

public void setIsVisible(boolean inIsVisible)
Sets the flag for this link's visibility status.

Parameters:
inIsVisible - the visiblity status for this link

main

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