|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.data.UndoRedoHandler
public class UndoRedoHandler
| Field Summary | |
|---|---|
java.util.LinkedList<Command> |
commands
All commands that were made on the dataset. |
private java.util.LinkedList<OsmDataLayer.CommandQueueListener> |
listenerCommands
|
java.util.LinkedList<Command> |
redoCommands
The stack for redoing commands |
| Constructor Summary | |
|---|---|
UndoRedoHandler()
|
|
| Method Summary | |
|---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed. |
void |
add(Command c)
Execute the command and add it to the intern command queue. |
boolean |
addCommandQueueListener(OsmDataLayer.CommandQueueListener l)
|
void |
addNoRedraw(Command c)
Execute the command and add it to the intern command queue. |
void |
afterAdd()
|
void |
clean()
|
void |
clean(Layer layer)
|
void |
fireCommandsChanged()
|
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added. |
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed. |
void |
redo()
Redoes the last undoed command. |
void |
redo(int num)
Redoes multiple commands. |
void |
removeCommandQueueListener(OsmDataLayer.CommandQueueListener l)
|
void |
undo()
Undoes the last added command. |
void |
undo(int num)
Undoes multiple commands. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.util.LinkedList<Command> commands
public final java.util.LinkedList<Command> redoCommands
private final java.util.LinkedList<OsmDataLayer.CommandQueueListener> listenerCommands
| Constructor Detail |
|---|
public UndoRedoHandler()
| Method Detail |
|---|
public void addNoRedraw(Command c)
public void afterAdd()
public void add(Command c)
public void undo()
public void undo(int num)
public void redo()
public void redo(int num)
public void fireCommandsChanged()
public void clean()
public void clean(Layer layer)
public void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved in interface MapView.LayerChangeListeneroldLayer - The old removed layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded in interface MapView.LayerChangeListenernewLayer - The new added layer
public void activeLayerChange(Layer oldLayer,
Layer newLayer)
MapView.LayerChangeListener
activeLayerChange in interface MapView.LayerChangeListeneroldLayer - The previous active layernewLayer - The new activer layerpublic void removeCommandQueueListener(OsmDataLayer.CommandQueueListener l)
public boolean addCommandQueueListener(OsmDataLayer.CommandQueueListener l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||