Examples of LocationUnavailableException


Examples of org.fest.swing.exception.LocationUnavailableException

    if (index >= 0) {
      return index;
    }
    String format = "Unable to find a tab with title matching %s %s";
    String msg = String.format(format, matcher.description(), matcher.formattedValues());
    throw new LocationUnavailableException(msg);
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

    checkIndexInBounds(tabbedPane, index);
    Rectangle rect = tabbedPane.getUI().getTabBounds(tabbedPane, index);
    // From Abbot: TODO figure out the effects of tab layout policy sometimes tabs are not directly visible
    if (rect == null || rect.x < 0) {
      String msg = String.format("The tab %d is not visible", index);
      throw new LocationUnavailableException(msg);
    }
    return new Point(rect.x + rect.width / 2, rect.y + rect.height / 2);
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

    }
    return new TreePath(newPathValues.toArray());
  }

  private LocationUnavailableException pathNotFound(String path) {
    throw new LocationUnavailableException(concat("Unable to find path ", quote(path)));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

    }
    return result.toArray(new String[result.size()]);
  }

  private LocationUnavailableException multipleMatchingNodes(String matchingText, Object parentText) {
    throw new LocationUnavailableException(
        concat("There is more than one node with value ", quote(matchingText), " under ", quote(parentText)));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

   */
  @RunsInCurrentThread
  public Pair<Rectangle, Point> rowBoundsAndCoordinates(JTree tree, int row) {
    Rectangle rowBounds = tree.getRowBounds(validIndex(tree, row));
    if (rowBounds != null) return new Pair<Rectangle, Point>(rowBounds, pointAt(rowBounds));
    throw new LocationUnavailableException(concat("The tree row ", row, " is not visible"));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

   */
  @RunsInCurrentThread
  public TreePath pathFor(JTree tree, int row) {
    TreePath path = tree.getPathForRow(validIndex(tree, row));
    if (path != null) return path;
    throw new LocationUnavailableException(concat("Unable to find tree path for row [", valueOf(row), "]"));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

   */
  @RunsInCurrentThread
  public Pair<Rectangle, Point> pathBoundsAndCoordinates(JTree tree, TreePath path) {
    Rectangle pathBounds = tree.getPathBounds(path);
    if (pathBounds != null) return new Pair<Rectangle, Point>(pathBounds, pointAt(pathBounds));
    throw new LocationUnavailableException(concat("The tree path ", format(path.getPath()), " is not visible"));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

   */
  @RunsInCurrentThread
  public Pair<Integer, Point> pointAt(JTableHeader tableHeader, TextMatcher matcher) {
    int index = indexOf(tableHeader, matcher);
    if (isValidIndex(tableHeader, index)) return new Pair<Integer, Point>(index, point(tableHeader, index));
    throw new LocationUnavailableException(
        concat("Unable to find column with name matching ", matcher.description(), " ", matcher.formattedValues()));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

      }
    });
  }

  private LocationUnavailableException failMatchingNotFound(JList list, TextMatcher matcher) {
    throw new LocationUnavailableException(concat(
        "Unable to find item matching the ", matcher.description(), " ", matcher.formattedValues(),
        " among the JList contents ", format(contents(list, cellReader))));
  }
View Full Code Here

Examples of org.fest.swing.exception.LocationUnavailableException

   */
  @RunsInCurrentThread
  public int indexOf(final JTabbedPane tabbedPane, final TextMatcher matcher) {
    int index = indexOfTab(tabbedPane, matcher);
    if (index >= 0) return index;
    throw new LocationUnavailableException(concat(
        "Unable to find a tab with title matching ", matcher.description(), " ", matcher.formattedValues()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.