Changeset 102
- Timestamp:
- 10/11/02 16:00:56 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/SystemBuffer.java
r92 r102 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: SystemBuffer.java,v 1. 6 2002-10-11 01:37:49piso Exp $5 * $Id: SystemBuffer.java,v 1.7 2002-10-11 16:00:56 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 58 58 private String loadEncoding; 59 59 private List tags; 60 private View lastView;61 60 62 61 protected SystemBuffer() … … 129 128 } 130 129 131 public final List getTags()130 public synchronized final List getTags() 132 131 { 133 132 return tags; 134 133 } 135 134 136 public final void setTags(List tags)135 public synchronized final void setTags(List tags) 137 136 { 138 137 this.tags = tags; … … 147 146 { 148 147 return lineSeparator; 149 }150 151 public final View getLastView()152 {153 if (lastView != null)154 return (View) lastView.clone();155 else156 return null;157 }158 159 public final void setLastView(View view)160 {161 lastView = (View) view.clone();162 }163 164 public void saveView(Editor editor)165 {166 final View view = saveViewInternal(editor);167 editor.setView(this, view);168 setLastView(view);169 148 } 170 149 … … 570 549 } 571 550 572 public void empty()573 {574 _empty();575 setTags(null);576 // Invalidate any stored views that are referencing the old contents577 // of this buffer.578 if (lastView != null)579 lastView.invalidate();580 for (EditorIterator it = new EditorIterator(); it.hasNext();) {581 Editor ed = it.nextEditor();582 View view = ed.getView(this);583 if (view != null)584 view.invalidate();585 if (ed.getBuffer() == this) {586 ed.setDot(null);587 ed.setMark(null);588 ed.setTopLine(null);589 }590 }591 }592 593 551 /*package*/ void _empty() 594 552 {
Note: See TracChangeset
for help on using the changeset viewer.