/[classpath]/classpath/javax/swing/text/AbstractDocument.java
ViewVC logotype

Diff of /classpath/javax/swing/text/AbstractDocument.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9.2.3 by gnu_andrew, Sun Jan 16 15:15:13 2005 UTC revision 1.9.2.4 by gnu_andrew, Thu Apr 28 23:00:14 2005 UTC
# Line 43  import java.io.Serializable; Line 43  import java.io.Serializable;
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;
# Line 71  public abstract class AbstractDocument Line 72  public abstract class AbstractDocument
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)
# Line 175  public abstract class AbstractDocument Line 179  public abstract class AbstractDocument
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()
# Line 201  public abstract class AbstractDocument Line 209  public abstract class AbstractDocument
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()
# Line 258  public abstract class AbstractDocument Line 271  public abstract class AbstractDocument
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()
# Line 366  public abstract class AbstractDocument Line 384  public abstract class AbstractDocument
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()

Legend:
Removed from v.1.9.2.3  
changed lines
  Added in v.1.9.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26