javax.swing.plaf.basic
Class BasicTextAreaUI

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.BasicTextAreaUI
All Implemented Interfaces:
ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory

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

Provides the look and feel for a plain text editor. In this implementation the default UI is extended to act as a simple view factory.

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
BasicTextAreaUI sample code for javax.swing.plaf.basic.BasicTextAreaUI.BasicTextAreaUI() definition code for javax.swing.plaf.basic.BasicTextAreaUI.BasicTextAreaUI() ()
          Constructs a new BasicTextAreaUI object.
 
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.BasicTextAreaUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextAreaUI.create(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Creates the view for 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.BasicTextAreaUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  ta)
          Creates a UI for a JTextArea.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicTextAreaUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          The method is overridden to take into account caret width.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          The method is overridden to take into account caret width.
protected  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicTextAreaUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextAreaUI.getPropertyPrefix() ()
          Fetches the name used as a key to look up properties through the UIManager.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicTextAreaUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextAreaUI.installDefaults() ()
          Initializes component properties, e.g.
protected  void propertyChange sample code for javax.swing.plaf.basic.BasicTextAreaUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.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) , 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[]) , 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() , 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() , 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) , 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

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

public BasicTextAreaUI()
Constructs a new BasicTextAreaUI object.

Method Detail

createUI sample code for javax.swing.plaf.basic.BasicTextAreaUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.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  ta)
Creates a UI for a JTextArea.

Parameters:
ta - a text area
Returns:
the UI

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

protected String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()
Fetches the name used as a key to look up 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 ("TextArea")

installDefaults sample code for javax.swing.plaf.basic.BasicTextAreaUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextAreaUI.installDefaults()

protected void installDefaults()
Description copied from class: BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.installDefaults()
Initializes component properties, e.g. font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.

Overrides:
installDefaults sample code for javax.swing.plaf.basic.BasicTextUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.installDefaults() in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
See Also:
BasicTextUI.uninstallDefaults() sample code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() , BasicTextUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.installUI(javax.swing.JComponent)

propertyChange sample code for javax.swing.plaf.basic.BasicTextAreaUI.propertyChange(java.beans.PropertyChangeEvent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.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. This is implemented to rebuild the View when the WrapLine or the WrapStyleWord property changes.

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

getPreferredSize sample code for javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
The method is overridden to take into account caret width.

Overrides:
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) in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Parameters:
c - the editor component
Returns:
the preferred size
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if invalid value is passed
Since:
1.5
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

getMinimumSize sample code for javax.swing.plaf.basic.BasicTextAreaUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextAreaUI.getMinimumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
The method is overridden to take into account caret width.

Overrides:
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) in class BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI definition code for javax.swing.plaf.basic.BasicTextUI
Parameters:
c - the editor component
Returns:
the minimum size
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if invalid value is passed
Since:
1.5
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)

create sample code for javax.swing.plaf.basic.BasicTextAreaUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextAreaUI.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 the view for an element. Returns a WrappedPlainView or PlainView.

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