API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicTextUI View Source
Author(s)
Timothy Prinzing
Shannon Hickey (drag and drop)
Since
Version
1.120 08/25/06
Serial
Hierarchy
 Object
      ComponentUI
          TextUI
              BasicTextUI
Implements
 ViewFactory
Subclasses
Description
publicabstract abstract class BasicTextUI
  Basis of a text components look-and-feel.
See also:   
Constructors
public BasicTextUI ()
Creates a new UI.
Methods
Hide/Show inherited methods
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
public View create (Element elem) [Specified in ViewFactory]
  Creates a view for an element.
public View create (Element elem, int p0, int p1)
  Creates a view for an element.
pack-private ActionMap createActionMap ()
  Create a default action map.
protected Caret createCaret ()
  Creates the object to use for a caret.
protected Highlighter createHighlighter ()
  Creates the object to use for adding highlights.
protected Keymap createKeymap ()
  Creates the keymap to use for the text component, and installs any necessary bindings into it.
publicstatic ComponentUI createUI (JComponent c) [Inherited From ComponentUI]
  Returns an instance of the UI delegate for the specified component.
public void damageRange (JTextComponent tc, int p0, int p1) [Specified in TextUI]
  Causes the portion of the view responsible for the given part of the model to be repainted.
public void damageRange (JTextComponent t, int p0, int p1, Bias p0Bias, Bias p1Bias) [Specified in TextUI]
  Causes the portion of the view responsible for the given part of the model to be repainted.
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
pack-private ActionMap getActionMap ()
Fetch an action map to use.
public int getBaseline (JComponent c, int width, int height) [Inherited From ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Inherited From ComponentUI]
  Returns an enum indicating how the baseline of he component changes as the size changes.
protectedfinal JTextComponent getComponent ()
  Fetches the text component associated with this UI implementation.
public EditorKit getEditorKit (JTextComponent tc) [Specified in TextUI]
  Fetches the EditorKit for the UI.
pack-private InputMap getInputMap ()
Get the InputMap to use for the UI.
protected String getKeymapName ()
  Fetches the name of the keymap that will be installed/used by default for this UI.
public Dimension getMaximumSize (JComponent c) [Overrides ComponentUI]
  Gets the maximum size for the editor component.
public Dimension getMinimumSize (JComponent c) [Overrides ComponentUI]
  Gets the minimum size for the editor component.
public int getNextVisualPositionFrom (JTextComponent t, int pos, Bias b, int direction, Bias biasRet) throws BadLocationException [Specified in TextUI]
  Provides a way to determine the next visually represented model location that one might place a caret.
public Dimension getPreferredSize (JComponent c) [Overrides ComponentUI]
  Gets the preferred size for the editor component.
protectedabstract String getPropertyPrefix ()
  Gets the name used as a key to look up properties through the UIManager.
public View getRootView (JTextComponent tc) [Specified in TextUI]
  Fetches a View with the allocation of the associated text component (i.e.
public String getToolTipText (JTextComponent t, Point pt) [Overrides TextUI]
  Returns the string to be used as the tooltip at the passed in location.
pack-private TransferHandler getTransferHandler ()
Returns the TransferHandler that will be installed if their isn't one installed on the JTextComponent.
protected Rectangle getVisibleEditorRect ()
  Gets the allocation to give the root View.
protected void installDefaults ()
  Initializes component properties, e.g.
protected void installKeyboardActions ()
protected void installListeners ()
Installs listeners for the UI.
public void installUI (JComponent c) [Overrides ComponentUI]
  Installs the UI for a component.
protected void modelChanged ()
  Flags model changes.
public Rectangle modelToView (JTextComponent tc, int pos) throws BadLocationException [Specified in TextUI]
  Converts the given location in the model to a place in the view coordinate system.
public Rectangle modelToView (JTextComponent tc, int pos, Bias bias) throws BadLocationException [Specified in TextUI]
  Converts the given location in the model to a place in the view coordinate system.
publicfinal void paint (Graphics g, JComponent c) [Overrides ComponentUI]
  Paints the interface.
protected void paintBackground (Graphics g)
  Paints a background for the view.
protected void paintSafely (Graphics g)
  Paints the interface safely with a guarantee that the model won't change from the view of this thread.
protected void propertyChange (PropertyChangeEvent evt)
  This method gets called when a bound property is changed on the associated JTextComponent.
protectedfinal void setView (View v)
  Sets the current root of the view hierarchy and calls invalidate().
protected void uninstallDefaults ()
  Sets the component properties that haven't been explicitly overridden to null.
protected void uninstallKeyboardActions ()
protected void uninstallListeners ()
Uninstalls listeners for the UI.
public void uninstallUI (JComponent c) [Overrides ComponentUI]
  Deinstalls the UI for a component.
public void update (Graphics g, JComponent c) [Overrides ComponentUI]
  Superclass paints background in an uncontrollable way (i.e.
pack-private void updateFocusAcceleratorBinding (boolean changed)
Invoked when the focus accelerator changes, this will update the key bindings as necessary.
pack-private void updateFocusTraversalKeys ()
  Invoked when editable property is changed.
public int viewToModel (JTextComponent tc, Point pt) [Specified in TextUI]
  Converts the given place in the view coordinate system to the nearest representative location in the model.
public int viewToModel (JTextComponent tc, Point pt, Bias biasReturn) [Specified in TextUI]
  Converts the given place in the view coordinate system to the nearest representative location in the model.
Fields
Hide/Show inherited fields
pack-privatetransient JTextComponent editor
pack-privatetransient boolean painted
pack-privatetransient RootView rootView
pack-privatetransient UpdateHandler updateHandler
Nested Classes
  BasicTextUI.BasicCaret
  BasicTextUI.BasicHighlighter
  BasicTextUI.BasicCursor
  BasicTextUI.RootView
Root view that acts as a gateway between the component and the View hierarchy.
  BasicTextUI.UpdateHandler
Handles updates from various places.
  BasicTextUI.TextActionWrapper
Wrapper for text actions to return isEnabled false in case editor is non editable
  BasicTextUI.FocusAction
Registered in the ActionMap.
  BasicTextUI.DragListener
Listens for mouse events for the purposes of detecting drag gestures.
  BasicTextUI.TextTransferHandler
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar