javax.swing.plaf.basic
Class BasicTextFieldUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TextUI
          extended by javax.swing.plaf.basic.BasicTextUI
              extended by javax.swing.plaf.basic.BasicTextFieldUI
All Implemented Interfaces:
ViewFactory
Direct Known Subclasses:
BasicFormattedTextFieldUI, BasicPasswordFieldUI, MetalTextFieldUI

public class BasicTextFieldUI
extends BasicTextUI


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
 
Constructor Summary
BasicTextFieldUI()
           
 
Method Summary
 View create(Element elem)
          Creates a View for the specified Element.
static ComponentUI createUI(JComponent c)
           
protected  String getPropertyPrefix()
          Returns the prefix for entries in the UIDefaults table.
 void installUI(JComponent c)
          Installs this UI on the text component.
protected  void propertyChange(PropertyChangeEvent event)
          Receives notification whenever one of the text component's bound properties changes.
 
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
 
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTextFieldUI

public BasicTextFieldUI()
Method Detail

create

public View create(Element elem)
Description copied from class: BasicTextUI
Creates a View for the specified Element.

Specified by:
create in interface ViewFactory
Overrides:
create in class BasicTextUI
Parameters:
elem - the Element to create a View for
Returns:
a new created view
See Also:
ViewFactory

createUI

public static ComponentUI createUI(JComponent c)

getPropertyPrefix

protected String getPropertyPrefix()
Returns the prefix for entries in the UIDefaults table.

Specified by:
getPropertyPrefix in class BasicTextUI
Returns:
"TextField"

installUI

public void installUI(JComponent c)
Description copied from class: BasicTextUI
Installs this UI on the text component.

Overrides:
installUI in class BasicTextUI
Parameters:
c - the text component on which to install the UI
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

propertyChange

protected void propertyChange(PropertyChangeEvent event)
Receives notification whenever one of the text component's bound properties changes. Here we check for the editable and enabled properties and adjust the background color accordingly.

The colors are only changed if they are not a ColorUIResource.

Overrides:
propertyChange in class BasicTextUI
Parameters:
event - the property change event