Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface Calendar

- All Superinterfaces:
    Element, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber, WaitUntilEnabledProvider, EnabledProvider

      public interface Calendar
      extends Element

  A calendar control in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAttachedText()` Returns the static text attached to the calendar.
    `java.util.Date` | `getDate()` Returns the date selected in this calendar.
    `DateRange` | `getDateRange()` Returns the range of dates selected in this calendar.
    `boolean` | `isEnabled()` Indicates whether the calendar can accept user input.
    `void` | `setDate(java.util.Date date)` Sets the date of the calendar.
    `void` | `setDateRange(java.util.Date firstDate, java.util.Date lastDate)` Selects a date range in the calendar.
    `void` | `setDateRange(DateRange dateRange)` Selects the provided date range in the calendar.

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.Element

      `getId, getName, getType`

    - ### 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.LocationInfoProvider

      `getAbsoluteLocation, getLocation, getSize`

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

      `getNativeObject`

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### getAttachedText

          java.lang.String getAttachedText()
                                    throws GeneralLeanFtException

      Returns the static text attached to the calendar.
      Returns:
        the static text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether the calendar can accept user input.
      Returns:
        true if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getDateRange

                                                      DateRange getDateRange()
                          throws GeneralLeanFtException

      Returns the range of dates selected in this calendar. If a single date is selected, both DateRange.StartDate and DateRange.EndDate are the selected date.
      Returns:
        the selected range of dates.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getDate

          java.util.Date getDate()
                          throws GeneralLeanFtException

      Returns the date selected in this calendar. If a date range is selected, the Date property is the start date of the range.
      Returns:
        the date.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setDate

          void setDate(java.util.Date date)
                throws GeneralLeanFtException

      Sets the date of the calendar.
      Parameters:
        `date` - the date to set.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setDateRange

          void setDateRange(java.util.Date firstDate,
                            java.util.Date lastDate)
                     throws GeneralLeanFtException

      Selects a date range in the calendar. The actual date range can be one full week or one full month.
      Parameters:
        `firstDate` - the start date.
        `lastDate` - the end date.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setDateRange

          void setDateRange(DateRange dateRange)
                     throws GeneralLeanFtException

      Selects the provided date range in the calendar. The actual date range can be one full week or one full month.
      Parameters:
        `dateRange` - the date range.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.