/** * @param showem <code>true</code> if both arrows are to be shown when both association ends of an * association are navigable. */ public void setShowBidirectionalArrows(final boolean showem) { if (showBidirectionalArrows != null && showBidirectionalArrows == showem) { return; } Memento memento = new Memento() { public void redo() { showBidirectionalArrows = showem; } public void undo() { showBidirectionalArrows = !showem; } }; doUndoable(memento); }
/** @param showem <code>true</code> if names are to be shown in bold font. */ public void setShowBoldNames(final boolean showem) { if (showBoldNames != null && showBoldNames == showem) { return; } Memento memento = new Memento() { public void redo() { showBoldNames = showem; } public void undo() { showBoldNames = !showem; } }; doUndoable(memento); }
/** @param newView the default stereotype view */ public void setDefaultStereotypeView(final StereotypeStyle newView) { if (defaultStereotypeView != null && defaultStereotypeView == newView) { return; } final StereotypeStyle oldValue = defaultStereotypeView; Memento memento = new Memento() { public void redo() { defaultStereotypeView = newView; } public void undo() { defaultStereotypeView = oldValue; } }; doUndoable(memento); }
/** @param newWidth The Shadow Width. */ public void setDefaultShadowWidth(final int newWidth) { if (defaultShadowWidth != null && defaultShadowWidth == newWidth) { return; } final Integer oldValue = defaultShadowWidth; Memento memento = new Memento() { public void redo() { defaultShadowWidth = newWidth; } public void undo() { defaultShadowWidth = oldValue; } }; doUndoable(memento); }