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
-
HSPACE
-
-
Link(Node, Node, Message, Date)
- A new link between node 'start' and node 'end'.
-
addDisplayMonitor(DisplayMonitor)
-
-
getBackground()
-
-
getBounds()
- Get the bounding box for this graphical object
-
getContextString()
- Returns the full, formatted display string of the Message
this object represents
-
getForeground()
-
-
getMessage()
- Get the Message this object represents
-
mousePressedHasEffect(int, int)
- Determines if the mouse being pressed at (x,y) has an effect on
the graphical appearance of this Link.
-
mouseReleasedHasEffect(int, int)
- Determines if the mouse being released at (x,y) has an effect on
the graphical appearance of this Link.
-
paint(Graphics)
- Paint the object onto the graphics context
-
setBackground(Color)
-
-
setContainerSize(Dimension)
-
-
setCrossedOut(boolean)
-
-
setCurrentIndex(int)
-
-
setForeground(Color)
-
-
setLabel(String)
- Set the label of this Link to be 'str'
-
switchNodes(Node, Node)
- If this Link is associated with the Node oldy, replace it for the Node newby
-
tidyUp()
-
-
toString()
-
-
unpaint(Graphics)
- Unpaint the object from the graphics context
HSPACE
public static int HSPACE
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.
unpaint
public void unpaint(Graphics gc)
- Unpaint the object from the graphics context
paint
public void paint(Graphics gc)
- Paint the object onto the graphics context
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.
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.
getBounds
public Rectangle getBounds()
- Get the bounding box for this graphical object
getMessage
public Message getMessage()
- Get the Message this object represents
getContextString
public String getContextString()
- Returns the full, formatted display string of the Message
this object represents
setCurrentIndex
public void setCurrentIndex(int ix)
- See Also:
- DisplayEvent
setCrossedOut
public void setCrossedOut(boolean state)
setContainerSize
public void setContainerSize(Dimension s)
- See Also:
- DisplayEvent
setBackground
public void setBackground(Color c)
getBackground
public Color getBackground()
setForeground
public void setForeground(Color c)
getForeground
public Color getForeground()
switchNodes
public void switchNodes(Node oldy,
Node newby)
- If this Link is associated with the Node oldy, replace it for the Node newby
addDisplayMonitor
public void addDisplayMonitor(DisplayMonitor monitor)
- See Also:
- DisplayEvent
tidyUp
public void tidyUp()
- See Also:
- DisplayEvent
setLabel
public void setLabel(String str)
- Set the label of this Link to be 'str'
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index