All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kraft.monitor.display.Link

java.lang.Object
   |
   +----kraft.monitor.display.Link

public class Link
extends Object
implements DisplayEvent
Defines the graphic representation of a Message passed between two Monitorable objects.

This is a 'link' between two Node objects. Represented as an arrow containing the command name of the message. A mouse click on the object ( via calls to mousePressedHasEffect and mouseReleasedHasEffect ) will cause this object to display more information about itself graphically when it is repainted.

Author:
Ted Francis
See Also:
Message

Variable Index

 o HSPACE

Constructor Index

 o Link(Node, Node, Message, Date)
A new link between node 'start' and node 'end'.

Method Index

 o addDisplayMonitor(DisplayMonitor)
 o getBackground()
 o getBounds()
Get the bounding box for this graphical object
 o getContextString()
Returns the full, formatted display string of the Message this object represents
 o getForeground()
 o getMessage()
Get the Message this object represents
 o mousePressedHasEffect(int, int)
Determines if the mouse being pressed at (x,y) has an effect on the graphical appearance of this Link.
 o mouseReleasedHasEffect(int, int)
Determines if the mouse being released at (x,y) has an effect on the graphical appearance of this Link.
 o paint(Graphics)
Paint the object onto the graphics context
 o setBackground(Color)
 o setContainerSize(Dimension)
 o setCrossedOut(boolean)
 o setCurrentIndex(int)
 o setForeground(Color)
 o setLabel(String)
Set the label of this Link to be 'str'
 o switchNodes(Node, Node)
If this Link is associated with the Node oldy, replace it for the Node newby
 o tidyUp()
 o toString()
 o unpaint(Graphics)
Unpaint the object from the graphics context

Variables

 o HSPACE
 public static int HSPACE

Constructors

 o Link
 public Link(Node start,
             Node end,
             Message m,
             Date t)
A new link between node 'start' and node 'end'. The Message passed is m. t is the time this event ocurred.

Methods

 o unpaint
 public void unpaint(Graphics gc)
Unpaint the object from the graphics context

 o paint
 public void paint(Graphics gc)
Paint the object onto the graphics context

 o mouseReleasedHasEffect
 public boolean mouseReleasedHasEffect(int x,
                                       int y)
Determines if the mouse being released at (x,y) has an effect on the graphical appearance of this Link.

 o mousePressedHasEffect
 public boolean mousePressedHasEffect(int x,
                                      int y)
Determines if the mouse being pressed at (x,y) has an effect on the graphical appearance of this Link.

 o getBounds
 public Rectangle getBounds()
Get the bounding box for this graphical object

 o getMessage
 public Message getMessage()
Get the Message this object represents

 o getContextString
 public String getContextString()
Returns the full, formatted display string of the Message this object represents

 o setCurrentIndex
 public void setCurrentIndex(int ix)
See Also:
DisplayEvent
 o setCrossedOut
 public void setCrossedOut(boolean state)
 o setContainerSize
 public void setContainerSize(Dimension s)
See Also:
DisplayEvent
 o setBackground
 public void setBackground(Color c)
 o getBackground
 public Color getBackground()
 o setForeground
 public void setForeground(Color c)
 o getForeground
 public Color getForeground()
 o switchNodes
 public void switchNodes(Node oldy,
                         Node newby)
If this Link is associated with the Node oldy, replace it for the Node newby

 o addDisplayMonitor
 public void addDisplayMonitor(DisplayMonitor monitor)
See Also:
DisplayEvent
 o tidyUp
 public void tidyUp()
See Also:
DisplayEvent
 o setLabel
 public void setLabel(String str)
Set the label of this Link to be 'str'

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index