Index: javax/swing/text/AbstractDocument.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/AbstractDocument.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- javax/swing/text/AbstractDocument.java 11 Jan 2005 09:50:14 -0000 1.15 +++ javax/swing/text/AbstractDocument.java 23 Apr 2005 08:39:35 -0000 1.16 @@ -43,6 +43,7 @@ import java.util.Dictionary; import java.util.Enumeration; import java.util.EventListener; +import java.util.Hashtable; import java.util.Vector; import javax.swing.event.DocumentEvent; @@ -71,7 +72,10 @@ Content content; AttributeContext context; DocumentFilter documentFilter; - + + /** The documents properties. */ + Dictionary properties; + protected EventListenerList listenerList = new EventListenerList(); protected AbstractDocument(Content doc) @@ -175,7 +179,10 @@ public Dictionary getDocumentProperties() { - return null; + if (properties == null) + properties = new Hashtable(); + + return properties; } public Position getEndPosition() @@ -201,7 +208,11 @@ public Object getProperty(Object key) { - return null; + Object value = null; + if (properties != null) + value = properties.get(key); + + return value; } public Element[] getRootElements() @@ -258,6 +269,10 @@ public void putProperty(Object key, Object value) { + if (properties == null) + properties = new Hashtable(); + + properties.put(key, value); } public void readLock() @@ -366,6 +381,7 @@ public void setDocumentProperties(Dictionary x) { + properties = x; } protected void writeLock()