public final class History extends HistoricObject
changeListener, changeSupport
Constructor and Description |
---|
History() |
History(HistoricObject historicElement) |
Modifier and Type | Method and Description |
---|---|
void |
addHistoricObject(HistoricObject newObject)
Adds a Element at the current index and erases all elements past
that index
|
boolean |
getBackwardPossible()
Returns if you can navigate backward in history
|
java.lang.Object |
getClone() |
HistoricObject |
getCurrentElement()
Returns the Database that is currently active
|
boolean |
getForwardPossible()
Returns if you can navigate forward in history
|
java.util.ArrayList<HistoricObject> |
getHistory()
Returns the whole History
|
void |
initialize(HistoricObject currentElement)
(Re-)Initializes the History
|
boolean |
travelBackward()
Moves backward in history
|
boolean |
travelForward()
Moves forward in history
|
addChangeListener, isDirty, removeChangeListener, setDirty
public History()
public History(HistoricObject historicElement)
public void initialize(HistoricObject currentElement)
currentElement
- the Database that is current in usepublic boolean travelForward()
public boolean travelBackward()
public boolean getBackwardPossible()
public boolean getForwardPossible()
public void addHistoricObject(HistoricObject newObject)
newObject
- the element to add to the Historypublic HistoricObject getCurrentElement()
public java.util.ArrayList<HistoricObject> getHistory()
public java.lang.Object getClone()
getClone
in class HistoricObject