Search in sources :

Example 1 with Undoable

use of org.malai.undo.Undoable in project Malai by arnobl.

the class ButtonPressed2Undo method updateWidgets.

/**
 * Updates the widgets of the instrument.
 * @since 0.2
 */
public void updateWidgets() {
    if (activated) {
        final Undoable undo = UndoCollector.INSTANCE.getLastUndo();
        final Undoable redo = UndoCollector.INSTANCE.getLastRedo();
        undoB.setEnabled(undo != null);
        redoB.setEnabled(redo != null);
        undoB.setToolTipText(undo == null ? null : undo.getUndoName());
        redoB.setToolTipText(redo == null ? null : redo.getUndoName());
    }
}
Also used : Undoable(org.malai.undo.Undoable)

Aggregations

Undoable (org.malai.undo.Undoable)1