BasicTextUI (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

[View](../../../../javax/swing/text/View.html "class in javax.swing.text")

[create](../../../../javax/swing/plaf/basic/BasicTextUI.html#create-javax.swing.text.Element-)([Element](../../../../javax/swing/text/Element.html "interface in javax.swing.text") elem)

Creates a view for an element.

[View](../../../../javax/swing/text/View.html "class in javax.swing.text")

[create](../../../../javax/swing/plaf/basic/BasicTextUI.html#create-javax.swing.text.Element-int-int-)([Element](../../../../javax/swing/text/Element.html "interface in javax.swing.text") elem, int p0, int p1)

Creates a view for an element.

protected [Caret](../../../../javax/swing/text/Caret.html "interface in javax.swing.text")

[createCaret](../../../../javax/swing/plaf/basic/BasicTextUI.html#createCaret--)()

Creates the object to use for a caret.

protected [Highlighter](../../../../javax/swing/text/Highlighter.html "interface in javax.swing.text")

[createHighlighter](../../../../javax/swing/plaf/basic/BasicTextUI.html#createHighlighter--)()

Creates the object to use for adding highlights.

protected [Keymap](../../../../javax/swing/text/Keymap.html "interface in javax.swing.text")

[createKeymap](../../../../javax/swing/plaf/basic/BasicTextUI.html#createKeymap--)()

Creates the keymap to use for the text component, and installs any necessary bindings into it.

void

[damageRange](../../../../javax/swing/plaf/basic/BasicTextUI.html#damageRange-javax.swing.text.JTextComponent-int-int-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc, int p0, int p1)

Causes the portion of the view responsible for the given part of the model to be repainted.

void

[damageRange](../../../../javax/swing/plaf/basic/BasicTextUI.html#damageRange-javax.swing.text.JTextComponent-int-int-javax.swing.text.Position.Bias-javax.swing.text.Position.Bias-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") t, int p0, int p1,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text") p0Bias,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text") p1Bias)

Causes the portion of the view responsible for the given part of the model to be repainted.

protected [JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text")

[getComponent](../../../../javax/swing/plaf/basic/BasicTextUI.html#getComponent--)()

Fetches the text component associated with this UI implementation.

[EditorKit](../../../../javax/swing/text/EditorKit.html "class in javax.swing.text")

[getEditorKit](../../../../javax/swing/plaf/basic/BasicTextUI.html#getEditorKit-javax.swing.text.JTextComponent-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc)

Fetches the EditorKit for the UI.

protected [String](../../../../java/lang/String.html "class in java.lang")

[getKeymapName](../../../../javax/swing/plaf/basic/BasicTextUI.html#getKeymapName--)()

Fetches the name of the keymap that will be installed/used by default for this UI.

[Dimension](../../../../java/awt/Dimension.html "class in java.awt")

[getMaximumSize](../../../../javax/swing/plaf/basic/BasicTextUI.html#getMaximumSize-javax.swing.JComponent-)([JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Gets the maximum size for the editor component.

[Dimension](../../../../java/awt/Dimension.html "class in java.awt")

[getMinimumSize](../../../../javax/swing/plaf/basic/BasicTextUI.html#getMinimumSize-javax.swing.JComponent-)([JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Gets the minimum size for the editor component.

int

[getNextVisualPositionFrom](../../../../javax/swing/plaf/basic/BasicTextUI.html#getNextVisualPositionFrom-javax.swing.text.JTextComponent-int-javax.swing.text.Position.Bias-int-javax.swing.text.Position.Bias:A-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") t, int pos,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text") b, int direction,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text")[] biasRet)

Provides a way to determine the next visually represented model location that one might place a caret.

[Dimension](../../../../java/awt/Dimension.html "class in java.awt")

[getPreferredSize](../../../../javax/swing/plaf/basic/BasicTextUI.html#getPreferredSize-javax.swing.JComponent-)([JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Gets the preferred size for the editor component.

protected abstract [String](../../../../java/lang/String.html "class in java.lang")

[getPropertyPrefix](../../../../javax/swing/plaf/basic/BasicTextUI.html#getPropertyPrefix--)()

Gets the name used as a key to look up properties through the UIManager.

[View](../../../../javax/swing/text/View.html "class in javax.swing.text")

[getRootView](../../../../javax/swing/plaf/basic/BasicTextUI.html#getRootView-javax.swing.text.JTextComponent-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc)

Fetches a View with the allocation of the associated text component (i.e.

[String](../../../../java/lang/String.html "class in java.lang")

[getToolTipText](../../../../javax/swing/plaf/basic/BasicTextUI.html#getToolTipText-javax.swing.text.JTextComponent-java.awt.Point-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") t,[Point](../../../../java/awt/Point.html "class in java.awt") pt)

Returns the string to be used as the tooltip at the passed in location.

protected [Rectangle](../../../../java/awt/Rectangle.html "class in java.awt")

[getVisibleEditorRect](../../../../javax/swing/plaf/basic/BasicTextUI.html#getVisibleEditorRect--)()

Gets the allocation to give the root View.

protected void

[installDefaults](../../../../javax/swing/plaf/basic/BasicTextUI.html#installDefaults--)()

Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color.

protected void

[installKeyboardActions](../../../../javax/swing/plaf/basic/BasicTextUI.html#installKeyboardActions--)()

protected void

[installListeners](../../../../javax/swing/plaf/basic/BasicTextUI.html#installListeners--)()

Installs listeners for the UI.

void

[installUI](../../../../javax/swing/plaf/basic/BasicTextUI.html#installUI-javax.swing.JComponent-)([JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Installs the UI for a component.

protected void

[modelChanged](../../../../javax/swing/plaf/basic/BasicTextUI.html#modelChanged--)()

Flags model changes.

[Rectangle](../../../../java/awt/Rectangle.html "class in java.awt")

[modelToView](../../../../javax/swing/plaf/basic/BasicTextUI.html#modelToView-javax.swing.text.JTextComponent-int-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc, int pos)

Converts the given location in the model to a place in the view coordinate system.

[Rectangle](../../../../java/awt/Rectangle.html "class in java.awt")

[modelToView](../../../../javax/swing/plaf/basic/BasicTextUI.html#modelToView-javax.swing.text.JTextComponent-int-javax.swing.text.Position.Bias-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc, int pos,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text") bias)

Converts the given location in the model to a place in the view coordinate system.

void

[paint](../../../../javax/swing/plaf/basic/BasicTextUI.html#paint-java.awt.Graphics-javax.swing.JComponent-)([Graphics](../../../../java/awt/Graphics.html "class in java.awt") g,[JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Paints the interface.

protected void

[paintBackground](../../../../javax/swing/plaf/basic/BasicTextUI.html#paintBackground-java.awt.Graphics-)([Graphics](../../../../java/awt/Graphics.html "class in java.awt") g)

Paints a background for the view.

protected void

[paintSafely](../../../../javax/swing/plaf/basic/BasicTextUI.html#paintSafely-java.awt.Graphics-)([Graphics](../../../../java/awt/Graphics.html "class in java.awt") g)

Paints the interface safely with a guarantee that the model won't change from the view of this thread.

protected void

[propertyChange](../../../../javax/swing/plaf/basic/BasicTextUI.html#propertyChange-java.beans.PropertyChangeEvent-)([PropertyChangeEvent](../../../../java/beans/PropertyChangeEvent.html "class in java.beans") evt)

This method gets called when a bound property is changed on the associated JTextComponent.

protected void

[setView](../../../../javax/swing/plaf/basic/BasicTextUI.html#setView-javax.swing.text.View-)([View](../../../../javax/swing/text/View.html "class in javax.swing.text") v)

Sets the current root of the view hierarchy and calls invalidate().

protected void

[uninstallDefaults](../../../../javax/swing/plaf/basic/BasicTextUI.html#uninstallDefaults--)()

Sets the component properties that have not been explicitly overridden to null.

protected void

[uninstallKeyboardActions](../../../../javax/swing/plaf/basic/BasicTextUI.html#uninstallKeyboardActions--)()

protected void

[uninstallListeners](../../../../javax/swing/plaf/basic/BasicTextUI.html#uninstallListeners--)()

Uninstalls listeners for the UI.

void

[uninstallUI](../../../../javax/swing/plaf/basic/BasicTextUI.html#uninstallUI-javax.swing.JComponent-)([JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Deinstalls the UI for a component.

void

[update](../../../../javax/swing/plaf/basic/BasicTextUI.html#update-java.awt.Graphics-javax.swing.JComponent-)([Graphics](../../../../java/awt/Graphics.html "class in java.awt") g,[JComponent](../../../../javax/swing/JComponent.html "class in javax.swing") c)

Superclass paints background in an uncontrollable way (i.e.

int

[viewToModel](../../../../javax/swing/plaf/basic/BasicTextUI.html#viewToModel-javax.swing.text.JTextComponent-java.awt.Point-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc,[Point](../../../../java/awt/Point.html "class in java.awt") pt)

Converts the given place in the view coordinate system to the nearest representative location in the model.

int

[viewToModel](../../../../javax/swing/plaf/basic/BasicTextUI.html#viewToModel-javax.swing.text.JTextComponent-java.awt.Point-javax.swing.text.Position.Bias:A-)([JTextComponent](../../../../javax/swing/text/JTextComponent.html "class in javax.swing.text") tc,[Point](../../../../java/awt/Point.html "class in java.awt") pt,[Position.Bias](../../../../javax/swing/text/Position.Bias.html "class in javax.swing.text")[] biasReturn)

Converts the given place in the view coordinate system to the nearest representative location in the model.