All Packages Class Hierarchy This Package Previous Next Index
Class tc.application.CalendarClient
java.lang.Object
|
+----connection.socket.Client
|
+----tc.application.CalendarClient
- public class CalendarClient
- extends Client
- implements Calendar
CalendarClient connects to the DatabaseServer to access calendar information
stored in database. These two classes are the main classes of TC's remote
version. The client has a frame in which the user can view and manipulate
time slices with markers.
- Version:
- 0.30, 1998/04/02
- Author:
- FRED development team, Jukka Viljamaa
- See Also:
- DatabaseServer, CalendarFrame, TimeSlice, Marker
-
frame
- The client's frame.
-
timeGrid
- The time grid.
-
CalendarClient(String[])
- Initializes the client by calling the super classes constructor,
creates a frame for the client, and opens the database.
-
addTimeSlices(Vector)
- Adds the given time slices to the database.
-
closeDatabase()
- Closes the database.
-
createMessageHandlers(ConnectionManager, MessageHandler)
- Creates the message handlers for the client.
-
getFrame()
- Returns the client'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 the client by processing first the command line arguments and
then creating the client object.
-
openDatabase()
- Connects to the server, asks user identification, and opens the database.
-
removeTimeSlices(Vector)
- Removes the given time slices from the database.
-
reopenDatabase()
- Disconnects from the server and then calls openDatabase.
-
setStatus(String)
- Sets the status string for the client by using the status bas of the
calendar panel.
-
setTimeGrid(TimeGrid)
- Sets the time grid.
-
updateAccountOptions(AccountOptionsMessage)
- Updates account options to database.
-
updateMarkers(Vector)
- Updates the markers to database.
-
usage()
- Prints usage information.
frame
private static CalendarFrame frame
- The client's frame.
timeGrid
private TimeGrid timeGrid
- The time grid.
CalendarClient
public CalendarClient(String args[])
- Initializes the client by calling the super classes constructor,
creates a frame for the client, and opens the database. The given
arguments are considered to be the command line arguments. They are
processed first.
- Parameters:
- args - The command line arguments. Usage:
java CalendarClient
[[servername] serverport]
.
addTimeSlices
public boolean addTimeSlices(Vector slices)
- Adds the given time slices to the database. Assumes the connection.
Blocks until the server acknowledges.
- Parameters:
- slices - A vector of TimeSlice objects.
- Returns:
-
true
on success.
closeDatabase
public void closeDatabase()
- Closes the database.
createMessageHandlers
public MessageHandler createMessageHandlers(ConnectionManager ml,
MessageHandler rootHandler)
- Creates the message handlers for the client.
- Overrides:
- createMessageHandlers in class Client
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.
main
public static void main(String args[])
- Starts the client by processing first the command line arguments and
then creating the client object.
- Parameters:
- args - The command line arguments. Usage:
java CalendarClient
[[servername] serverport]
.
openDatabase
public void openDatabase()
- Connects to the server, asks user identification, and opens the database.
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.
reopenDatabase
public void reopenDatabase()
- Disconnects from the server and then calls openDatabase.
setStatus
public void setStatus(String txt)
- Sets the status string for the client by using the status bas of the
calendar panel.
- Overrides:
- setStatus in class Client
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.
getFrame
protected CalendarFrame getFrame()
- Returns the client's frame.
setTimeGrid
protected void setTimeGrid(TimeGrid tg)
- Sets the time grid.
usage
protected void usage()
- Prints usage information.
- Overrides:
- usage in class Client
All Packages Class Hierarchy This Package Previous Next Index