
* 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
86 lines
2.7 KiB
Java
86 lines
2.7 KiB
Java
/* MetalTextFieldUI.java
|
|
Copyright (C) 2005 Free Software Foundation, Inc.
|
|
|
|
This file is part of GNU Classpath.
|
|
|
|
GNU Classpath is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
GNU Classpath is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
02111-1307 USA.
|
|
|
|
Linking this library statically or dynamically with other modules is
|
|
making a combined work based on this library. Thus, the terms and
|
|
conditions of the GNU General Public License cover the whole
|
|
combination.
|
|
|
|
As a special exception, the copyright holders of this library give you
|
|
permission to link this library with independent modules to produce an
|
|
executable, regardless of the license terms of these independent
|
|
modules, and to copy and distribute the resulting executable under
|
|
terms of your choice, provided that you also meet, for each linked
|
|
independent module, the terms and conditions of the license of that
|
|
module. An independent module is a module which is not derived from
|
|
or based on this library. If you modify this library, you may extend
|
|
this exception to your version of the library, but you are not
|
|
obligated to do so. If you do not wish to do so, delete this
|
|
exception statement from your version. */
|
|
|
|
|
|
package javax.swing.plaf.metal;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import javax.swing.JComponent;
|
|
import javax.swing.plaf.ComponentUI;
|
|
import javax.swing.plaf.basic.BasicTextFieldUI;
|
|
|
|
public class MetalTextFieldUI
|
|
extends BasicTextFieldUI
|
|
{
|
|
|
|
/** The UI instances for MetalTextFieldUIs */
|
|
private static HashMap instances = null;
|
|
|
|
/**
|
|
* Constructs a new instance of MetalTextFieldUI.
|
|
*/
|
|
public MetalTextFieldUI()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Returns an instance of MetalTextFieldUI.
|
|
*
|
|
* @param component the component for which we return an UI instance
|
|
*
|
|
* @return an instance of MetalTextFieldUI
|
|
*/
|
|
public static ComponentUI createUI(JComponent component)
|
|
{
|
|
if (instances == null)
|
|
instances = new HashMap();
|
|
|
|
Object o = instances.get(component);
|
|
MetalTextFieldUI instance;
|
|
if (o == null)
|
|
{
|
|
instance = new MetalTextFieldUI();
|
|
instances.put(component, instance);
|
|
}
|
|
else
|
|
instance = (MetalTextFieldUI) o;
|
|
|
|
return instance;
|
|
}
|
|
}
|