3006 return dde.isSignificant(); 3007 } 3008 3009 @Override 3010 public String getPresentationName() { 3011 return dde.getPresentationName(); 3012 } 3013 3014 @Override 3015 public String getUndoPresentationName() { 3016 return dde.getUndoPresentationName(); 3017 } 3018 3019 @Override 3020 public String getRedoPresentationName() { 3021 return dde.getRedoPresentationName(); 3022 } 3023 3024 /** 3025 * {@inheritDoc} 3026 * @since 1.9 3027 */ 3028 @Override 3029 public void lockEdit() { 3030 ((AbstractDocument)dde.getDocument()).writeLock(); 3031 } 3032 3033 /** 3034 * {@inheritDoc} 3035 * @since 1.9 3036 */ 3037 @Override 3038 public void unlockEdit() { 3039 ((AbstractDocument)dde.getDocument()).writeUnlock(); 3040 } 3041 } 3042 3043 /** 3044 * This event used when firing document changes while Undo/Redo 3045 * operations. It just wraps DefaultDocumentEvent and delegates 3046 * all calls to it except getType() which depends on operation 3047 * (Undo or Redo). 3048 */ 3049 class UndoRedoDocumentEvent implements DocumentEvent { 3050 private DefaultDocumentEvent src = null; 3051 private EventType type = null; 3052 3053 public UndoRedoDocumentEvent(DefaultDocumentEvent src, boolean isUndo) { 3054 this.src = src; 3055 if(isUndo) { | 3006 return dde.isSignificant(); 3007 } 3008 3009 @Override 3010 public String getPresentationName() { 3011 return dde.getPresentationName(); 3012 } 3013 3014 @Override 3015 public String getUndoPresentationName() { 3016 return dde.getUndoPresentationName(); 3017 } 3018 3019 @Override 3020 public String getRedoPresentationName() { 3021 return dde.getRedoPresentationName(); 3022 } 3023 3024 /** 3025 * {@inheritDoc} 3026 * @since 9 3027 */ 3028 @Override 3029 public void lockEdit() { 3030 ((AbstractDocument)dde.getDocument()).writeLock(); 3031 } 3032 3033 /** 3034 * {@inheritDoc} 3035 * @since 9 3036 */ 3037 @Override 3038 public void unlockEdit() { 3039 ((AbstractDocument)dde.getDocument()).writeUnlock(); 3040 } 3041 } 3042 3043 /** 3044 * This event used when firing document changes while Undo/Redo 3045 * operations. It just wraps DefaultDocumentEvent and delegates 3046 * all calls to it except getType() which depends on operation 3047 * (Undo or Redo). 3048 */ 3049 class UndoRedoDocumentEvent implements DocumentEvent { 3050 private DefaultDocumentEvent src = null; 3051 private EventType type = null; 3052 3053 public UndoRedoDocumentEvent(DefaultDocumentEvent src, boolean isUndo) { 3054 this.src = src; 3055 if(isUndo) { |