|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.instrument.Instrument
org.malai.instrument.WidgetInstrument
org.malai.instrument.library.UndoRedoManager
public class UndoRedoManager
This instrument allows to undo and redo saved actions.
This file is part of libMalai.
Copyright (c) 2009-2012 Arnaud BLOUIN
libMalan is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
libMalan is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Field Summary | |
---|---|
protected MButton |
redoB
The button used to redo actions. |
protected MButton |
undoB
The button used to undo actions. |
Fields inherited from class org.malai.instrument.WidgetInstrument |
---|
composer |
Fields inherited from class org.malai.instrument.Instrument |
---|
activated, eventables, links, modified |
Constructor Summary | |
---|---|
UndoRedoManager(UIComposer<?> composer)
Creates the instrument. |
Method Summary | |
---|---|
MButton |
getRedoB()
|
MButton |
getUndoB()
|
protected void |
initialiseLinks()
Initialises the links of the instrument. |
protected void |
initialiseWidgets()
Initialises the widgets of the instrument. |
void |
onUndoableAdded(Undoable undoable)
Actions to do when an undoable object is added to the undo register. |
void |
onUndoableRedo(Undoable undoable)
Actions to do when an undoable object is redone. |
void |
onUndoableUndo(Undoable undoable)
Actions to do when an undoable object is undone. |
void |
setActivated(boolean activated)
Activates or deactivates the instrument. |
void |
updateWidgets()
Updates the widgets of the instrument. |
Methods inherited from class org.malai.instrument.WidgetInstrument |
---|
getComposer, setActivated |
Methods inherited from class org.malai.instrument.Instrument |
---|
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, interimFeedback, isActivated, isModified, load, onActionAborted, onActionAdded, onActionCancelled, onActionDone, onActionExecuted, reinit, removeLink, save, setModified |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MButton undoB
protected MButton redoB
Constructor Detail |
---|
public UndoRedoManager(UIComposer<?> composer)
composer
- The composer that compose the widgets provided by this instrument.Method Detail |
---|
protected void initialiseWidgets()
WidgetInstrument
initialiseWidgets
in class WidgetInstrument
protected void initialiseLinks()
Instrument
initialiseLinks
in class Instrument
public MButton getUndoB()
public MButton getRedoB()
public void updateWidgets()
public void setActivated(boolean activated)
Instrument
setActivated
in class Instrument
activated
- True = activation.public void onUndoableAdded(Undoable undoable)
UndoHandler
onUndoableAdded
in interface UndoHandler
onUndoableAdded
in class Instrument
undoable
- The undoable object added to the undo register.public void onUndoableUndo(Undoable undoable)
UndoHandler
onUndoableUndo
in interface UndoHandler
onUndoableUndo
in class Instrument
undoable
- The undone object.public void onUndoableRedo(Undoable undoable)
UndoHandler
onUndoableRedo
in interface UndoHandler
onUndoableRedo
in class Instrument
undoable
- The redone object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |