vanetsim.scenario.events
Class Event

java.lang.Object
  extended by vanetsim.scenario.events.Event
All Implemented Interfaces:
java.lang.Comparable<Event>
Direct Known Subclasses:
StartBlocking, StopBlocking

public abstract class Event
extends java.lang.Object
implements java.lang.Comparable<Event>

An abstract class for events.


Constructor Summary
Event()
           
 
Method Summary
abstract  void destroy()
          Destroys itself.
abstract  void execute()
          This function should be called when the event is due.
abstract  java.lang.String getText()
          Returns a descriptive text for display in the GUI.
 java.awt.Color getTextColor()
          Gets the color of the descriptive text for display in the GUI.
 int getTime()
          Gets the time when this event will be fired.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Event

public Event()
Method Detail

getText

public abstract java.lang.String getText()
Returns a descriptive text for display in the GUI.

Returns:
the text

destroy

public abstract void destroy()
Destroys itself.


execute

public abstract void execute()
This function should be called when the event is due. The event here does all needed actions.


getTime

public int getTime()
Gets the time when this event will be fired.

Returns:
the time
See Also:
getTime()

getTextColor

public java.awt.Color getTextColor()
Gets the color of the descriptive text for display in the GUI.

Returns:
the text color
See Also:
getTextColor()