public class BasicTextAreaUI extends BasicTextUI
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
Constructor and Description |
---|
BasicTextAreaUI()
构建了一种新的basictextareaui对象。
|
Modifier and Type | Method and Description |
---|---|
View |
create(Element elem)
创建元素的视图。
|
static ComponentUI |
createUI(JComponent ta)
创建一个用户界面的一个文本区。
|
int |
getBaseline(JComponent c, int width, int height)
返回基线。
|
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c)
返回一个枚举指示组件的尺寸的变化的基线。
|
Dimension |
getMinimumSize(JComponent c)
该方法以考虑符号的宽度。
|
Dimension |
getPreferredSize(JComponent c)
该方法以考虑符号的宽度。
|
protected String |
getPropertyPrefix()
获取用于查找性能的一个关键的名字”。
|
protected void |
installDefaults()
初始化组件的属性,如字体、前景、背景、符号的颜色,选择颜色,选择文字颜色,禁用的文本颜色,和边框颜色。
|
protected void |
propertyChange(PropertyChangeEvent evt)
该方法被调用时,绑定属性是相关的jtextcomponent改变。
|
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, paintBackground, paintSafely, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
contains, getAccessibleChild, getAccessibleChildrenCount
public static ComponentUI createUI(JComponent ta)
ta
-文本区域
protected String getPropertyPrefix()
getPropertyPrefix
方法重写,继承类
BasicTextUI
protected void installDefaults()
BasicTextUI
protected void propertyChange(PropertyChangeEvent evt)
propertyChange
方法重写,继承类
BasicTextUI
evt
-属性更改事件
public Dimension getPreferredSize(JComponent c)
getPreferredSize
方法重写,继承类
BasicTextUI
c
-编辑组件
IllegalArgumentException
如果无效值传递
JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
getMinimumSize
方法重写,继承类
BasicTextUI
c
-编辑组件
IllegalArgumentException
如果无效值传递
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public View create(Element elem)
create
接口
ViewFactory
create
方法重写,继承类
BasicTextUI
elem
-元素
View
public int getBaseline(JComponent c, int width, int height)
getBaseline
方法重写,继承类
ComponentUI
c
-
JComponent
基线被要求
width
的宽度得到基线
height
-高度得到基线
null
c
NullPointerException
IllegalArgumentException
如果宽度或高度小于0
JComponent.getBaseline(int, int)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehavior
方法重写,继承类
ComponentUI
c
-
JComponent
返回基线调整行为
null
c
NullPointerException
JComponent.getBaseline(int, int)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.