public class FlexNumericStepper extends FlexObject
NumericStepper 控件包含单行输入文本字段和一对用于步进可能值的箭头按钮。向上箭头和向下箭头键也重复循环这些值。
Modifier | Constructor and Description |
---|---|
protected |
FlexNumericStepper(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexNumericStepper。
|
Modifier and Type | Method and Description |
---|---|
void |
change(double value)
NumericStepper 控件的值随用户交互的结果更改时发送。
|
Color |
getColor()
获取 组件中的文本颜色,包括组件标签。
|
Color |
getDisabledColor()
获取 已禁用组件时组件中的文本颜色。
|
List<Color> |
getFillColors()
获取 用于控件背景色填充的颜色。
|
String |
getFontFamily()
获取 可使用的字体名称。
|
double |
getFontSize()
获取 文本高度(像素)。
|
String |
getFontStyle()
获取 文本是否为斜体。
|
String |
getFontWeight()
获取 文本是否为粗体。
|
double |
getMaximum()
获取 NumericStepper 的最大值。
|
double |
getMinimum()
获取 NumericStepper 的最小值。
|
double |
getNextValue()
获取 比当前 Value 属性大一步但不大于最大属性值的值。
|
double |
getPreviousValue()
获取 比当前 Value 属性小一步但不小于最大属性值的值。
|
double |
getStepSize()
获取 值之间的更改的非零单位。
|
String |
getTextAlign()
获取 容器中的文本对齐。
|
String |
getTextDecoration()
获取 文本是否加下划线。
|
int |
getTextIndent()
获取 容器左侧文本的第一行的偏移(像素)。
|
Double |
getValue()
获取 NumericStepper 控件的文本区域中显示的值。
|
void |
input(String text)
创建包含文本事件相关信息的 Event 对象。
|
void |
selectText(int beginIndex,
int endIndex)
让您跟踪文本字段中的选定内容。
|
void |
type(String keyCode)
用户按键时发送。
|
void |
type(String keyCode,
ModifierKey keyModifier)
用户按键时发送。
|
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, getText, 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 FlexNumericStepper(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexNumericStepper 的句柄desktop
- 此对象所在的桌面public void change(double value)
value
- 发送事件时 NumericStepper 控件的值public void input(String text)
text
- 用户输入的一个或多个文本字符。事件侦听器可通过文本属性访问此信息。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()
public List<Color> getFillColors()
public String getFontFamily()
不同于完整的 CSS 实施,逗号分隔的列表不受支持。您可以使用任何字体系列名称。如果您指定字体名,则系统会将其转换为相应的设备字体。默认值为 Verdana
。
public double getFontSize()
除 ColorPicker 控件外,对于所有其他控件,默认值为 10;对于 ColorPicker 控件,默认值为 11。
public String getFontStyle()
认可的值为常规
和斜体
。默认值为常规
。
public String getFontWeight()
Button 控件的默认值为粗体。所有其他控件的默认值为常规。
public double getMaximum()
最大值可为任意数字,包括分数值。默认值为 10。
public double getMinimum()
最小值可为任意数字,包括分数值。默认值为 0。
public double getNextValue()
public double getPreviousValue()
public double getStepSize()
Value 属性须为此数字的倍数。默认值为 1。
public String getTextAlign()
多数组件的默认值为左。对于 FormItem 组件,默认值为右。对于 Button、LinkButton 和 AccordionHeader 组件,默认值为居中,仅在 labelPlacement 属性设为左或右时认可此属性。如果 labelPlacement 设为上或下,则文本和所有图标将居中。
public String getTextDecoration()
无
和下划线
。默认值为无
。public int getTextIndent()
public Double getValue()
如果用户输入的值不是 stepSize 属性的倍数或不在最大与最小属性的范围区间内,则此属性将设为最接近有效的值。
默认值为 0。
getValue
in class TestObject
Copyright 2009-2012 Micro Focus. All Rights Reserved.