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
-
databaseManager
- DatabaseManager handles the connection to the database.
-
frame
- The calendar's frame.
-
timeGrid
- The time grid.
-
LocalCalendar(String[])
- Initializes the LocalCalendar.
-
addTimeSlices(Vector)
- Adds the given time slices to the database.
-
closeDatabase()
- Closes the database.
-
getDatabaseManager()
- Returns the DatabaseManager.
-
getFrame()
- Returns the calendar's frame.
-
getMarkers()
- Gets the markers from the database and sets them to the calendar panel.
-
getTimeGrid()
- Returns the time grid.
-
getTimeSlices(long, long)
- Gets time slices from the database and sets them to the calendar panel.
-
main(String[])
- Starts local calendar.
-
openDatabase()
- Asks user identification and opens the database.
-
removeTimeSlices(Vector)
- Removes the given time slices from the database.
-
reopenDatabase()
- Closes the database and then calls openDatabase.
-
setDatabaseManager(DatabaseManager)
- Sets the DatabaseManager.
-
setStatus(String)
- Sets the status string for the calendar by using the status bar of the
calendar panel.
-
setTimeGrid(TimeGrid)
- Sets the time grid.
-
updateAccountOptions(AccountOptionsMessage)
- Updates account options to database.
-
updateMarkers(Vector)
- Updates the markers to database.
frame
private static CalendarFrame frame
- The calendar's frame.
timeGrid
private TimeGrid timeGrid
- The time grid.
databaseManager
private DatabaseManager databaseManager
- DatabaseManager handles the connection to the database.
LocalCalendar
public LocalCalendar(String args[])
- Initializes the LocalCalendar.
main
public static void main(String args[])
- Starts local calendar.
- Parameters:
- args - The command line arguments.
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.
closeDatabase
public void closeDatabase()
- Closes the database.
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.
getTimeGrid
public TimeGrid getTimeGrid()
- Returns the time grid.
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.
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.
setStatus
public void setStatus(String txt)
- Sets the status string for the calendar by using the status bar of the
calendar panel.
getFrame
protected CalendarFrame getFrame()
- Returns the calendar's frame.
reopenDatabase
public void reopenDatabase()
- Closes the database and then calls openDatabase.
openDatabase
public void openDatabase()
- Asks user identification and opens the database.
updateAccountOptions
public boolean updateAccountOptions(AccountOptionsMessage options)
- Updates account options to database.
updateMarkers
public boolean updateMarkers(Vector markers)
- Updates the markers to database.
- Parameters:
- options - The new options.
- Returns:
-
true
on success.
setTimeGrid
protected void setTimeGrid(TimeGrid tg)
- Sets the time grid.
getDatabaseManager
private DatabaseManager getDatabaseManager()
- Returns the DatabaseManager.
setDatabaseManager
private void setDatabaseManager(DatabaseManager dbm)
- Sets the DatabaseManager.
All Packages Class Hierarchy This Package Previous Next Index