|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.timeline.DefaultTimeLineModel
public class DefaultTimeLineModel
The default model of a time line.
This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project.
Field Summary | |
---|---|
protected java.util.List |
_changeListeners
|
protected java.util.Comparator |
_comparator
|
protected java.util.TreeSet |
_nodes
|
protected java.beans.PropertyChangeListener |
fMyChildListener
|
Fields inherited from interface jsky.timeline.TimeLineModel |
---|
ALL_NODES_REMOVED, NODE_ADDED, NODE_REMOVED |
Constructor Summary | |
---|---|
DefaultTimeLineModel(int interval)
constructor |
|
DefaultTimeLineModel(int start,
int end,
int intervals)
constructor |
|
DefaultTimeLineModel(Time start,
Time end,
int intervals)
constructor |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
add a property change listener to the time line. |
void |
addTimeLineNode(TimeLineNodeModel node)
add a time line node to the time line without checking its legality |
boolean |
contains(TimeLineNodeModel model)
returns whether or not the model contains the specified node |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent evt)
fires a change event to all listeners of the timeline |
java.util.Date |
getDateForTime(Time time)
takes a time and converts it into a date where the new date is equal to the start date + the time |
Time |
getEndTime()
get the ending value of the timeline |
int |
getIntervalCount()
get the number of intervals in the time line |
java.util.Date |
getStartDate()
get the start date |
Time |
getStartTime()
get the starting value in the timeline |
Time |
getTimeForDate(java.util.Date date)
takes a date and convert it to a time where the new time is equal to the date - start date |
java.util.Iterator |
getTimeLineNodesIterator()
get an iterator for the time line node models |
void |
removeAllTimeLineNodes()
remove all time line nodes from time line |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
remove a property change listener from the time line |
void |
removeTimeLineNode(TimeLineNodeModel node)
remove a time line node from the time line |
void |
setStartDate(java.util.Date date)
set the date from which the timeline should start Note: if the date is not null then all time values are considered offsets from it |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Comparator _comparator
protected java.util.TreeSet _nodes
protected java.util.List _changeListeners
protected java.beans.PropertyChangeListener fMyChildListener
Constructor Detail |
---|
public DefaultTimeLineModel(int interval)
interval
- the number of intervals in a 50 minute time linepublic DefaultTimeLineModel(int start, int end, int intervals)
start
- the starting minute of the timelineend
- the ending minute of the timelineintervals
- the number of intervals on the timelinepublic DefaultTimeLineModel(Time start, Time end, int intervals)
start
- the starting time of the timelineend
- the ending time of the timelineintervals
- the number of intervals on the timelineMethod Detail |
---|
public void addTimeLineNode(TimeLineNodeModel node)
addTimeLineNode
in interface TimeLineModel
public void removeTimeLineNode(TimeLineNodeModel node)
removeTimeLineNode
in interface TimeLineModel
public void removeAllTimeLineNodes()
removeAllTimeLineNodes
in interface TimeLineModel
public int getIntervalCount()
getIntervalCount
in interface TimeLineModel
public java.util.Iterator getTimeLineNodesIterator()
getTimeLineNodesIterator
in interface TimeLineModel
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface TimeLineModel
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface TimeLineModel
public java.util.Date getDateForTime(Time time)
getDateForTime
in interface TimeLineModel
public Time getTimeForDate(java.util.Date date)
getTimeForDate
in interface TimeLineModel
public void setStartDate(java.util.Date date)
setStartDate
in interface TimeLineModel
public java.util.Date getStartDate()
getStartDate
in interface TimeLineModel
public Time getStartTime()
getStartTime
in interface TimeLineModel
public Time getEndTime()
getEndTime
in interface TimeLineModel
protected void firePropertyChange(java.beans.PropertyChangeEvent evt)
public boolean contains(TimeLineNodeModel model)
contains
in interface TimeLineModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |