javax.swing.plaf.basic
Class BasicTextUI

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
All Implemented Interfaces:
ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory
Direct Known Subclasses:
BasicEditorPaneUI sample code for javax.swing.plaf.basic.BasicEditorPaneUI definition code for javax.swing.plaf.basic.BasicEditorPaneUI , BasicTextAreaUI sample code for javax.swing.plaf.basic.BasicTextAreaUI definition code for javax.swing.plaf.basic.BasicTextAreaUI , BasicTextFieldUI sample code for javax.swing.plaf.basic.BasicTextFieldUI definition code for javax.swing.plaf.basic.BasicTextFieldUI , DefaultTextUI sample code for javax.swing.text.DefaultTextUI definition code for javax.swing.text.DefaultTextUI

public abstract class BasicTextUI
extends TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
implements ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory

Basis of a text components look-and-feel. This provides the basic editor view and controller services that may be useful when creating a look-and-feel for an extension of JTextComponent.

Most state is held in the associated JTextComponent as bound properties, and the UI installs default values for the various properties. This default will install something for all of the properties. Typically, a LAF implementation will do more however. At a minimum, a LAF would generally install key bindings.

This class also provides some concurrency support if the Document associated with the JTextComponent is a subclass of AbstractDocument. Access to the View (or View hierarchy) is serialized between any thread mutating the model and the Swing event thread (which is expected to render, do model/view coordinate translation, etc). Any access to the root view should first acquire a read-lock on the AbstractDocument and release that lock in a finally block.

An important method to define is the getPropertyPrefix() sample code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() method which is used as the basis of the keys used to fetch defaults from the UIManager. The string should reflect the type of TextUI (eg. TextField, TextArea, etc) without the particular LAF part of the name (eg Metal, Motif, etc).

To build a view of the model, one of the following strategies can be employed.

  1. One strategy is to simply redefine the ViewFactory interface in the UI. By default, this UI itself acts as the factory for View implementations. This is useful for simple factories. To do this reimplement the create(javax.swing.text.Element) 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) method.
  2. A common strategy for creating more complex types of documents is to have the EditorKit implementation return a factory. Since the EditorKit ties all of the pieces necessary to maintain a type of document, the factory is typically an important part of that and should be produced by the EditorKit implementation.
  3. A less common way to create more complex types is to have the UI implementation create a. separate object for the factory. To do this, the #createViewFactory method should be reimplemented to return some 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
static class BasicTextUI.BasicCaret sample code for javax.swing.plaf.basic.BasicTextUI.BasicCaret definition code for javax.swing.plaf.basic.BasicTextUI.BasicCaret
           
static class BasicTextUI.BasicHighlighter sample code for javax.swing.plaf.basic.BasicTextUI.BasicHighlighter definition code for javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
           
 
Constructor Summary
BasicTextUI sample code for javax.swing.plaf.basic.BasicTextUI.BasicTextUI() definition code for javax.swing.plaf.basic.BasicTextUI.BasicTextUI() ()
          Creates a new UI.
 
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.BasicTextUI.create(javax.swing.text.Element) definition code for javax.swing.plaf.basic.BasicTextUI.create(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Creates a view for an element.
 View sample code for javax.swing.text.View definition code for javax.swing.text.View 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) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem, int p0, int p1)
          Creates a view for an element.
protected  Caret sample code for javax.swing.text.Caret definition code for javax.swing.text.Caret createCaret sample code for javax.swing.plaf.basic.BasicTextUI.createCaret() definition code for javax.swing.plaf.basic.BasicTextUI.createCaret() ()
          Creates the object to use for a caret.
protected  Highlighter sample code for javax.swing.text.Highlighter definition code for javax.swing.text.Highlighter createHighlighter sample code for javax.swing.plaf.basic.BasicTextUI.createHighlighter() definition code for javax.swing.plaf.basic.BasicTextUI.createHighlighter() ()
          Creates the object to use for adding highlights.
protected  Keymap sample code for javax.swing.text.Keymap definition code for javax.swing.text.Keymap createKeymap sample code for javax.swing.plaf.basic.BasicTextUI.createKeymap() definition code for javax.swing.plaf.basic.BasicTextUI.createKeymap() ()
          Creates the keymap to use for the text component, and installs any necessary bindings into it.
 void 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc, int p0, int p1)
          Causes the portion of the view responsible for the given part of the model to be repainted.
 void 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t, int p0, int p1, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  p0Bias, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  p1Bias)
          Causes the portion of the view responsible for the given part of the model to be repainted.
protected  JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent getComponent sample code for javax.swing.plaf.basic.BasicTextUI.getComponent() definition code for javax.swing.plaf.basic.BasicTextUI.getComponent() ()
          Fetches the text component associated with this UI implementation.
 EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc)
          Fetches the EditorKit for the UI.
protected  String sample code for java.lang.String definition code for java.lang.String getKeymapName sample code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() definition code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() ()
          Fetches the name of the keymap that will be installed/used by default for this UI.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Gets the maximum size for the editor component.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Gets the minimum size for the editor component.
 int 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[]) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t, int pos, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  b, int direction, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias [] biasRet)
          Provides a way to determine the next visually represented model location that one might place a caret.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Gets the preferred size for the editor component.
protected abstract  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() ()
          Gets the name used as a key to look up properties through the UIManager.
 View sample code for javax.swing.text.View definition code for javax.swing.text.View 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc)
          Fetches a View with the allocation of the associated text component (i.e.
 String sample code for java.lang.String definition code for java.lang.String 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t, Point sample code for java.awt.Point definition code for java.awt.Point  pt)
          Returns the string to be used as the tooltip at the passed in location.
protected  Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getVisibleEditorRect sample code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect() definition code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect() ()
          Gets the allocation to give the root View.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicTextUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.installDefaults() ()
          Initializes component properties, e.g.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions() ()
           
protected  void installListeners sample code for javax.swing.plaf.basic.BasicTextUI.installListeners() definition code for javax.swing.plaf.basic.BasicTextUI.installListeners() ()
          Installs listeners for the UI.
 void 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Installs the UI for a component.
protected  void modelChanged sample code for javax.swing.plaf.basic.BasicTextUI.modelChanged() definition code for javax.swing.plaf.basic.BasicTextUI.modelChanged() ()
          Flags model changes.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc, int pos)
          Converts the given location in the model to a place in the view coordinate system.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc, int pos, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  bias)
          Converts the given location in the model to a place in the view coordinate system.
 void 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) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paints the interface.
protected  void 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) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Paints a background for the view.
protected  void 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) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Paints the interface safely with a guarantee that the model won't change from the view of this thread.
protected  void 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) (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.
protected  void 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) (View sample code for javax.swing.text.View definition code for javax.swing.text.View  v)
          Sets the current root of the view hierarchy and calls invalidate().
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() ()
          Sets the component properties that haven't been explicitly overridden to null.
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions() ()
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners() ()
          Uninstalls listeners for the UI.
 void 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Deinstalls the UI for a component.
 void 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) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Superclass paints background in an uncontrollable way (i.e.
 int 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) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc, Point sample code for java.awt.Point definition code for java.awt.Point  pt)
          Converts the given place in the view coordinate system to the nearest representative location in the model.
 int 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[]) (JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc, Point sample code for java.awt.Point definition code for java.awt.Point  pt, Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias [] biasReturn)
          Converts the given place in the view coordinate system to the nearest representative location in the model.
 
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) , createUI sample code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent) , 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

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

public BasicTextUI()
Creates a new UI.

Method Detail

createCaret sample code for javax.swing.plaf.basic.BasicTextUI.createCaret() definition code for javax.swing.plaf.basic.BasicTextUI.createCaret()

protected Caret sample code for javax.swing.text.Caret definition code for javax.swing.text.Caret  createCaret()
Creates the object to use for a caret. By default an instance of BasicCaret is created. This method can be redefined to provide something else that implements the InputPosition interface or a subclass of JCaret.

Returns:
the caret object

createHighlighter sample code for javax.swing.plaf.basic.BasicTextUI.createHighlighter() definition code for javax.swing.plaf.basic.BasicTextUI.createHighlighter()

protected Highlighter sample code for javax.swing.text.Highlighter definition code for javax.swing.text.Highlighter  createHighlighter()
Creates the object to use for adding highlights. By default an instance of BasicHighlighter is created. This method can be redefined to provide something else that implements the Highlighter interface or a subclass of DefaultHighlighter.

Returns:
the highlighter

getKeymapName sample code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() definition code for javax.swing.plaf.basic.BasicTextUI.getKeymapName()

protected String sample code for java.lang.String definition code for java.lang.String  getKeymapName()
Fetches the name of the keymap that will be installed/used by default for this UI. This is implemented to create a name based upon the classname. The name is the the name of the class with the package prefix removed.

Returns:
the name

createKeymap sample code for javax.swing.plaf.basic.BasicTextUI.createKeymap() definition code for javax.swing.plaf.basic.BasicTextUI.createKeymap()

protected Keymap sample code for javax.swing.text.Keymap definition code for javax.swing.text.Keymap  createKeymap()
Creates the keymap to use for the text component, and installs any necessary bindings into it. By default, the keymap is shared between all instances of this type of TextUI. The keymap has the name defined by the getKeymapName method. If the keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used.

The set of bindings used to create the keymap is fetched from the UIManager using a key formed by combining the getPropertyPrefix() sample code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicTextUI.getPropertyPrefix() method and the string .keyBindings. The type is expected to be JTextComponent.KeyBinding[].

Returns:
the keymap
See Also:
getKeymapName() sample code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() definition code for javax.swing.plaf.basic.BasicTextUI.getKeymapName() , JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent

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)

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 do nothing (i.e. the response to properties in JTextComponent itself are handled prior to calling this method).

Parameters:
evt - the property change event

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

protected abstract String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()
Gets 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.

Returns:
the name

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

protected void 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.

See Also:
uninstallDefaults() sample code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() , 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)

uninstallDefaults sample code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallDefaults()

protected void uninstallDefaults()
Sets the component properties that haven't been explicitly overridden to null. A property is considered overridden if its current value is not a UIResource.

See Also:
installDefaults() sample code for javax.swing.plaf.basic.BasicTextUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTextUI.installDefaults() , uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicTextUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.uninstallUI(javax.swing.JComponent)

installListeners sample code for javax.swing.plaf.basic.BasicTextUI.installListeners() definition code for javax.swing.plaf.basic.BasicTextUI.installListeners()

protected void installListeners()
Installs listeners for the UI.


uninstallListeners sample code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallListeners()

protected void uninstallListeners()
Uninstalls listeners for the UI.


installKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.installKeyboardActions()

protected void installKeyboardActions()

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTextUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()

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)

protected void paintBackground(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Paints a background for the view. This will only be called if isOpaque() on the associated component is true. The default is to paint the background color of the component.

Parameters:
g - the graphics context

getComponent sample code for javax.swing.plaf.basic.BasicTextUI.getComponent() definition code for javax.swing.plaf.basic.BasicTextUI.getComponent()

protected final JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  getComponent()
Fetches the text component associated with this UI implementation. This will be null until the ui has been installed.

Returns:
the editor component

modelChanged sample code for javax.swing.plaf.basic.BasicTextUI.modelChanged() definition code for javax.swing.plaf.basic.BasicTextUI.modelChanged()

protected void modelChanged()
Flags model changes. This is called whenever the model has changed. It is implemented to rebuild the view hierarchy to represent the default root element of the associated model.


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)

protected final void setView(View sample code for javax.swing.text.View definition code for javax.swing.text.View  v)
Sets the current root of the view hierarchy and calls invalidate(). If there were any child components, they will be removed (i.e. there are assumed to have come from components embedded in views).

Parameters:
v - the root view

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)

protected void paintSafely(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Paints the interface safely with a guarantee that the model won't change from the view of this thread. This does the following things, rendering from back to front.
  1. If the component is marked as opaque, the background is painted in the current background color of the component.
  2. The highlights (if any) are painted.
  3. The view hierarchy is painted.
  4. The caret is painted.

Parameters:
g - the graphics context

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)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
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.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
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)

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)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Deinstalls the UI for a component. This removes the listeners, uninstalls the highlighter, removes views, and nulls out the keymap.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the editor component
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.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)

public void update(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                   JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Superclass paints background in an uncontrollable way (i.e. one might want an image tiled into the background). To prevent this from happening twice, this method is reimplemented to simply paint.

NOTE: Superclass is also not thread-safe in it's rendering of the background, although that's not an issue with the default rendering.

Overrides:
update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , JComponent.paintComponent(java.awt.Graphics) sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics)

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)

public final void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                        JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Paints the interface. This is routed to the paintSafely method under the guarantee that the model won't change from the view of this thread while it's rendering (if the associated model is derived from AbstractDocument). This enables the model to potentially be updated asynchronously.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the graphics context
c - the editor component
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

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)

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)
Gets the preferred size for the editor component. If the component has been given a size prior to receiving this request, it will set the size of the view hierarchy to reflect the size of the component before requesting the preferred size of the view hierarchy. This allows formatted views to format to the current component size before answering the request. Other views don't care about currently formatted size and give the same answer either way.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the editor component
Returns:
the size
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.BasicTextUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTextUI.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)
Gets the minimum size for the editor component.

Overrides:
getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the editor component
Returns:
the size
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)

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)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Gets the maximum size for the editor component.

Overrides:
getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the editor component
Returns:
the size
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)

getVisibleEditorRect sample code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect() definition code for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect()

protected Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getVisibleEditorRect()
Gets the allocation to give the root View. Due to an unfortunate set of historical events this method is inappropriately named. The Rectangle returned has nothing to do with visibility. The component must have a non-zero positive size for this translation to be computed.

Returns:
the bounding box for the root view

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)

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  modelToView(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc,
                             int pos)
                      throws BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Converts the given location in the model to a place in the view coordinate system. The component must have a non-zero positive size for this translation to be computed.

Specified by:
modelToView sample code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int) definition code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle, null if the model is not painted
Throws:
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
TextUI.modelToView(javax.swing.text.JTextComponent, int) sample code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int) definition code for javax.swing.plaf.TextUI.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)

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  modelToView(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc,
                             int pos,
                             Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  bias)
                      throws BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Converts the given location in the model to a place in the view coordinate system. The component must have a non-zero positive size for this translation to be computed.

Specified by:
modelToView sample code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias) definition code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
pos - the local location in the model to translate >= 0
Returns:
the coordinates as a rectangle, null if the model is not painted
Throws:
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if the given position does not represent a valid location in the associated document
See Also:
TextUI.modelToView(javax.swing.text.JTextComponent, int) sample code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int) definition code for javax.swing.plaf.TextUI.modelToView(javax.swing.text.JTextComponent, int)

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)

public int viewToModel(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc,
                       Point sample code for java.awt.Point definition code for java.awt.Point  pt)
Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for this translation to be computed.

Specified by:
viewToModel sample code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.
Returns:
the offset from the start of the document >= 0, -1 if not painted
See Also:
TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) sample code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.TextUI.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[])

public int viewToModel(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc,
                       Point sample code for java.awt.Point definition code for java.awt.Point  pt,
                       Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias [] biasReturn)
Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for this translation to be computed.

Specified by:
viewToModel sample code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[]) definition code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[]) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
pt - the location in the view to translate. This should be in the same coordinate system as the mouse events.
biasReturn - filled in by this method to indicate whether the point given is closer to the previous or the next character in the model
Returns:
the offset from the start of the document >= 0, -1 if the component doesn't yet have a positive size.
See Also:
TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) sample code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)

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[])

public int getNextVisualPositionFrom(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t,
                                     int pos,
                                     Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  b,
                                     int direction,
                                     Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias [] biasRet)
                              throws BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.

Specified by:
getNextVisualPositionFrom sample code for javax.swing.plaf.TextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[]) definition code for javax.swing.plaf.TextUI.getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[]) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
pos - the position to convert >= 0
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
Returns:
the location within the model that best represents the next location visual position.
Throws:
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - for an invalid direction

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)

public void damageRange(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc,
                        int p0,
                        int p1)
Causes the portion of the view responsible for the given part of the model to be repainted. Does nothing if the view is not currently painted.

Specified by:
damageRange sample code for javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int) definition code for javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
See Also:
TextUI.damageRange(javax.swing.text.JTextComponent, int, int) sample code for javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int) definition code for javax.swing.plaf.TextUI.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)

public void damageRange(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t,
                        int p0,
                        int p1,
                        Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  p0Bias,
                        Position.Bias sample code for javax.swing.text.Position.Bias definition code for javax.swing.text.Position.Bias  p1Bias)
Causes the portion of the view responsible for the given part of the model to be repainted.

Specified by:
damageRange sample code for javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias) definition code for javax.swing.plaf.TextUI.damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0

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)

public EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit  getEditorKit(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc)
Fetches the EditorKit for the UI.

Specified by:
getEditorKit sample code for javax.swing.plaf.TextUI.getEditorKit(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.TextUI.getEditorKit(javax.swing.text.JTextComponent) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
Returns:
the editor capabilities
See Also:
TextUI.getEditorKit(javax.swing.text.JTextComponent) sample code for javax.swing.plaf.TextUI.getEditorKit(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.TextUI.getEditorKit(javax.swing.text.JTextComponent)

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)

public View sample code for javax.swing.text.View definition code for javax.swing.text.View  getRootView(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  tc)
Fetches a View with the allocation of the associated text component (i.e. the root of the hierarchy) that can be traversed to determine how the model is being represented spatially.

NOTE:The View hierarchy can be traversed from the root view, and other things can be done as well. Things done in this way cannot be protected like simple method calls through the TextUI. Therefore, proper operation in the presence of concurrency must be arranged by any logic that calls this method!

Specified by:
getRootView sample code for javax.swing.plaf.TextUI.getRootView(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.TextUI.getRootView(javax.swing.text.JTextComponent) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Parameters:
tc - the text component for which this UI is installed
Returns:
the view
See Also:
TextUI.getRootView(javax.swing.text.JTextComponent) sample code for javax.swing.plaf.TextUI.getRootView(javax.swing.text.JTextComponent) definition code for javax.swing.plaf.TextUI.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)

public String sample code for java.lang.String definition code for java.lang.String  getToolTipText(JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent  t,
                             Point sample code for java.awt.Point definition code for java.awt.Point  pt)
Returns the string to be used as the tooltip at the passed in location. This forwards the method onto the root View.

Overrides:
getToolTipText sample code for javax.swing.plaf.TextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point) definition code for javax.swing.plaf.TextUI.getToolTipText(javax.swing.text.JTextComponent, java.awt.Point) in class TextUI sample code for javax.swing.plaf.TextUI definition code for javax.swing.plaf.TextUI
Since:
1.4
See Also:
JTextComponent.getToolTipText(java.awt.event.MouseEvent) sample code for javax.swing.text.JTextComponent.getToolTipText(java.awt.event.MouseEvent) definition code for javax.swing.text.JTextComponent.getToolTipText(java.awt.event.MouseEvent) , View.getToolTipText(float, float, java.awt.Shape) sample code for javax.swing.text.View.getToolTipText(float, float, java.awt.Shape) definition code for javax.swing.text.View.getToolTipText(float, float, java.awt.Shape)

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)

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 for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this method. By default it simply returns null indicating it is unable to represent the 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
Parameters:
elem - the element
Returns:
the view
See Also:
View sample code for javax.swing.text.View definition code for javax.swing.text.View

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)

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,
                   int p0,
                   int p1)
Creates a view for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this method. By default it simply returns null indicating it is unable to represent the part of the element.

Parameters:
elem - the element
p0 - the starting offset >= 0
p1 - the ending offset >= p0
Returns:
the view