Examples of ObjectResult


Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

    final Method method = object.getClass().getMethod(methodName, new Class[0]);
    Widget widget = null;
    final Object result;
    if (object instanceof Widget) {
      widget = (Widget) object;
      result = UIThreadRunnable.syncExec(widget.getDisplay(), new ObjectResult() {
        public Object run() {
          try {
            return method.invoke(object, new Object[0]);
          } catch (Exception niceTry) {
          }
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the selection in the tree
   */
  public TableCollection selection() {
    final int columnCount = columnCount();

    return (TableCollection) syncExec(new ObjectResult() {
      public Object run() {
        final TableCollection selection = new TableCollection();
        TreeItem[] items = getControl().getSelection();
        for (int i = 0; i < items.length; i++) {
          TreeItem item = items[i];
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the tree item that was expanded.
   * @throws WidgetNotFoundException if the node is not found.
   */
  public SWTBotTreeItem expandNode(final String nodeText, final boolean recursive) throws WidgetNotFoundException {
    checkEnabled();
    return (SWTBotTreeItem) syncExec(new ObjectResult() {
      public Object run() {
        SWTBotTreeItem item;
        try {
          item = getTreeItem(nodeText);
          expandNode(item);
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   *
   * @return the list of all tree items in the tree, or an empty list if there are none.
   * @since 1.0
   */
  public SWTBotTreeItem[] getAllItems() {
    return (SWTBotTreeItem[]) syncExec(new ObjectResult() {
      public Object run() {
        TreeItem[] items = getControl().getItems();
        SWTBotTreeItem[] result = new SWTBotTreeItem[items.length];

        for (int i = 0; i < items.length; i++)
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the foreground color on the widget, or <code>null</code> if the widget is not an instance of
   *         {@link Control}.
   * @since 1.0
   */
  public Color foregroundColor() {
    return (Color) syncExec(new ObjectResult() {
      public Object run() {
        if (widget instanceof Control)
          return ((Control) widget).getForeground();
        return null;
      }
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the background color on the widget, or <code>null</code> if the widget is not an instance of
   *         {@link Control}.
   * @since 1.0
   */
  public Color backgroundColor() {
    return (Color) syncExec(new ObjectResult() {
      public Object run() {
        if (widget instanceof Control)
          return ((Control) widget).getBackground();
        return null;
      }
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the foreground color on the widget, or <code>null</code> if the widget is not an instance of
   *         {@link Control}.
   * @since 1.0
   */
  public Color foregroundColor() {
    return (Color) syncExec(new ObjectResult() {
      public Object run() {
        if (widget instanceof Control)
          return ((Control) widget).getForeground();
        return null;
      }
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * @return the background color on the widget, or <code>null</code> if the widget is not an instance of
   *         {@link Control}.
   * @since 1.0
   */
  public Color backgroundColor() {
    return (Color) syncExec(new ObjectResult() {
      public Object run() {
        if (widget instanceof Control)
          return ((Control) widget).getBackground();
        return null;
      }
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   *
   * @return the selection in the table
   */
  public TableCollection selection() {
    final int columnCount = columnCount();
    return (TableCollection) syncExec(new ObjectResult() {
      public Object run() {
        final TableCollection selection = new TableCollection();
        TableItem[] items = getControl().getSelection();
        for (int i = 0; i < items.length; i++) {
          TableItem item = items[i];
View Full Code Here

Examples of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

   * Gets the arrray of selected items.
   *
   * @return the selected items in the list.
   */
  public String[] selection() {
    return (String[]) syncExec(new ObjectResult() {
      public Object run() {
        return getList().getSelection();
      }
    });
  }
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.