public final class TimeLine extends HistoricObject
changeListener, changeSupport
Modifier and Type | Method and Description |
---|---|
void |
addHistoricObject(HistoricObject newObject)
Adds a completely new Object to History (e.g. for load)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
boolean |
getBackwardPossible()
Returns if it is possible to move backward
|
java.lang.Object |
getClone() |
HistoricObject |
getCurrentElement()
Gets the element that is currently selected
|
boolean |
getForwardPossible()
Returns if it is possible to move forward
|
static TimeLine |
getInstance()
Getter for the singleton options (thread-save)
|
void |
initialize(HistoricObject currentElement)
Resets the History and makes the given Element the first in the
History
|
boolean |
isDirty() |
void |
notifyAboutChange()
Notifies Observers about change
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setDirty(boolean dirty) |
boolean |
travelBackward()
Move backward in the history
|
boolean |
travelForward()
Move forward in the history
|
addChangeListener, removeChangeListener
public void notifyAboutChange()
public static TimeLine getInstance()
public void initialize(HistoricObject currentElement)
currentElement
- the first Element of the new Historypublic HistoricObject getCurrentElement()
public boolean travelForward()
public boolean travelBackward()
public boolean isDirty()
isDirty
in class HistoricObject
public void setDirty(boolean dirty)
setDirty
in class HistoricObject
public boolean getForwardPossible()
public boolean getBackwardPossible()
public void addHistoricObject(HistoricObject newObject)
newObject
- the new Element to be addedpublic java.lang.Object getClone()
getClone
in class HistoricObject
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)