All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tc.application.LocalCalendar

java.lang.Object
   |
   +----tc.application.LocalCalendar

public class LocalCalendar
extends Object
implements Calendar
LocalCalendar is the local version of the example TC applications. It implements the user interface with its CalendarFrame component and on the other hand it also implements the database access with its DatabaseManager component. Local calendar (as opposed to CalendarClient and DatabaseServer -- the remote example) assumes that the database is accessible from the same machine as the application itself.

Version:
0.30, 1998/04/02
Author:
FRED development team, Jukka Viljamaa
See Also:
CalendarFrame, DatabaseManager

Variable Index

 o databaseManager
DatabaseManager handles the connection to the database.
 o frame
The calendar's frame.
 o timeGrid
The time grid.

Constructor Index

 o LocalCalendar(String[])
Initializes the LocalCalendar.

Method Index

 o addTimeSlices(Vector)
Adds the given time slices to the database.
 o closeDatabase()
Closes the database.
 o getDatabaseManager()
Returns the DatabaseManager.
 o getFrame()
Returns the calendar's frame.
 o getMarkers()
Gets the markers from the database and sets them to the calendar panel.
 o getTimeGrid()
Returns the time grid.
 o getTimeSlices(long, long)
Gets time slices from the database and sets them to the calendar panel.
 o main(String[])
Starts local calendar.
 o openDatabase()
Asks user identification and opens the database.
 o removeTimeSlices(Vector)
Removes the given time slices from the database.
 o reopenDatabase()
Closes the database and then calls openDatabase.
 o setDatabaseManager(DatabaseManager)
Sets the DatabaseManager.
 o setStatus(String)
Sets the status string for the calendar by using the status bar of the calendar panel.
 o setTimeGrid(TimeGrid)
Sets the time grid.
 o updateAccountOptions(AccountOptionsMessage)
Updates account options to database.
 o updateMarkers(Vector)
Updates the markers to database.

Variables

 o frame
 private static CalendarFrame frame
The calendar's frame.

 o timeGrid
 private TimeGrid timeGrid
The time grid.

 o databaseManager
 private DatabaseManager databaseManager
DatabaseManager handles the connection to the database.

Constructors

 o LocalCalendar
 public LocalCalendar(String args[])
Initializes the LocalCalendar.

Methods

 o main
 public static void main(String args[])
Starts local calendar.

Parameters:
args - The command line arguments.
 o addTimeSlices
 public boolean addTimeSlices(Vector slices)
Adds the given time slices to the database.

Parameters:
slices - A vector of TimeSlice objects.
Returns:
true on success.
 o closeDatabase
 public void closeDatabase()
Closes the database.

 o getMarkers
 public boolean getMarkers()
Gets the markers from the database and sets them to the calendar panel. Assumes the connection. Blocks until the server acknowledges.

Returns:
true on success.
 o getTimeGrid
 public TimeGrid getTimeGrid()
Returns the time grid.

 o getTimeSlices
 public boolean getTimeSlices(long start,
                              long end)
Gets time slices from the database and sets them to the calendar panel. Assumes the connection. Blocks until the server acknowledges.

Returns:
true on success.
 o removeTimeSlices
 public boolean removeTimeSlices(Vector slices)
Removes the given time slices from the database. Assumes the connection. Blocks until the server acknowledges.

Parameters:
slices - A vector of TimeSlice objects.
Returns:
true on success.
 o setStatus
 public void setStatus(String txt)
Sets the status string for the calendar by using the status bar of the calendar panel.

 o getFrame
 protected CalendarFrame getFrame()
Returns the calendar's frame.

 o reopenDatabase
 public void reopenDatabase()
Closes the database and then calls openDatabase.

 o openDatabase
 public void openDatabase()
Asks user identification and opens the database.

 o updateAccountOptions
 public boolean updateAccountOptions(AccountOptionsMessage options)
Updates account options to database.

 o updateMarkers
 public boolean updateMarkers(Vector markers)
Updates the markers to database.

Parameters:
options - The new options.
Returns:
true on success.
 o setTimeGrid
 protected void setTimeGrid(TimeGrid tg)
Sets the time grid.

 o getDatabaseManager
 private DatabaseManager getDatabaseManager()
Returns the DatabaseManager.

 o setDatabaseManager
 private void setDatabaseManager(DatabaseManager dbm)
Sets the DatabaseManager.


All Packages  Class Hierarchy  This Package  Previous  Next  Index