Package net.sf.swtbot.finder.UIThreadRunnable

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


   *
   * @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

   * @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

   * @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

   * @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

   * @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

   *
   * @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

   * 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

   * Gets the date of this widget.
   *
   * @return the date/time set into the widget.
   */
  public Date getDate() {
    return (Date) syncExec(new ObjectResult() {
      public Object run() {
        int year = getControl().getYear();
        int month = getControl().getMonth();
        int day = getControl().getDay();

View Full Code Here

   * @param nodeText the text on the node.
   * @return the node with the specified text <code>null</code> if not match exists.
   * @since 1.2
   */
  public SWTBotTreeItem getNode(final String nodeText) {
    return (SWTBotTreeItem) syncExec(new ObjectResult() {
      public Object run() {
        try {
          TreeItem[] items = getTreeItem().getItems();
          for (int i = 0; i < items.length; i++) {
            TreeItem treeItem = items[i];
View Full Code Here

TOP

Related Classes of net.sf.swtbot.finder.UIThreadRunnable.ObjectResult

Copyright © 2018 www.massapicom. 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.