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

Quick Search    Search Deep

org.dma.ihm.game.calendar
Class GameCalendar  view GameCalendar download GameCalendar.java

java.lang.Object
  extended byorg.dma.ihm.game.calendar.GameCalendar
All Implemented Interfaces:
java.io.Serializable

public class GameCalendar
extends java.lang.Object
implements java.io.Serializable

GameCalendar Provides an event calendar.

- Returns a Subset of a Calendar (GameCalendarHelper) for creating new events

- Returns the next "unplayed" event - Uses singelton pattern


Field Summary
private  java.util.Vector events
          The events
private  java.util.Calendar startDay
          The date when the year started
private  java.util.Calendar today
          Today
 
Constructor Summary
GameCalendar()
          Constructor disabled
 
Method Summary
 void addEvent(org.dma.ihm.game.calendar.events.GameCalendarEvent event)
          Add new event to the vector
 void endSeason()
          Resets the calendar for a new season
 java.util.Vector getEventsBySource(java.lang.Object source)
          Returns all events by source
 java.util.Vector getEventsFrom(java.util.Calendar day)
          Returns all events of a day
 java.util.Vector getEventsToday()
          Returns all events from today
 java.util.Calendar getFirstDay()
          Returns the first day of the season
 GameCalendarHelper getGameCalendarHelper()
          Return a new GameCalendarHelper which starts at day no 1
 GameCalendarHelper getGameCalendarHelperByDay(java.util.Calendar day)
          Return a new GameCalendarHelper
 GameCalendarHelper getGameCalendarHelperByToday()
          Return a new GameCalendarHelper which starts today
 java.util.Calendar getLastDay()
          Returns the last day of the season
 org.dma.ihm.game.calendar.events.GameCalendarEvent getNextEvent()
          Returns the next not processed event
 org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent getStopBeforeGamedayEvent(java.util.Calendar day)
          Very special routine for the StopBeforeGameday.
 org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarAllEvents()
          Returns table model with all events in the calendar
 org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarEventsBySource(java.lang.Object source, boolean includeSub)
          Returns table model with all events in the calendar by specific source
 org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarPublicEvents()
          Returns table model with all events in the calendar
 org.dma.ihm.game.calendar.helper.TMTeamCalendar getTMTeamCalendar(org.dma.ihm.game.team.Team team)
          Returns table model with all events for a team
 java.util.Calendar getToday()
          Return day no of today
private  void removeEventsBeforeToday()
          Removes all events before today
 void setStartDate(java.util.Calendar start)
          Sets the start date of this calendar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

events

private java.util.Vector events
The events


startDay

private java.util.Calendar startDay
The date when the year started


today

private java.util.Calendar today
Today

Constructor Detail

GameCalendar

public GameCalendar()
Constructor disabled

Method Detail

setStartDate

public void setStartDate(java.util.Calendar start)
Sets the start date of this calendar


addEvent

public void addEvent(org.dma.ihm.game.calendar.events.GameCalendarEvent event)
Add new event to the vector


getStopBeforeGamedayEvent

public org.dma.ihm.game.calendar.events.GameCalendarStopBeforeGamedayEvent getStopBeforeGamedayEvent(java.util.Calendar day)
Very special routine for the StopBeforeGameday. Because we want just ONE of this event per day, the Calendar gives it back


getGameCalendarHelper

public GameCalendarHelper getGameCalendarHelper()
Return a new GameCalendarHelper which starts at day no 1


getGameCalendarHelperByToday

public GameCalendarHelper getGameCalendarHelperByToday()
Return a new GameCalendarHelper which starts today


getGameCalendarHelperByDay

public GameCalendarHelper getGameCalendarHelperByDay(java.util.Calendar day)
Return a new GameCalendarHelper


getEventsFrom

public java.util.Vector getEventsFrom(java.util.Calendar day)
Returns all events of a day


getEventsToday

public java.util.Vector getEventsToday()
Returns all events from today


getToday

public java.util.Calendar getToday()
Return day no of today


endSeason

public void endSeason()
Resets the calendar for a new season


removeEventsBeforeToday

private void removeEventsBeforeToday()
Removes all events before today


getFirstDay

public java.util.Calendar getFirstDay()
Returns the first day of the season


getLastDay

public java.util.Calendar getLastDay()
Returns the last day of the season


getNextEvent

public org.dma.ihm.game.calendar.events.GameCalendarEvent getNextEvent()
Returns the next not processed event


getTMTeamCalendar

public org.dma.ihm.game.calendar.helper.TMTeamCalendar getTMTeamCalendar(org.dma.ihm.game.team.Team team)
Returns table model with all events for a team


getTMGameCalendarAllEvents

public org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarAllEvents()
Returns table model with all events in the calendar


getTMGameCalendarPublicEvents

public org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarPublicEvents()
Returns table model with all events in the calendar


getTMGameCalendarEventsBySource

public org.dma.ihm.game.calendar.helper.TMGameCalendar getTMGameCalendarEventsBySource(java.lang.Object source,
                                                                                       boolean includeSub)
Returns table model with all events in the calendar by specific source

- Including also special behavior for sources that provide other sources (like leagues)


getEventsBySource

public java.util.Vector getEventsBySource(java.lang.Object source)
Returns all events by source