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
-
dateFormat
- Formatter for times.
-
end
- End of the time slice as milliseconds from the
January 1st 1970.
-
marker
- Marker of the time slice.
-
markerID
- Marker id of the time slice.
-
start
- Start of the time slice as milliseconds from the
January 1st 1970.
-
TimeSlice(long, long, int)
- Initializes the time slice with the given start and end times
and the given marker id.
-
TimeSlice(long, long, Marker)
- Initializes the time slice with the given start and end times
and the given marker.
-
endTimeToString()
- Returns the start time as a formatted string.
-
getDateFormat()
- Gets the date and time formatter.
-
getEnd()
- Returns the end of the time slice as milliseconds from the
January 1st 1970.
-
getMarker()
- Returns the marker of the time slice.
-
getMarkerID()
- Gets the marker id of the time slice.
-
getStart()
- Returns the start of the time slice as milliseconds from the
January 1st 1970.
-
setDateFormat(SimpleDateFormat)
- Sets the date and time formatter.
-
setEnd(long)
- Sets the end of the time slice as milliseconds from the
January 1st 1970.
-
setMarker(Marker)
- Sets the marker of the time slice.
-
setMarkerID(int)
- Sets the marker id of the time slice.
-
setStart(long)
- Sets the start of the time slice as milliseconds from the
January 1st 1970.
-
startTimeToString()
- Returns the start time as a formatted string.
-
toString()
- Returns the start and times as well as the marker as a formatted string.
dateFormat
private SimpleDateFormat dateFormat
- Formatter for times.
end
private long end
- End of the time slice as milliseconds from the
January 1st 1970.
marker
private transient Marker marker
- Marker of the time slice.
markerID
private int markerID
- Marker id of the time slice.
start
private long start
- Start of the time slice as milliseconds from the
January 1st 1970.
TimeSlice
public TimeSlice(long s,
long e,
Marker marker)
- Initializes the time slice with the given start and end times
and the given marker.
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.
endTimeToString
public String endTimeToString()
- Returns the start time as a formatted string.
getEnd
public long getEnd()
- Returns the end of the time slice as milliseconds from the
January 1st 1970.
getMarker
public Marker getMarker()
- Returns the marker of the time slice.
getMarkerID
public int getMarkerID()
- Gets the marker id of the time slice.
getStart
public long getStart()
- Returns the start of the time slice as milliseconds from the
January 1st 1970.
setDateFormat
public void setDateFormat(SimpleDateFormat f)
- Sets the date and time formatter.
setEnd
public void setEnd(long e)
- Sets the end of the time slice as milliseconds from the
January 1st 1970.
setMarker
public void setMarker(Marker m)
- Sets the marker of the time slice.
setStart
public void setStart(long s)
- Sets the start of the time slice as milliseconds from the
January 1st 1970.
startTimeToString
public String startTimeToString()
- Returns the start time as a formatted string.
toString
public String toString()
- Returns the start and times as well as the marker as a formatted string.
- Overrides:
- toString in class Object
getDateFormat
protected SimpleDateFormat getDateFormat()
- Gets the date and time formatter.
setMarkerID
private void setMarkerID(int id)
- Sets the marker id of the time slice.
All Packages Class Hierarchy This Package Previous Next Index