public class FlexWindowedApplication extends FlexApplication implements IMoveable
Modifier | Constructor and Description |
---|---|
protected |
FlexWindowedApplication(JtfObjectHandle handle,
Desktop desktop)
Creates a new FlexWindowedApplication with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the window.
|
void |
closeSynchron()
Closes the window and waits until the window is closed.
|
void |
closeSynchron(boolean closeConfirm)
Closes the window and waits until the window is closed.
|
String |
getApplicationID()
Gets the identifier that AIR uses to identify the application.
|
List<IMoveable> |
getCloseWindows()
Returns the windows that need to be closed in order so that only the main window of the application is open.
|
TestObject |
getFocus()
Returns the object with the input focus.
|
double |
getMaxHeight()
Gets the maximum recommended height of the component to be considered by the parent during layout.
|
double |
getMaxWidth()
Gets the maximum recommended width of the component to be considered by the parent during layout.
|
double |
getMinHeight()
Gets the minimum recommended height of the component to be considered by the parent during layout.
|
double |
getMinWidth()
Gets the minimum recommended width of the component to be considered by the parent during layout.
|
IMoveable |
getNextCloseWindow()
Returns the next window that need to be closed in order to close all windows of the application except the main window.
|
String |
getStatus()
Gets the string that appears in the status bar, if it is visible.
|
String |
getSystemChrome()
Gets the type of system chrome (if any) the window has.
|
String |
getTitle()
Gets the title that appears in the window title bar and the taskbar.
|
int |
getWindowState()
Gets the state of a window.
|
boolean |
isActive()
Returns whether the window is set to active.
|
boolean |
isAlwaysInFront()
Gets a value whether the underlying NativeWindow is always in front of other windows.
|
boolean |
isAutoExit()
Gets a value whether the AIR application will quit when the last window closes or will continue running in the background.
|
boolean |
isClosed()
Gets a value whether the underlying window has been closed.
|
boolean |
isMaximizable()
Gets a value whether the window can be maximized.
|
boolean |
isMinimizable()
Gets a value whether the window can be minimized.
|
boolean |
isResizable()
Gets a value whether the window can be resized.
|
boolean |
isShowStatusBar()
Gets a value whether the status bar is visible.
|
boolean |
isTransparent()
Gets a value whether the window is transparent.
|
void |
maximize()
Maximizes the window.
|
void |
minimize()
Reduces the window to an icon.
|
void |
move(Point pos)
Moves the window.
|
void |
restore()
Restores the window to its previous size.
|
void |
setActive()
Makes the window active.
|
void |
size(int width,
int height)
Resizes the window.
|
getUrl
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 FlexWindowedApplication(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the FlexWindowedApplicationdesktop
- the desktop on which this object livespublic void closeSynchron()
The method attempts to close the window by trying the following events, in this sequence, stopping when the window closes:
close()
method on the window.closeConfirm
parameter is set to true
: Click the list of buttons specified with the option OPT_CLOSE_WINDOW_BUTTONS.This method supports several specifications you can make to help the Open Agent closes a window. You can make these specification by use Desktop.setOption(String, Object) to set the appropriate values for the mentioned options. For example, if closing the window opens a confirmation dialog with a button that contains the text "Do not save" use:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
Close may fail. For example, if closing a window causes the application to display a message box and closeConfirm is set to false
, or if the buttons used to close the message box are not covered under the OPT_CLOSE_CONFIRM_BUTTONS option, the call will fail and raise a CloseFailedException.
closeSynchron
in interface IMoveable
public void closeSynchron(boolean closeConfirm)
The method attempts to close the window by trying the following events, in this sequence, stopping when the window closes:
close()
method on the window.closeConfirm
parameter is set to true
: Click the list of buttons specified with the option OPT_CLOSE_WINDOW_BUTTONS.This method supports several specifications you can make to help the Open Agent closes a window. You can make these specification by use Desktop.setOption(String, Object) to set the appropriate values for the mentioned options. For example, if closing the window opens a confirmation dialog with a button that contains the text "Do not save" use:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
Close may fail. For example, if closing a window causes the application to display a message box and closeConfirm is set to false
, or if the buttons used to close the message box are not covered under the OPT_CLOSE_CONFIRM_BUTTONS option, the call will fail and raise a CloseFailedException.
closeSynchron
in interface IMoveable
closeConfirm
- specifies whether to close confirmation dialogs that may pop up when closing the window, for example a 'Save changes' dialog. Use true
to close confirmation dialogs and false
to raise an exception if a confirmation dialog pops up. If set to true
the value of the option OPT_CLOSE_CONFIRM_BUTTONS is used to determine which button to select in order to close confirmation dialogs.public List<IMoveable> getCloseWindows()
getCloseWindows
in interface IMoveable
public TestObject getFocus()
public IMoveable getNextCloseWindow()
getNextCloseWindow
in interface IMoveable
public boolean isActive()
public void minimize()
public void move(Point pos)
public void restore()
public void setActive()
public void size(int width, int height)
public boolean isAlwaysInFront()
public String getApplicationID()
public boolean isAutoExit()
public boolean isClosed()
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.