All Packages Class Hierarchy This Package Previous Next Index
Interface kraft.monitor.display.DisplayEvent
- public interface DisplayEvent
An event or ocurrence that needs to be graphically displayed
by the Monitor.
For example; a message being passed from one agent to another is
shown as an arrow, or an agent represented as circle with a name.
Defines methods that are important to ensure consistency is
maintained when visualising these events-- and the order in which
they occur is also maintained.
Contains a DisplayMonitor -- which is used to keep track of whether
an event has been displayed.
Used by the MonitorCanvas to help when despatching information
to the relevant objects -- so all can be viewed equally.
- Author:
- Ted Francis
- See Also:
- DisplayMonitor, MonitorCanvas, Link, Node
-
addDisplayMonitor(DisplayMonitor)
- Adds the specified display monitor to the object.
-
getContextString()
- Get a string that is relevant to the current status of this object
e.g.
-
mousePressedHasEffect(int, int)
- Inform that the mouse button has been pressed at (x,y),
return true if this has an effect on this displayevent
-
mouseReleasedHasEffect(int, int)
- Inform that the mouse button has been released at (x,y),
return true if this has an effect on this displayevent
-
paint(Graphics)
- To paint the event onto the graphics context
-
setContainerSize(Dimension)
- Set the maximum size that an object can use to display in.
-
setCurrentIndex(int)
- Set the position of this event in relation to others stored by
the MonitorCanvas.
-
tidyUp()
- Instruction to the object to "tidy up" any attached display monitors
and any other resources -- used as a destructor
-
unpaint(Graphics)
- To delete the event from the graphics context
paint
public abstract void paint(Graphics g)
- To paint the event onto the graphics context
unpaint
public abstract void unpaint(Graphics g)
- To delete the event from the graphics context
mousePressedHasEffect
public abstract boolean mousePressedHasEffect(int x,
int y)
- Inform that the mouse button has been pressed at (x,y),
return true if this has an effect on this displayevent
mouseReleasedHasEffect
public abstract boolean mouseReleasedHasEffect(int x,
int y)
- Inform that the mouse button has been released at (x,y),
return true if this has an effect on this displayevent
setCurrentIndex
public abstract void setCurrentIndex(int ix)
- Set the position of this event in relation to others stored by
the MonitorCanvas.
- See Also:
- setIndex
setContainerSize
public abstract void setContainerSize(Dimension d)
- Set the maximum size that an object can use to display in.
addDisplayMonitor
public abstract void addDisplayMonitor(DisplayMonitor d)
- Adds the specified display monitor to the object.
The DisplayEvent will then process the displayMonitor in
due course, and call
d.setDisplayed(true)
when appropriate
tidyUp
public abstract void tidyUp()
- Instruction to the object to "tidy up" any attached display monitors
and any other resources -- used as a destructor
getContextString
public abstract String getContextString()
- Get a string that is relevant to the current status of this object
e.g. the formatted string of a message
All Packages Class Hierarchy This Package Previous Next Index