43 |
import java.util.Dictionary; |
import java.util.Dictionary; |
44 |
import java.util.Enumeration; |
import java.util.Enumeration; |
45 |
import java.util.EventListener; |
import java.util.EventListener; |
46 |
|
import java.util.Hashtable; |
47 |
import java.util.Vector; |
import java.util.Vector; |
48 |
|
|
49 |
import javax.swing.event.DocumentEvent; |
import javax.swing.event.DocumentEvent; |
72 |
Content content; |
Content content; |
73 |
AttributeContext context; |
AttributeContext context; |
74 |
DocumentFilter documentFilter; |
DocumentFilter documentFilter; |
75 |
|
|
76 |
|
/** The documents properties. */ |
77 |
|
Dictionary properties; |
78 |
|
|
79 |
protected EventListenerList listenerList = new EventListenerList(); |
protected EventListenerList listenerList = new EventListenerList(); |
80 |
|
|
81 |
protected AbstractDocument(Content doc) |
protected AbstractDocument(Content doc) |
179 |
|
|
180 |
public Dictionary getDocumentProperties() |
public Dictionary getDocumentProperties() |
181 |
{ |
{ |
182 |
return null; |
// FIXME: make me thread-safe |
183 |
|
if (properties == null) |
184 |
|
properties = new Hashtable(); |
185 |
|
|
186 |
|
return properties; |
187 |
} |
} |
188 |
|
|
189 |
public Position getEndPosition() |
public Position getEndPosition() |
209 |
|
|
210 |
public Object getProperty(Object key) |
public Object getProperty(Object key) |
211 |
{ |
{ |
212 |
return null; |
// FIXME: make me thread-safe |
213 |
|
Object value = null; |
214 |
|
if (properties != null) |
215 |
|
value = properties.get(key); |
216 |
|
|
217 |
|
return value; |
218 |
} |
} |
219 |
|
|
220 |
public Element[] getRootElements() |
public Element[] getRootElements() |
271 |
|
|
272 |
public void putProperty(Object key, Object value) |
public void putProperty(Object key, Object value) |
273 |
{ |
{ |
274 |
|
// FIXME: make me thread-safe |
275 |
|
if (properties == null) |
276 |
|
properties = new Hashtable(); |
277 |
|
|
278 |
|
properties.put(key, value); |
279 |
} |
} |
280 |
|
|
281 |
public void readLock() |
public void readLock() |
384 |
|
|
385 |
public void setDocumentProperties(Dictionary x) |
public void setDocumentProperties(Dictionary x) |
386 |
{ |
{ |
387 |
|
// FIXME: make me thread-safe |
388 |
|
properties = x; |
389 |
} |
} |
390 |
|
|
391 |
protected void writeLock() |
protected void writeLock() |