public class FlexWindow extends FlexContainer implements IMoveable
Modifier | Constructor and Description |
---|---|
protected |
FlexWindow(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexWindow。
|
Modifier and Type | Method and Description |
---|---|
void |
close()
关闭窗口。
|
void |
closeSynchron()
关闭窗口并等待直到窗口关闭。
|
void |
closeSynchron(boolean closeConfirm)
关闭窗口并等待直到窗口关闭。
|
List<IMoveable> |
getCloseWindows()
返回需关闭的窗口,以便只有应用程序的主窗口打开。
|
TestObject |
getFocus()
返回具有输入焦点的对象。
|
double |
getMaxHeight()
获取 布局期间父级考虑的组件的最大建议高度。
|
double |
getMaxWidth()
获取 布局期间父级考虑的组件的最大建议宽度。
|
double |
getMinHeight()
获取 布局期间父级考虑的组件的最小建议高度。
|
double |
getMinWidth()
获取 布局期间父级考虑的组件的最小建议宽度。
|
IMoveable |
getNextCloseWindow()
返回需关闭的下一个窗口,以关闭除应用程序主窗口以外的其他所有窗口。
|
String |
getStatus()
获取 状态栏中显示的字符串(如果可见)。
|
String |
getSystemChrome()
获取 窗口具有的系统 Chrome(如果有)类型。
|
String |
getTitle()
获取 窗口标题栏和任务栏上显示的标题。
|
int |
getWindowState()
获取 窗口状态。
|
boolean |
isActive()
返回窗口是否已设置为活动。
|
boolean |
isAIRWindow()
获取 此窗口是否为 AIR 窗口的值。
|
boolean |
isAlwaysInFront()
获取 基础 NativeWindow 是否始终置于其他窗口前面的值。
|
boolean |
isClosed()
获取 基础窗口是否已关闭的值。
|
boolean |
isMaximizable()
获取 窗口是否可以最大化的值。
|
boolean |
isMinimizable()
获取 窗口是否可以最小化的值。
|
boolean |
isResizable()
获取 窗口是否可以调整大小的值。
|
boolean |
isShowStatusBar()
获取 状态栏是否可见的值。
|
boolean |
isTransparent()
获取 窗口是否透明的值。
|
void |
maximize()
最大化窗口。
|
void |
minimize()
将窗口缩小为图标。
|
void |
move(Point pos)
移动窗口。
|
void |
restore()
将窗口还原为正常尺寸。
|
void |
setActive()
激活窗口。
|
void |
size(int width,
int height)
调整窗口大小。
|
void |
stateChange(String newWindowState)
更改窗口的显示状态时发送。
|
dragCancel, dragCancel, dragDrop, dragDrop, dragDrop, dragStart, dragStart, getBackgroundAlpha, getBackgroundColor, getBackgroundDisabledColor, getBackgroundImage, getBackgroundSize, getColumnNames, getCreationIndex, getCreationPolicy, getFillAlphas, getFillColors, getFirstVisibleRow, getFontFamily, getFontSize, getFontStyle, getFontWeight, getLabel, getLastVisibleRow, getNumChildren, getNumColumns, getNumRows, getValues, mouseScroll, mouseScroll, scroll
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, 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 FlexWindow(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexWindow 的句柄desktop
- 此对象所在的桌面public void closeSynchron()
方法通过尝试以下事件试图关闭窗口,窗口关闭时按此顺序停止:
close()
方法。closeConfirm
参数设置为 true
:单击用选项 OPT_CLOSE_WINDOW_BUTTONS 指定的按钮列表。此方法支持您制定的多个规范以帮助开放代理关闭窗口。您可以通过 Desktop.setOption(字符串,对象)制定这些规范以为涉及的选项设置相应值。例如,如果关闭窗口会打开确认对话框,其带有包含“不保存”文本的按钮,则使用:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
关闭可能失败。例如,如果关闭窗口会导致应用程序显示消息框并且 closeConfirm 设置为 false
;或者如果用于关闭消息框的按钮未包含在 OPT_CLOSE_CONFIRM_BUTTONS 选项下,则调用将失败并且引发 CloseFailedException。
closeSynchron
in interface IMoveable
public void closeSynchron(boolean closeConfirm)
方法通过尝试以下事件试图关闭窗口,窗口关闭时按此顺序停止:
close()
方法。closeConfirm
参数设置为 true
:单击用选项 OPT_CLOSE_WINDOW_BUTTONS 指定的按钮列表。此方法支持您制定的多个规范以帮助开放代理关闭窗口。您可以通过 Desktop.setOption(字符串,对象)制定这些规范以为涉及的选项设置相应值。例如,如果关闭窗口会打开确认对话框,其带有包含“不保存”文本的按钮,则使用:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
关闭可能失败。例如,如果关闭窗口会导致应用程序显示消息框并且 closeConfirm 设置为 false
;或者如果用于关闭消息框的按钮未包含在 OPT_CLOSE_CONFIRM_BUTTONS 选项下,则调用将失败并且引发 CloseFailedException。
closeSynchron
in interface IMoveable
closeConfirm
- 指定关闭窗口时是否关闭可能弹出的确认对话框,如“保存更改”对话框。如果确认对话框弹出,则使用 true
关闭确认对话框和 false
以引发异常。如果设置为选项 true
值,则 OPT_CLOSE_CONFIRM_BUTTONS 将用于确定要选择哪个按钮才能关闭确认对话框。public List<IMoveable> getCloseWindows()
getCloseWindows
in interface IMoveable
public TestObject getFocus()
public IMoveable getNextCloseWindow()
getNextCloseWindow
in interface IMoveable
public void move(Point pos)
public void size(int width, int height)
public void stateChange(String newWindowState)
newWindowState
- 表示新状态public boolean isAlwaysInFront()
public boolean isClosed()
public boolean isAIRWindow()
public double getMaxHeight()
public boolean isMaximizable()
public double getMaxWidth()
public double getMinHeight()
public boolean isMinimizable()
public double getMinWidth()
public boolean isResizable()
public boolean isShowStatusBar()
public String getStatus()
public String getSystemChrome()
public String getTitle()
public boolean isTransparent()
public int getWindowState()
getWindowState
in interface IMoveable
Copyright 2009-2012 Micro Focus. All Rights Reserved.