/** * Returns whether an undo is possible. * * @see #canRedo() * @see #undoLastAction() */ public boolean canUndo() { return undoManager.canUndo(); }
/** * Attempt to undo an "action" done in this text area. * * @see #redoLastAction() */ public void undoLastAction() { // NOTE: that the try/catch block shouldn't be necessary... try { if (undoManager.canUndo()) { undoManager.undo(); } } catch (CannotUndoException cre) { cre.printStackTrace(); } }
/** * Returns whether an undo is possible. * * @see #canRedo() * @see #undoLastAction() */ public boolean canUndo() { return undoManager.canUndo(); }
if (canUndo()) { a.setEnabled(true); text = getUndoPresentationName();
@Override public boolean isUndo() { return this.undoManager.canUndo(); }
@Override public boolean isUndo() { return this.undoManager.canUndo(); }
/** * Attempt to undo an "action" done in this text area. * * @see #redoLastAction() */ public void undoLastAction() { // NOTE: that the try/catch block shouldn't be necessary... try { if (undoManager.canUndo()) undoManager.undo(); } catch (CannotUndoException cre) { cre.printStackTrace(); } }
/** * Attempt to undo an "action" done in this text area. * * @see #redoLastAction() */ public void undoLastAction() { // NOTE: that the try/catch block shouldn't be necessary... try { if (undoManager.canUndo()) undoManager.undo(); } catch (CannotUndoException cre) { cre.printStackTrace(); } }
@Override public boolean undo() { if (this.undoManager.canUndo() && isTextEditorVisible()) { try { this.undoManager.undo(); } catch (final CannotUndoException ex) { LOGGER.warn("Can't make undo in plantUML editor : " + ex.getMessage()); } finally { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { startRenderScript(); } }); } } return this.undoManager.canUndo(); }
/** * Attempt to undo an "action" done in this text area. * * @see #redoLastAction() */ public void undoLastAction() { // NOTE: that the try/catch block shouldn't be necessary... try { if (undoManager.canUndo()) { undoManager.undo(); } } catch (CannotUndoException cre) { cre.printStackTrace(); } }
if (canUndo()) { a.setEnabled(true); text = getUndoPresentationName();
if (canUndo()) { a.setEnabled(true); text = getUndoPresentationName();
if (canUndo()) { a.setEnabled(true); text = getUndoPresentationName();