public void setLastSecondaryButton(JComponent lastSecondaryButton) {
this.lastSecondaryButton = lastSecondaryButton;
}
public void updateUndoRedoControls() {
UndoManager undoManager = renderPanel.getUndoManager();
JButton redoButton=buttons.get("redo");
JButton undoButton=buttons.get("undo");
if (undoManager.canRedo()) {
redoButton.setEnabled(true);
redoMenu.setEnabled(true);
redoButton.setToolTipText(GT.get("Redo")+": "+undoManager.getRedoPresentationName());
} else {
redoButton.setEnabled(false);
redoMenu.setEnabled(false);
redoButton.setToolTipText(GT.get("No redo possible"));
}
if (undoManager.canUndo()) {
undoButton.setEnabled(true);
undoMenu.setEnabled(true);
undoButton.setToolTipText(GT.get("Undo")+": "+undoManager.getUndoPresentationName());
} else {
undoButton.setEnabled(false);
undoMenu.setEnabled(false);
undoButton.setToolTipText(GT.get("No undo possible"));
}