Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dma.ihm.game.calendar.events
Class GameCalendarEvent  view GameCalendarEvent download GameCalendarEvent.java

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.dma.ihm.game.calendar.events.GameCalendarEvent
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
GameCalendarDisplayGuiEvent, GameCalendarGameDayEvent, GameCalendarStopBeforeGamedayEvent, GameCalendarYearEndEvent, GameCalendarYearStartEvent

public class GameCalendarEvent
extends java.util.EventObject
implements java.lang.Comparable, java.io.Serializable

GameCalendarEvent Baseclass of all GameCalendar events. Contains:

- Play method called by game thread

- Flag if event has already been "played"

- Date of event

- Implements comparable interface for sorting events in the GameCalendar

- NeedsOnline() function that returns boolean if event needs a "gui break"

- getDescription() returns description of event


Field Summary
protected  java.util.Calendar day
          Date of event
protected  java.lang.String description
          Description of event
static int EVENT_TYPE_INTERNAL
          Event is internal = default (not shown to the user)
static int EVENT_TYPE_PUBLIC
          Event is public (shown to the user)
protected  int eventType
          Event type
private  boolean isDone
          Flag if event has already been played
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GameCalendarEvent(java.lang.Object source, java.util.Calendar day, java.lang.String description)
          Constructs event, sets soruce, date and description of event
 
Method Summary
 void _setToDone()
          Set event as "played"
 int compareTo(java.lang.Object o)
          Implements the comparable interface
 java.util.Calendar getDay()
          Returns date of event
 java.lang.String getDescription()
          Returns description fo event
 int getEventType()
          Gets the event type of this event.
 java.lang.String getFormatedDate()
          Returns formated date
 java.util.Calendar getSortValue()
          Returns "sort value" (date) of the event
 boolean isDone()
          Returns boolean if event has already been played
 boolean needsOnline()
          Returns boolean if event needs "gui break
 void play()
          Play method called by game thread
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EVENT_TYPE_INTERNAL

public static final int EVENT_TYPE_INTERNAL
Event is internal = default (not shown to the user)

See Also:
Constant Field Values

EVENT_TYPE_PUBLIC

public static final int EVENT_TYPE_PUBLIC
Event is public (shown to the user)

See Also:
Constant Field Values

isDone

private boolean isDone
Flag if event has already been played


day

protected java.util.Calendar day
Date of event


description

protected java.lang.String description
Description of event


eventType

protected int eventType
Event type

Constructor Detail

GameCalendarEvent

public GameCalendarEvent(java.lang.Object source,
                         java.util.Calendar day,
                         java.lang.String description)
Constructs event, sets soruce, date and description of event

Method Detail

isDone

public boolean isDone()
Returns boolean if event has already been played


getEventType

public int getEventType()
Gets the event type of this event.


getDay

public java.util.Calendar getDay()
Returns date of event


getFormatedDate

public java.lang.String getFormatedDate()
Returns formated date


getDescription

public java.lang.String getDescription()
Returns description fo event


_setToDone

public void _setToDone()
Set event as "played"


play

public void play()
Play method called by game thread


needsOnline

public boolean needsOnline()
Returns boolean if event needs "gui break


getSortValue

public java.util.Calendar getSortValue()
Returns "sort value" (date) of the event


compareTo

public int compareTo(java.lang.Object o)
Implements the comparable interface

Specified by:
compareTo in interface java.lang.Comparable