Class BasicTextAreaUI
- All Implemented Interfaces:
ViewFactory
- Direct Known Subclasses:
SynthTextAreaUI
public class BasicTextAreaUI extends BasicTextUI
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 JavaBeans has been added to the java.beans package. Please see XMLEncoder.
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor Summary
| Constructor | Description |
|---|---|
BasicTextAreaUI() |
Constructs a new BasicTextAreaUI object. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
View |
create |
Creates the view for an element. |
static ComponentUI |
createUI |
Creates a UI for a JTextArea. |
int |
getBaseline |
Returns the baseline. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior |
Returns an enum indicating how the baseline of the component changes as the size changes. |
Dimension |
getMinimumSize |
The method is overridden to take into account caret width. |
Dimension |
getPreferredSize |
The method is overridden to take into account caret width. |
protected String |
getPropertyPrefix() |
Fetches the name used as a key to look up properties through the UIManager. |
protected void |
propertyChange |
This method gets called when a bound property is changed on the associated JTextComponent. |
Methods declared in class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, getVisibleEditorRect, installDefaults, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
Methods declared in class javax.swing.plaf.TextUI
getToolTipText2D, modelToView2D, viewToModel2D
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
Constructor Details
BasicTextAreaUI
public BasicTextAreaUI()
Method Details
createUI
public static ComponentUI createUI(JComponent ta)
- Parameters:
-
ta- a text area - Returns:
- the UI
getPropertyPrefix
protected String getPropertyPrefix()
- Specified by:
-
getPropertyPrefixin classBasicTextUI - Returns:
- the name ("TextArea")
propertyChange
protected void propertyChange(PropertyChangeEvent evt)
- Overrides:
-
propertyChangein classBasicTextUI - Parameters:
-
evt- the property change event
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
-
getPreferredSizein classBasicTextUI - Parameters:
-
c- the editor component - Returns:
- the preferred size
- Throws:
-
IllegalArgumentException- if invalid value is passed - Since:
- 1.5
- See Also:
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
-
getMinimumSizein classBasicTextUI - Parameters:
-
c- the editor component - Returns:
- the minimum size
- Throws:
-
IllegalArgumentException- if invalid value is passed - Since:
- 1.5
- See Also:
create
public View create(Element elem)
- Specified by:
-
createin interfaceViewFactory - Overrides:
-
createin classBasicTextUI - Parameters:
-
elem- the element - Returns:
- the view
- See Also:
getBaseline
public int getBaseline(JComponent c, int width, int height)
- Overrides:
-
getBaselinein classComponentUI - Parameters:
-
c-JComponentbaseline is being requested for -
width- the width to get the baseline for -
height- the height to get the baseline for - Returns:
- baseline or a value < 0 indicating there is no reasonable baseline
- Throws:
-
NullPointerException- ifcisnull -
IllegalArgumentException- if width or height is < 0 - Since:
- 1.6
- See Also:
getBaselineResizeBehavior
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
- Overrides:
-
getBaselineResizeBehaviorin classComponentUI - Parameters:
-
c-JComponentto return baseline resize behavior for - Returns:
- an enum indicating how the baseline changes as the component size changes
- Throws:
-
NullPointerException- ifcisnull - Since:
- 1.6
- See Also:
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/plaf/basic/BasicTextAreaUI.html