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

Variable Index

 o frame
The client's frame.
 o timeGrid
The time grid.

Constructor Index

 o CalendarClient(String[])
Initializes the client by calling the super classes constructor, creates a frame for the client, and opens the database.

Method Index

 o addTimeSlices(Vector)
Adds the given time slices to the database.
 o closeDatabase()
Closes the database.
 o createMessageHandlers(ConnectionManager, MessageHandler)
Creates the message handlers for the client.
 o getFrame()
Returns the client'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 the client by processing first the command line arguments and then creating the client object.
 o openDatabase()
Connects to the server, asks user identification, and opens the database.
 o removeTimeSlices(Vector)
Removes the given time slices from the database.
 o reopenDatabase()
Disconnects from the server and then calls openDatabase.
 o setStatus(String)
Sets the status string for the client by using the status bas 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.
 o usage()
Prints usage information.

Variables

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

 o timeGrid
 private TimeGrid timeGrid
The time grid.

Constructors

 o 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].

Methods

 o 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.
 o closeDatabase
 public void closeDatabase()
Closes the database.

 o createMessageHandlers
 public MessageHandler createMessageHandlers(ConnectionManager ml,
                                             MessageHandler rootHandler)
Creates the message handlers for the client.

Overrides:
createMessageHandlers in class Client
 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 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].
 o openDatabase
 public void openDatabase()
Connects to the server, asks user identification, and opens the database.

 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 reopenDatabase
 public void reopenDatabase()
Disconnects from the server and then calls openDatabase.

 o 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
 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 getFrame
 protected CalendarFrame getFrame()
Returns the client's frame.

 o setTimeGrid
 protected void setTimeGrid(TimeGrid tg)
Sets the time grid.

 o usage
 protected void usage()
Prints usage information.

Overrides:
usage in class Client

All Packages  Class Hierarchy  This Package  Previous  Next  Index