All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tc.calendar.TimeSlice

java.lang.Object
   |
   +----tc.calendar.TimeSlice

public class TimeSlice
extends Object
implements Serializable
A TimeSlice object represents a period of time (from start to end) that is dedicated to some marker. The times are defined as milliseconds from the January 1st 1970.

Version:
0.30, 1998/04/01
Author:
FRED development team, Antti Viljamaa, Jukka Viljamaa
See Also:
Marker, TimeGrid

Variable Index

 o dateFormat
Formatter for times.
 o end
End of the time slice as milliseconds from the January 1st 1970.
 o marker
Marker of the time slice.
 o markerID
Marker id of the time slice.
 o start
Start of the time slice as milliseconds from the January 1st 1970.

Constructor Index

 o TimeSlice(long, long, int)
Initializes the time slice with the given start and end times and the given marker id.
 o TimeSlice(long, long, Marker)
Initializes the time slice with the given start and end times and the given marker.

Method Index

 o endTimeToString()
Returns the start time as a formatted string.
 o getDateFormat()
Gets the date and time formatter.
 o getEnd()
Returns the end of the time slice as milliseconds from the January 1st 1970.
 o getMarker()
Returns the marker of the time slice.
 o getMarkerID()
Gets the marker id of the time slice.
 o getStart()
Returns the start of the time slice as milliseconds from the January 1st 1970.
 o setDateFormat(SimpleDateFormat)
Sets the date and time formatter.
 o setEnd(long)
Sets the end of the time slice as milliseconds from the January 1st 1970.
 o setMarker(Marker)
Sets the marker of the time slice.
 o setMarkerID(int)
Sets the marker id of the time slice.
 o setStart(long)
Sets the start of the time slice as milliseconds from the January 1st 1970.
 o startTimeToString()
Returns the start time as a formatted string.
 o toString()
Returns the start and times as well as the marker as a formatted string.

Variables

 o dateFormat
 private SimpleDateFormat dateFormat
Formatter for times.

 o end
 private long end
End of the time slice as milliseconds from the January 1st 1970.

 o marker
 private transient Marker marker
Marker of the time slice.

 o markerID
 private int markerID
Marker id of the time slice.

 o start
 private long start
Start of the time slice as milliseconds from the January 1st 1970.

Constructors

 o TimeSlice
 public TimeSlice(long s,
                  long e,
                  Marker marker)
Initializes the time slice with the given start and end times and the given marker.

 o TimeSlice
 public TimeSlice(long s,
                  long e,
                  int markerID)
Initializes the time slice with the given start and end times and the given marker id.

Methods

 o endTimeToString
 public String endTimeToString()
Returns the start time as a formatted string.

 o getEnd
 public long getEnd()
Returns the end of the time slice as milliseconds from the January 1st 1970.

 o getMarker
 public Marker getMarker()
Returns the marker of the time slice.

 o getMarkerID
 public int getMarkerID()
Gets the marker id of the time slice.

 o getStart
 public long getStart()
Returns the start of the time slice as milliseconds from the January 1st 1970.

 o setDateFormat
 public void setDateFormat(SimpleDateFormat f)
Sets the date and time formatter.

 o setEnd
 public void setEnd(long e)
Sets the end of the time slice as milliseconds from the January 1st 1970.

 o setMarker
 public void setMarker(Marker m)
Sets the marker of the time slice.

 o setStart
 public void setStart(long s)
Sets the start of the time slice as milliseconds from the January 1st 1970.

 o startTimeToString
 public String startTimeToString()
Returns the start time as a formatted string.

 o toString
 public String toString()
Returns the start and times as well as the marker as a formatted string.

Overrides:
toString in class Object
 o getDateFormat
 protected SimpleDateFormat getDateFormat()
Gets the date and time formatter.

 o setMarkerID
 private void setMarkerID(int id)
Sets the marker id of the time slice.


All Packages  Class Hierarchy  This Package  Previous  Next  Index