Esempio n. 1
0
  /** Moves the divider all the way to the right/bottom. */
  public void moveToMaximum() {
    output.printTrace("Scroll JSplitPane to maximum. JSplitPane :    \n" + toStringSource());
    output.printGolden("Scroll JSplitPane to maximum.");
    produceTimeRestricted(
        new Action<Void, Void>() {
          @Override
          public Void launch(Void obj) {
            driver.scrollToMaximum(JSplitPaneOperator.this, getOrientation());
            return null;
          }

          @Override
          public String getDescription() {
            return "Scrolling";
          }

          @Override
          public String toString() {
            return "JSplitPaneOperator.moveToMaximum.Action{description = "
                + getDescription()
                + '}';
          }
        },
        "JSplitPaneOperator.WholeScrollTimeout");
  }
Esempio n. 2
0
 /**
  * Changes divider location.
  *
  * @param dividerLocation location to move divider to.
  */
 public void moveDivider(int dividerLocation) {
   output.printTrace(
       "Move JSplitPane divider to "
           + Integer.toString(dividerLocation)
           + " location. JSplitPane :    \n"
           + toStringSource());
   output.printGolden(
       "Move JSplitPane divider to " + Integer.toString(dividerLocation) + " location");
   scrollTo(new ValueScrollAdjuster(dividerLocation));
 }
Esempio n. 3
0
 /**
  * Pushes one time left(top) expand button.
  *
  * @throws TimeoutExpiredException
  */
 public void expandLeft() {
   String mess = "Expand ";
   if (getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
     mess = mess + "left";
   } else {
     mess = mess + "top";
   }
   output.printTrace(mess + " JSplitPane side. JSplitPane :    \n" + toStringSource());
   output.printGolden(mess + " JSplitPane side.");
   expandTo(1);
 }
Esempio n. 4
0
  /**
   * Selects combobox item. If verification mode is on, checks that right item has been selected.
   *
   * @param index Item index.
   * @throws TimeoutExpiredException
   */
  public void selectItem(int index) {
    output.printLine(
        "Select " + Integer.toString(index) + "\'th item in combobox\n    : " + toStringSource());
    output.printGolden("Select " + Integer.toString(index) + "\'th item in combobox");
    try {
      waitComponentEnabled();
    } catch (InterruptedException e) {
      throw new JemmyException("Interrupted", e);
    }

    driver.selectItem(this, waitItem(index));

    if (getVerification()) {
      waitItemSelected(index);
    }
  }
Esempio n. 5
0
 /**
  * Changes divider location.
  *
  * @param proportionalLocation Proportional location. Should be great then 0 and less then 1.
  */
 public void moveDivider(double proportionalLocation) {
   output.printTrace(
       "Move JSplitPane divider to "
           + Double.toString(proportionalLocation)
           + " proportional location. JSplitPane :    \n"
           + toStringSource());
   output.printGolden(
       "Move JSplitPane divider to "
           + Double.toString(proportionalLocation)
           + " proportional location");
   scrollTo(
       new ValueScrollAdjuster(
           getMinimumDividerLocation()
               + (int)
                   (proportionalLocation
                       * (getMaximumDividerLocation() - getMinimumDividerLocation()))));
 }
Esempio n. 6
0
 /**
  * Selects an item by text.
  *
  * @param item a text pattern.
  * @param comparator a searching criteria.
  */
 public void selectItem(String item, StringComparator comparator) {
   output.printLine("Select \"" + item + "\" item in combobox\n    : " + toStringSource());
   output.printGolden("Select \"" + item + "\" item in combobox");
   selectItem(waitItem(item, comparator));
 }