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
This commit is contained in:
parent
9f62c3e3ed
commit
8efae6bbfa
13 changed files with 652 additions and 191 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue