Examples of ComponentFinder


Examples of org.fest.swing.core.ComponentFinder

   * it has been initialised properly. Normally it is a simple call to the "launch" method of
   * the main window.
   * @return
   */
  public static ComponentFinder initialiseNewThread(final Runnable threadInitiated) {
    ComponentFinder finder = BasicComponentFinder.finderWithNewAwtHierarchy();
        // Lauch the "main" thread
        Thread mainThread = new Thread(new Runnable() {
            public void run() {
                if (!ServiceObjectRegistry.isConfigured()) {
                    ServiceObjectRegistry.setConfigFileName("client-config-local.xml");
View Full Code Here

Examples of org.fest.swing.core.ComponentFinder

   * it has been initialised properly. Normally it is a simple call to the "launch" method of
   * the main window.
   * @return
   */
  public static ComponentFinder initialiseNewThread(final Runnable threadInitiated) {
    ComponentFinder finder = BasicComponentFinder.finderWithNewAwtHierarchy();
        // Lauch the "main" thread
        Thread mainThread = new Thread(new Runnable() {
            public void run() {
                if (!ServiceObjectRegistry.isConfigured()) {
                    ServiceObjectRegistry.setConfigFileName("client-config-local.xml");
View Full Code Here

Examples of org.fest.swing.core.ComponentFinder

  }

  @Test
  public void testInvalidInputDialog()
  {
    final ComponentFinder finder = BasicComponentFinder
        .finderWithCurrentAwtHierarchy();
    JButtonFixture btn = window.button();
    JTextComponentFixture url = window.textBox();
    url.enterText("not a url");
    btn.click();

    window.dialog().requireVisible();

    window.dialog().button().click();

    btn.requireEnabled();
    btn.requireEnabled();

    url.enterText("www.yahoo.com");
    url.pressKey(KeyEvent.VK_ENTER);

    final JFileChooserFixture fc = JFileChooserFinder.findFileChooser()
        .withTimeout(15000).using(window.robot);
    final JButtonFixture fBtn = btn;

    GuiActionRunner.execute(new GuiTask() {
      @Override
      public void executeInEDT()
      {
        fc.target.setSelectedFile(Files.currentFolder());
        fc.target.approveSelection();
        fBtn.requireDisabled();
        fBtn.requireDisabled();
      }
    });

    JPanel panel = (JPanel) finder.findByName("Download Progress");
    Assert.assertTrue(panel.getComponentCount() > 0);
  }
View Full Code Here

Examples of org.uispec4j.finder.ComponentFinder

        };
      }

  private ComponentFinder getFinder() {
    if (finder == null) {
      finder = new ComponentFinder(getNodeView());
    }
    return finder;
  }
View Full Code Here

Examples of org.uispec4j.finder.ComponentFinder

  private Container container;
  private ComponentFinder finder;

  public Panel(Container container) {
    this.container = container;
    this.finder = new ComponentFinder(container);
  }
View Full Code Here

Examples of org.wicketstuff.jwicket.ComponentFinder

          if (sortedComponent instanceof ISortable) {
            ((ISortable)sortedComponent).onReceived(target, newPosition);
          }

          ComponentFinder visitor = new ComponentFinder(otherSortableId);
          component.getPage().visitChildren(visitor);
          Component otherSortable = visitor.getFoundComponent();
          onReceived(target, sortedComponent, newPosition, (Sortable<?>)otherSortable);
        } catch (Exception e) {
          // don't process
        }
      }
View Full Code Here

Examples of org.wicketstuff.jwicket.ComponentFinder

      }
     

      if (eventType == EventType.CHANGE) {
        if (oldContent != null && oldHeader != null) {
          ComponentFinder finder = new ComponentFinder(oldHeader);
          component.getPage().visitChildren(finder);
          Component oldHeaderComponent = finder.getFoundComponent();
          finder = new ComponentFinder(oldContent);
          component.getPage().visitChildren(finder);
          Component oldContentComponent = finder.getFoundComponent();
          onCollapse(target, oldHeaderComponent, oldContentComponent, currentExpandedIndex);
        }

        if (newContent != null && newHeader != null) {
          ComponentFinder finder = new ComponentFinder(newHeader);
          component.getPage().visitChildren(finder);
          Component newHeaderComponent = finder.getFoundComponent();
          finder = new ComponentFinder(newContent);
          component.getPage().visitChildren(finder);
          Component newContentComponent = finder.getFoundComponent();

          if (newHeaderComponent != null && newContentComponent != null)
            onExpand(target, newHeaderComponent, newContentComponent, activeIndex);
          currentExpandedIndex = activeIndex;
        }
View Full Code Here

Examples of org.wicketstuff.jwicket.ComponentFinder

    Request request;

    if (component != null && (request = component.getRequest()) != null) {
      EventType dragEventType = EventType.stringToType(request.getParameter(EventType.IDENTIFIER));

      ComponentFinder visitor = new ComponentFinder(request.getParameter(DROPPED_COMPONENTID_IDENTIFIER));
      component.getPage().visitChildren(visitor);

      if (component instanceof IDroppable) {
        IDroppable draggableComponent = (IDroppable)component;
        if (dragEventType == EventType.DROP)
          draggableComponent.onDrop(target, visitor.getFoundComponent(), new SpecialKeys(request));
        else if (dragEventType == EventType.DROP_ACTIVATE)
          draggableComponent.onActivate(target, visitor.getFoundComponent(), new SpecialKeys(request));
        else if (dragEventType == EventType.DROP_DEACTIVATE)
          draggableComponent.onDeactivate(target, visitor.getFoundComponent(), new SpecialKeys(request));
      }


      if (dragEventType == EventType.DROP)
        onDrop(target, visitor.getFoundComponent(), new SpecialKeys(request));
      else if (dragEventType == EventType.DROP_ACTIVATE)
        onActivate(target, visitor.getFoundComponent(), new SpecialKeys(request));
      else if (dragEventType == EventType.DROP_DEACTIVATE)
        onDeactivate(target, visitor.getFoundComponent(), new SpecialKeys(request));
    }
  }
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.