public class FlexTextArea extends FlexScrollBase
TextArea 控件支持 HTML,因此具有 Flash Player 和 AIR 功能。
Modifier | Constructor and Description |
---|---|
protected |
FlexTextArea(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexTextArea。
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
获取 组件中的文本颜色,包括组件标签。
|
Color |
getDisabledColor()
获取 组件的背景颜色。
|
String |
getFontFamily()
获取 可使用的字体名称。
|
double |
getFontSize()
获取 文本高度(像素)。
|
String |
getFontStyle()
获取 文本是否为斜体。
|
String |
getFontWeight()
获取 文本是否为粗体。
|
String |
getHorizontalScrollPolicy()
获取 水平滚动条是否始终开启 (ScrollPolicy.ON)、始终关闭 (ScrollPolicy.OFF) 或按需开启 (ScrollPolicy.AUTO)。
|
String |
getHtmlText()
获取 TextInput 控件显示的文本,包括表示文本样式的 HTML 标记.。
|
double |
getLength()
获取 TextArea 中显示的文本字符数。
|
int |
getMaxChars()
获取 用户可输入文本字段的最大字符数。
|
String |
getRestrict()
获取 用户可输入控件的字符集。
|
int |
getSelectionBeginIndex()
获取 当前选定内容中第一个字符的零基字符索引值。
|
int |
getSelectionEndIndex()
获取 当前选定内容中最后一个字符之后的零基索引(相当于最后一个字符的 1 基索引)。
|
String |
getText()
获取 控件中显示的纯文本。
|
void |
input(String text)
用户在控件中键入、删除或粘贴文本时发送。
|
boolean |
isDisplayAsPassword()
获取 此控件是否用于输入密码。
|
boolean |
isEditable()
获取 用户是否可编辑控件中的文本。
|
boolean |
isWordWrap()
获取 行中的文本是否可以自动换行。
|
void |
scroll(int position,
FlexScrollDirection direction,
FlexScrollDetail detail)
定义滚动事件的事件对象的类型属性值。
|
void |
selectText(int beginIndex,
int endIndex)
让您跟踪文本字段中的选定内容。
|
void |
type(String keyCode)
用户按键时发送。
|
void |
type(String keyCode,
ModifierKey keyModifier)
用户按键时发送。
|
mouseScroll, mouseScroll
changeFocus, changeFocus, changeFocus, getAutomationClassName, getAutomationIndex, getAutomationName, getClassName, getCurrentState, getErrorColor, getErrorString, getId, getNumAutomationChildren, getPercentHeight, getPercentWidth, getScaleX, getScaleY, getThemeColor, getToolTip, isEnabled, isFocusEnabled, isUseHandCursor, move, move, move, setFocus
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAlpha, getHeight, getStyle, getTabIndex, getWidth, getX, getY, isMouseEnabled, isTabChildren, isTabEnabled, isVisible, mouseMove, mouseMove, nativeToString, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexTextArea(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexTextArea 的句柄desktop
- 此对象所在的桌面public void input(String text)
text
- 用户输入的字符或字符序列public void scroll(int position, FlexScrollDirection direction, FlexScrollDetail detail)
position
- 包含新滚动位置direction
- 包含滚动方向 ScrollEventDirection.HORIZONTAL 或 ScrollEventDirection.VERTICALdetail
- 提供滚动活动的类型特性。可能值常数在 ScrollEventDetail 类中提供。public void selectText(int beginIndex, int endIndex)
beginIndex
- 选定内容开始处索引endIndex
- 选定内容结束处索引public void type(String keyCode)
keyCode
- 按下或松开的键的键码值public void type(String keyCode, ModifierKey keyModifier)
keyCode
- 按下或松开的键的键码值keyModifier
- 可使用的键修饰符(例如 Ctrl 键)public Color getColor()
public Color getDisabledColor()
您可以设置 backgroundColor 和 backgroundImage。某些组件不具有背景。DataGrid 控件会忽略此样式。默认值为未定义,这意味着尚未进行设置。如果此样式和 backgroundImage 样式均未定义,则组件具有透明背景。
public boolean isDisplayAsPassword()
如果为 true,控件不显示输入的文本,控件中输入的每个文本字符显示为字符 *
。默认值为 false。
public boolean isEditable()
如果为 true,则用户可编辑此文本。默认值为 true。
public String getFontFamily()
不同于完整的 CSS 实施,逗号分隔的列表不受支持。您可以使用任何字体系列名称。如果您指定字体名,则系统会将其转换为相应的设备字体。默认值为 Verdana
。
public double getFontSize()
除 ColorPicker 控件外,对于所有其他控件,默认值为 10;对于 ColorPicker 控件,默认值为 11。
public String getFontStyle()
认可的值为常规
和斜体
。默认值为常规
。
public String getFontWeight()
认可的值为常规和粗体。Button 控件的默认值为粗体。所有其他控件的默认值为常规。
public String getHorizontalScrollPolicy()
默认值为 ScrollPolicy.AUTO。
public String getHtmlText()
指定此属性中的 HTML 文本时,您可使用 HTML 标记的子集,Flash TextField 控件支持此子集。
public double getLength()
public int getMaxChars()
public String getRestrict()
public int getSelectionBeginIndex()
public int getSelectionEndIndex()
public String getText()
其外观由此 Label 控件的 CSS 样式确定。
默认值为 ""。
getText
in class TestObject
public boolean isWordWrap()
如果为 tru,则启用行中文本的自动换行。仅在 variableRowHeight 属性也为 true 时生效。默认值为 false。
Copyright 2009-2012 Micro Focus. All Rights Reserved.