aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/swing/text/AbstractDocument.java
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2005-04-25 19:36:43 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2005-04-25 19:36:43 +0000
commit8efae6bbfa04f662589bbfc64dbbe68935f973d2 (patch)
tree6a73f30784c260b998e5fb2e421b3c002d8ff608 /libjava/javax/swing/text/AbstractDocument.java
parent9f62c3e3ed53732a8fe755ad5109c1a6ed25bb0c (diff)
downloadgcc-8efae6bbfa04f662589bbfc64dbbe68935f973d2.zip
gcc-8efae6bbfa04f662589bbfc64dbbe68935f973d2.tar.gz
gcc-8efae6bbfa04f662589bbfc64dbbe68935f973d2.tar.bz2
2005-04-25 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/basic/BasicScrollBarUI.java (initDefaults): Initialize thumb*Color fields correctly. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/text/GapContent.java: Added API comments. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/plaf/metal/MetalBorders.java: Added inner class ScrollPaneBorder. * javax/swing/plaf/metal/MetalLookAndFeel.java (initComponentDefaults): Added default for "ScrollPane.border" to use the new ScrollPaneBorder. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/text/AbstractDocument.java: Added FIXME comments. This class still has to be implemented thread-safe. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/tree/DefaultTreeSelectionModel.java (DefaultTreeSelectionModel): Initialize listenerList here. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/plaf/metal/MetalTextFieldUI.java (createUI): Return one instance per Component instead of a shared instance. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/text/Document.java: Added API documentation comments. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/text/AbstractDocument.java (getDocumentProperties): Implemented. (setDocumentProperties): Implemented. (getProperty): Implemented. (putProperty): Implemented. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/BoxLayout (preferredLayoutSize): Fixed computation so that it correctly adds the top and bottom insets of the container. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/plaf/basic/BasicMenuItemUI.java (paintText): Make use of the 'selectionForeground' UI default for text painting. 2005-04-25 Roman Kennke <roman@kennke.org> * javax/swing/plaf/basic/BasicLookAndFeel.java (initSystemColorDefaults): Modified colors to match the BasicLookAndFeel in the reference implementation. (initComponentDefaults): Likewise. From-SVN: r98733
Diffstat (limited to 'libjava/javax/swing/text/AbstractDocument.java')
-rw-r--r--libjava/javax/swing/text/AbstractDocument.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/libjava/javax/swing/text/AbstractDocument.java b/libjava/javax/swing/text/AbstractDocument.java
index a2c3fa6..29be0ad 100644
--- a/libjava/javax/swing/text/AbstractDocument.java
+++ b/libjava/javax/swing/text/AbstractDocument.java
@@ -43,6 +43,7 @@ import java.io.Serializable;
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 @@ public abstract class AbstractDocument
Content content;
AttributeContext context;
DocumentFilter documentFilter;
-
+
+ /** The documents properties. */
+ Dictionary properties;
+
protected EventListenerList listenerList = new EventListenerList();
protected AbstractDocument(Content doc)
@@ -175,7 +179,11 @@ public abstract class AbstractDocument
public Dictionary getDocumentProperties()
{
- return null;
+ // FIXME: make me thread-safe
+ if (properties == null)
+ properties = new Hashtable();
+
+ return properties;
}
public Position getEndPosition()
@@ -201,7 +209,12 @@ public abstract class AbstractDocument
public Object getProperty(Object key)
{
- return null;
+ // FIXME: make me thread-safe
+ Object value = null;
+ if (properties != null)
+ value = properties.get(key);
+
+ return value;
}
public Element[] getRootElements()
@@ -258,6 +271,11 @@ public abstract class AbstractDocument
public void putProperty(Object key, Object value)
{
+ // FIXME: make me thread-safe
+ if (properties == null)
+ properties = new Hashtable();
+
+ properties.put(key, value);
}
public void readLock()
@@ -366,6 +384,8 @@ public abstract class AbstractDocument
public void setDocumentProperties(Dictionary x)
{
+ // FIXME: make me thread-safe
+ properties = x;
}
protected void writeLock()