Open topic with navigation

com.hp.lft.sdk.winforms

## Interface Window

- All Superinterfaces:
    Clickable, DoubleClickable, LocationInfoProvider, SupportDragAndDrop, SupportSendKeys, SupportsNativeObject, TestObject, TestObjectDescriber, TopLevelObject, UiObjectBase, VisibleProvider, WaitUntilVisibleProvider, WaitUntilEnabledProvider, EnabledProvider

      public interface Window
      extends UiObjectBase, TopLevelObject

  A .NET Windows Forms window.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Activates this window.
    `void` | `activate(MouseButton button)` Activates this window using the specified mouse button.
    `void` | `close()` Closes this window.
    `WindowState` | `getWindowState()` Returns the current window state.
    `boolean` | `hasBorder()` Indicates whether the object has a thin-line border.
    `boolean` | `hasCaption()` Indicates whether the object has a title bar.
    `boolean` | `hasSizebox()` Indicates whether the object has a sizing border.
    `boolean` | `hasSystemMenu()` Indicates whether the object has a window menu on its title bar.
    `boolean` | `isActive()` Indicates whether this object is the foreground object (currently active).
    `boolean` | `isMaximizable()` Indicates whether this window can be maximized.
    `boolean` | `isMdiChildWindow()` Indicates whether this object is a multiple-document interface (MDI) child window.
    `boolean` | `isMinimizable()` Indicates whether this object can be minimized.
    `boolean` | `isPopupWindow()` Indicates whether the object is a pop-up window.
    `boolean` | `isToolWindow()` Indicates whether the object is a floating toolbar.
    `boolean` | `isTopmost()` Indicates whether this object stays above all non-topmost windows even when the object is deactivated.
    `void` | `maximize()` Maximizes this window to fill the entire screen.
    `void` | `minimize()` Minimizes this window to an icon.
    `void` | `move(int x, int y)` Moves the window to the specified absolute location on the screen.
    `void` | `move(java.awt.Point point)` Moves the window to the specified absolute location on the screen.
    `void` | `resize(java.awt.Dimension size)` Resizes this window.
    `void` | `resize(int width, int height)` Resizes this window to the specified dimensions.
    `void` | `restore()` Restores this window to its previous size.

    - ### Methods inherited from interface com.hp.lft.sdk.winforms.UiObjectBase

      `fireEvent, getFullNamePath, getFullType, getObjectName, getObjectProperty, getText, getWindowClassRegExp, getWindowId, isChildWindow, isOwnedWindow`

    - ### Methods inherited from interface com.hp.lft.sdk.UiObjectBase

      `getHandle, getNativeClass, getWindowTitleRegExp, isEnabled, isFocused, isVisible, mouseMove`

    - ### Methods inherited from interface com.hp.lft.sdk.Clickable

      `click, click, click`

    - ### Methods inherited from interface com.hp.lft.sdk.DoubleClickable

      `doubleClick, doubleClick, doubleClick`

    - ### Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider

      `getAbsoluteLocation, getLocation, getSize`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportSendKeys

      `sendKeys, sendKeys`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportDragAndDrop

      `dragAndDropOn, dragAndDropOn`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject

      `getNativeObject`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObject

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

    - ### Methods inherited from interface com.hp.lft.sdk.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

    - ### Methods inherited from interface com.hp.lft.sdk.EnabledProvider

      `isEnabled`

    - ### Methods inherited from interface com.hp.lft.sdk.WaitUntilVisibleProvider

      `waitUntilVisible, waitUntilVisible`

    - ### Methods inherited from interface com.hp.lft.sdk.VisibleProvider

      `isVisible`

- - ### Method Detail

    - #### isActive

          boolean isActive()
                    throws GeneralLeanFtException

      Indicates whether this object is the foreground object (currently active).
      Returns:
        true if this is foreground object
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### hasBorder

          boolean hasBorder()
                     throws GeneralLeanFtException

      Indicates whether the object has a thin-line border.
      Returns:
        true if this has thin-line border
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### hasCaption

          boolean hasCaption()
                      throws GeneralLeanFtException

      Indicates whether the object has a title bar.
      Returns:
        true if this has title bar
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### hasSizebox

          boolean hasSizebox()
                      throws GeneralLeanFtException

      Indicates whether the object has a sizing border.
      Returns:
        true if this has sizing border
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### hasSystemMenu

          boolean hasSystemMenu()
                         throws GeneralLeanFtException

      Indicates whether the object has a window menu on its title bar.
      Returns:
        true if this has window menu on title bar
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isMdiChildWindow

          boolean isMdiChildWindow()
                            throws GeneralLeanFtException

      Indicates whether this object is a multiple-document interface (MDI) child window.
      Returns:
        true if MDI child window
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isPopupWindow

          boolean isPopupWindow()
                         throws GeneralLeanFtException

      Indicates whether the object is a pop-up window.
      Returns:
        true if a pop-up window
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isToolWindow

          boolean isToolWindow()
                        throws GeneralLeanFtException

      Indicates whether the object is a floating toolbar.
      Returns:
        true if a tool window
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isMaximizable

          boolean isMaximizable()
                         throws GeneralLeanFtException

      Indicates whether this window can be maximized.
      Returns:
        true if can be maximized
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isMinimizable

          boolean isMinimizable()
                         throws GeneralLeanFtException

      Indicates whether this object can be minimized.
      Returns:
        true if can be minimized
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getWindowState

                                                      WindowState getWindowState()
                              throws GeneralLeanFtException

      Returns the current window state.
      Returns:
        the current window state
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isTopmost

          boolean isTopmost()
                     throws GeneralLeanFtException

      Indicates whether this object stays above all non-topmost windows even when the object is deactivated.
      Returns:
        true if always topmost
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activate

          void activate()
                 throws GeneralLeanFtException

      Activates this window.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activate

          void activate(MouseButton button)
                 throws GeneralLeanFtException

      Activates this window using the specified mouse button.
      Parameters:
        `button` - the mouse button used to click the window
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### close

          void close()
              throws GeneralLeanFtException

      Closes this window.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### maximize

          void maximize()
                 throws GeneralLeanFtException

      Maximizes this window to fill the entire screen.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### minimize

          void minimize()
                 throws GeneralLeanFtException

      Minimizes this window to an icon.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### move

          void move(java.awt.Point point)
             throws GeneralLeanFtException

      Moves the window to the specified absolute location on the screen.
      Parameters:
        `point` - absolute pixel location (X,Y) on the screen
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### move

          void move(int x,
                    int y)
             throws GeneralLeanFtException

      Moves the window to the specified absolute location on the screen.
      Parameters:
        `x` - the X coordinate in pixels
        `y` - the Y coordinate in pixels
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### resize

          void resize(java.awt.Dimension size)
               throws GeneralLeanFtException

      Resizes this window.
      Parameters:
        `size` - the new size
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### resize

          void resize(int width,
                      int height)
               throws GeneralLeanFtException

      Resizes this window to the specified dimensions.
      Parameters:
        `width` - the new width in pixels
        `height` - the new height in pixels
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### restore

          void restore()
                throws GeneralLeanFtException

      Restores this window to its previous size.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.