Examples of IVisitor


Examples of cbg.editor.jedit.IVisitor

  }
  public static void add(final Rule rule, final Type type, ITokenFactory factory, final List rules) {
    final IToken token = factory.makeToken(type);
    final Mode mode = rule.getMode();
    final boolean ignoreCase = rule.getIgnoreCase();
    type.accept(new IVisitor() {
      public void acceptSpan(Span span) {
        IToken defaultToken = token;
        if(span.hasDelegate()) {
          Rule delegateRule = mode.getRule(span.getDelegate());
          defaultToken = new DelegateToken(type, delegateRule, span.getEnd());
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

          }
        }
        else if (formComponent instanceof CheckGroup)
        {
          final Collection checkGroupValues = (Collection)formComponent.getModelObject();
          formComponent.visitChildren(Check.class, new IVisitor()
          {
            public Object component(Component component)
            {
              if (checkGroupValues.contains(component.getModelObject()))
              {
                addFormComponentValue(formComponent, ((Check)component).getValue());
              }
              return CONTINUE_TRAVERSAL;
            }
          });
        }
        else if (formComponent instanceof RadioGroup)
        {
          // TODO 1.5: see if all these transformations can be factored out into
          // checkgroup/radiogroup by them implementing some sort of interface {
          // getValue(); } otherwise all these implementation details leak into the tester
          final Object value = formComponent.getModelObject();
          if (value != null)
          {
            formComponent.visitChildren(Radio.class, new IVisitor()
            {
              public Object component(Component component)
              {
                if (value.equals(component.getModelObject()))
                {
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

        // edit catalogMode value
        final FormTester form = tester.newFormTester("catalogModeForm");

        form.select("catalogMode", 1);

        form.getForm().visitChildren(RadioChoice.class, new IVisitor() {
            public Object component(final Component component) {
                if (component.getId().equals("catalogMode")) {
                    ((RadioChoice) component).onSelectionChanged();
                }
                return CONTINUE_TRAVERSAL;
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

  {
    final List data = new ArrayList();

    if (page != null)
    {
      page.visitChildren(new IVisitor()
      {
        public Object component(final Component component)
        {
          final ComponentData object = new ComponentData();
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

          }
        }
        else if (formComponent instanceof CheckGroup)
        {
          final Collection checkGroupValues = (Collection) formComponent.getModelObject();
          formComponent.visitChildren(Check.class, new IVisitor()
          {
            public Object component(Component component)
            {
              if (checkGroupValues.contains(component.getModelObject()))
              {
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

      if (component instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)component;

        // collect feedback
        container.visitChildren(IFeedback.class, new IVisitor()
        {
          public Object component(Component component)
          {
            ((IFeedback)component).updateFeedback();
            return IVisitor.CONTINUE_TRAVERSAL;
          }
        });
      }

      if (component instanceof IFeedback)
      {
        ((IFeedback)component).updateFeedback();
      }
    }

    // we need to attach feedback components here because they are not
    // attached in MarkupContainer#attachChildren()
    it = markupIdToComponent.values().iterator();
    while (it.hasNext())
    {
      final Component component = (Component)it.next();

      if (component instanceof IFeedback)
      {
        component.attach();
      }

      if (component instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)component;

        // collect feedback
        container.visitChildren(IFeedback.class, new IVisitor()
        {
          public Object component(Component component)
          {
            component.attach();
            return IVisitor.CONTINUE_TRAVERSAL;
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

        // collect feedback
        if (component instanceof MarkupContainer)
        {
          MarkupContainer container = (MarkupContainer)component;

          container.visitChildren(IFeedback.class, new IVisitor()
          {
            public Object component(Component component)
            {
              ((IFeedback)component).updateFeedback();
              return IVisitor.CONTINUE_TRAVERSAL;
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

          }
        }
        else if (formComponent instanceof CheckGroup)
        {
          final Collection checkGroupValues = (Collection) formComponent.getModelObject();
          formComponent.visitChildren(Check.class, new IVisitor()
          {
            public Object component(Component component)
            {
              if (checkGroupValues.contains(component.getModelObject()))
              {
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

      if (component instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)component;

        // collect feedback
        container.visitChildren(IFeedback.class, new IVisitor()
        {
          public Object component(Component component)
          {
            ((IFeedback)component).updateFeedback();
            return IVisitor.CONTINUE_TRAVERSAL;
          }
        });
      }

      if (component instanceof IFeedback)
      {
        ((IFeedback)component).updateFeedback();
      }
    }

    // we need to attach feedback components here because they are not
    // attached in MarkupContainer#attachChildren()
    it = markupIdToComponent.values().iterator();
    while (it.hasNext())
    {
      final Component component = (Component)it.next();

      if (component instanceof IFeedback)
      {
        component.attach();
      }

      if (component instanceof MarkupContainer)
      {
        MarkupContainer container = (MarkupContainer)component;

        // collect feedback
        container.visitChildren(IFeedback.class, new IVisitor()
        {
          public Object component(Component component)
          {
            component.attach();
            return IVisitor.CONTINUE_TRAVERSAL;
View Full Code Here

Examples of org.apache.wicket.Component.IVisitor

   *
   * @param target
   */
  private void addFeedbackPanels(final AjaxRequestTarget target)
  {
    getComponent().getPage().visitChildren(IFeedback.class, new IVisitor()
    {
      public Object component(Component component)
      {
        target.addComponent(component);
        return IVisitor.CONTINUE_TRAVERSAL;
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.