javax.swing.plaf.basic
Class BasicTextFieldUI

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

public class BasicTextFieldUI
extends BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI

Basis of a look and feel for a JTextField.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret sample code for javax.swing.plaf.basic.BasicTextUI.BasicCaret definition code for javax.swing.plaf.basic.BasicTextUI.BasicCaret , BasicTextUI.BasicHighlighter sample code for javax.swing.plaf.basic.BasicTextUI.BasicHighlighter definition code for javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
 
Constructor Summary
BasicTextFieldUI sample code for javax.swing.plaf.basic.BasicTextFieldUI.BasicTextFieldUI() definition code for javax.swing.plaf.basic.BasicTextFieldUI.BasicTextFieldUI() ()
          Creates a new BasicTextFieldUI.
 
Method Summary
 View sample code for javax.swing.text.View definition code for javax.swing.text.View create sample code for javax.swing.plaf.basic.BasicTextFieldUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextFieldUI.create(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Creates a view (FieldView) based on an element.
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicTextFieldUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Creates a UI for a JTextField.
protected  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix() ()
          Fetches the name used as a key to lookup properties through the UIManager.
 void installUI sample code for javax.swing.plaf.basic.BasicTextFieldUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Installs the UI for a component.
protected  void propertyChange sample code for javax.swing.plaf.basic.BasicTextFieldUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.propertyChange(java.beans.PropertyChangeEvent) (PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  evt)
          This method gets called when a bound property is changed on the associated JTextComponent.
 
Methods inherited from class javax.swing.plaf.basic.BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
create sample code for javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element, int, int) definition code for javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element, int, int) , createCaret sample code for javax.swing.plaf.basic.BasicTextUI.createCaret() definition code for javax.swing.plaf.basic.BasicTextUI.createCaret() , createHighlighter sample code for javax.swing.plaf.basic.BasicTextUI.createHighlighter() definition code for javax.swing.plaf.basic.BasicTextUI.createHighlighter() , createKeymap sample code for javax.swing.plaf.basic.BasicTextUI.createKeymap() definition code for javax.swing.plaf.basic.BasicTextUI.createKeymap() , damageRange sample code for javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int) definition code for javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int) , damageRange sample code for javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias) definition code for javax.swing.plaf.basic.BasicTextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias) , getComponent sample code for javax.swing.plaf.basic.BasicTextUI.getComponent() definition code for javax.swing.plaf.basic.BasicTextUI.getComponent() , getEditorKit sample code for javax.swing.plaf.basic.BasicTextUI.getEditorKit(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.basic.BasicTextUI.getEditorKit(javax.swing.text.JTextComponent) , getKeymapName sample code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() definition code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() , getMaximumSize sample code for javax.swing.plaf.basic.BasicTextUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.basic.BasicTextUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.getMinimumSize(javax.swing.JComponent) , getNextVisualPositionFrom sample code for javax.swing.plaf.basic.BasicTextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[]) definition code for javax.swing.plaf.basic.BasicTextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[]) , getPreferredSize sample code for javax.swing.plaf.basic.BasicTextUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.getPreferredSize(javax.swing.JComponent) , getRootView sample code for javax.swing.plaf.basic.BasicTextUI.getRootView(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.basic.BasicTextUI.getRootView(javax.swing.text.JTextComponent) , getToolTipText sample code for javax.swing.plaf.basic.BasicTextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.basic.BasicTextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point) , getVisibleEditorRect sample code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect() definition code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect() , installDefaults sample code for javax.swing.plaf.basic.BasicTextUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.installDefaults() , installKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions() , installListeners sample code for javax.swing.plaf.basic.BasicTextUI.installListeners() definition code for javax.swing.plaf.basic.BasicTextUI.installListeners() , modelChanged sample code for javax.swing.plaf.basic.BasicTextUI.modelChanged() definition code for javax.swing.plaf.basic.BasicTextUI.modelChanged() , modelToView sample code for javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int) definition code for javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int) , modelToView sample code for javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias) definition code for javax.swing.plaf.basic.BasicTextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias) , paint sample code for javax.swing.plaf.basic.BasicTextUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.paint(java.awt.Graphics, javax.swing.JComponent) , paintBackground sample code for javax.swing.plaf.basic.BasicTextUI.paintBackground(java.awt.Graphics) definition code for javax.swing.plaf.basic.BasicTextUI.paintBackground(java.awt.Graphics) , paintSafely sample code for javax.swing.plaf.basic.BasicTextUI.paintSafely(java.awt.Graphics) definition code for javax.swing.plaf.basic.BasicTextUI.paintSafely(java.awt.Graphics) , setView sample code for javax.swing.plaf.basic.BasicTextUI.setView(javax.swing.text.View) definition code for javax.swing.plaf.basic.BasicTextUI.setView(javax.swing.text.View) , uninstallDefaults sample code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() , uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions() , uninstallListeners sample code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners() , uninstallUI sample code for javax.swing.plaf.basic.BasicTextUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.uninstallUI(javax.swing.JComponent) , update sample code for javax.swing.plaf.basic.BasicTextUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.update(java.awt.Graphics, javax.swing.JComponent) , viewToModel sample code for javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) , viewToModel sample code for javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[]) definition code for javax.swing.plaf.basic.BasicTextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[])
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BasicTextFieldUI sample code for javax.swing.plaf.basic.BasicTextFieldUI() definition code for javax.swing.plaf.basic.BasicTextFieldUI()

public BasicTextFieldUI()
Creates a new BasicTextFieldUI.

Method Detail

createUI sample code for javax.swing.plaf.basic.BasicTextFieldUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Creates a UI for a JTextField.

Parameters:
c - the text field
Returns:
the UI

installUI sample code for javax.swing.plaf.basic.BasicTextFieldUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent)
Installs the UI for a component. This does the following things.
  1. Set the associated component to opaque (can be changed easily by a subclass or on JTextComponent directly), which is the most common case. This will cause the component's background color to be painted.
  2. Install the default caret and highlighter into the associated component.
  3. Attach to the editor and model. If there is no model, a default one is created.
  4. create the view factory and the view hierarchy used to represent the model.

Overrides:
installUI sample code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent) in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Parameters:
c - the editor component
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)

propertyChange sample code for javax.swing.plaf.basic.BasicTextFieldUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicTextFieldUI.propertyChange(java.beans.PropertyChangeEvent)

protected void propertyChange(PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent  evt)
This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses.

Overrides:
propertyChange sample code for javax.swing.plaf.basic.BasicTextUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicTextUI.propertyChange(java.beans.PropertyChangeEvent) in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Parameters:
evt - the property change event

getPropertyPrefix sample code for javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix()

protected String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()
Fetches the name used as a key to lookup properties through the UIManager. This is used as a prefix to all the standard text properties.

Specified by:
getPropertyPrefix sample code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Returns:
the name ("TextField")

create sample code for javax.swing.plaf.basic.BasicTextFieldUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextFieldUI.create(javax.swing.text.Element)

public View sample code for javax.swing.text.View definition code for javax.swing.text.View  create(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
Creates a view (FieldView) based on an element.

Specified by:
create sample code for javax.swing.text.ViewFactory.create(javax.swing.text.Element) definition code for javax.swing.text.ViewFactory.create(javax.swing.text.Element) in interface ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory
Overrides:
create sample code for javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element) in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Parameters:
elem - the element
Returns:
the view
See Also:
View sample code for javax.swing.text.View definition code for javax.swing.text.View