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

Method Index

 o addDisplayMonitor(DisplayMonitor)
Adds the specified display monitor to the object.
 o getContextString()
Get a string that is relevant to the current status of this object e.g.
 o mousePressedHasEffect(int, int)
Inform that the mouse button has been pressed at (x,y), return true if this has an effect on this displayevent
 o mouseReleasedHasEffect(int, int)
Inform that the mouse button has been released at (x,y), return true if this has an effect on this displayevent
 o paint(Graphics)
To paint the event onto the graphics context
 o setContainerSize(Dimension)
Set the maximum size that an object can use to display in.
 o setCurrentIndex(int)
Set the position of this event in relation to others stored by the MonitorCanvas.
 o tidyUp()
Instruction to the object to "tidy up" any attached display monitors and any other resources -- used as a destructor
 o unpaint(Graphics)
To delete the event from the graphics context

Methods

 o paint
 public abstract void paint(Graphics g)
To paint the event onto the graphics context

 o unpaint
 public abstract void unpaint(Graphics g)
To delete the event from the graphics context

 o 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

 o 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

 o setCurrentIndex
 public abstract void setCurrentIndex(int ix)
Set the position of this event in relation to others stored by the MonitorCanvas.

See Also:
setIndex
 o setContainerSize
 public abstract void setContainerSize(Dimension d)
Set the maximum size that an object can use to display in.

 o 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

 o tidyUp
 public abstract void tidyUp()
Instruction to the object to "tidy up" any attached display monitors and any other resources -- used as a destructor

 o 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