Examples of TabView


Examples of collide.demo.view.TabPanel.TabView

      }
    }
  }

  private boolean selectById(String id) {
    TabView panel = panels.get(id);
    if (panel == null) {
      X_Log.warn(getClass(), "Tried to select panel with id",id,"but no panel with that id is attached");
      return false;
    } else {
      select(panel);
View Full Code Here

Examples of collide.demo.view.TabPanel.TabView

    if (view instanceof HasText) {
      title = ((HasText)view).getText();
    } else {
      title = view.getId();
    }
    TabView existing = panels.get(view.getId());
    if (existing == null) {
      existing = createPanel(view, title);
      panels.put(view.getId(), existing);
    }
    if (selected == null) {
      select(existing);
    }
    existing.setContent(view, title);
    getContentElement().removeClassName(css.hidden());
    return existing;
  }
View Full Code Here

Examples of collide.demo.view.TabPanel.TabView

    getContentElement().removeClassName(css.hidden());
    return existing;
  }
 
  protected <V extends com.google.collide.mvp.View<?> & HasId> TabView createPanel(V view, String title) {
    return new TabView(view.getId());
  }
View Full Code Here

Examples of org.primefaces.component.tabview.TabView

   * Speichert den <b>activeTab</b> in einer Eigenschaft.
   * @param event Hinweis auf den Parent und somit auf den activeIndex.
   */
  public void onTabChange(TabChangeEvent event) {
        Tab activeTab = event.getTab();
        TabView parent=(TabView)activeTab.getParent();
        activeIndex=parent.getActiveIndex();
  }
View Full Code Here

Examples of org.primefaces.component.tabview.TabView

  @Test
  public void testOnTabChange() {
    final int ACTIVE_INDEX = 5;
    TabChangeEvent event = mock(TabChangeEvent.class);
    Tab tab = mock(Tab.class);
    TabView parent = mock(TabView.class);
    when(event.getTab()).thenReturn(tab);
    when(tab.getParent()).thenReturn(parent);
    when(parent.getActiveIndex()).thenReturn(ACTIVE_INDEX);

    proband.onTabChange(event); // Test

    assertEquals(ACTIVE_INDEX, proband.getActiveIndex());
  }
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.tabview.TabView

    final Console console = Y.newConsole(ConsoleConfig.create() );
    console.render();
   
    final HistoryBase history = Y.newHistoryHash();
   
    final TabView tb = Y.newTabView(TabViewConfig.create(new TabConfig[]{
      TabConfig.create().label("tab1").content("<p>11111111111 foo content</p>"),
      TabConfig.create().label("tab2").content("<p>2222222222222222<b>Hello</b>foo <i>content</i></p>"),
      TabConfig.create().label("tab3").content("<p>3333333333333<b>ben parker</b>foo <i>holla dooba do</i></p>"),
    }));
    tb.render(parent);
   
    tb.after("selectionChange", new EventCallback<TabViewEvent>() {

      @Override
      public void call(TabViewEvent e) {
       
        /* note e.newVal is the selected child widget - we cast directly.
         * @see http://yuilibrary.com/yui/docs/api/classes/WidgetParent.html#attr_selection
         */
        Widget selChild = e.newValObj().cast();
       
        int newTabIndex = selChild.getInt("index");
       
        console.log("tabview selectionChange: "+newTabIndex);
       
        history.addValue("tab", newTabIndex==0 ? null : newTabIndex+"");
      }
    });    
   
    tb.selectChild(parseInt(history.get("tab"), 0));
    Y.on("history:change", new EventCallback<HistoryEvent>() {
      @Override
      public void call(HistoryEvent e) {
        // Ignore changes we make ourselves, since we don't need
          // to update the selection state for those. We're only
          // interested in outside changes, such as the ones generated
          // when the user clicks the browser's back or forward buttons.
        if(e.src().equals(Y.HistoryHash().SRC_HASH())) {
          if(e.changed().objGetObj("tab")!=null) {
            //e.changed.tab.newVal is a string containing the tab index
            int i = parseInt(e.changed().objGetObj("tab").objGetString("newVal"), 0);         
            tb.selectChild(i);
          }
          else if(e.removed().objGetString("tab")!=null) {
            // The tab selection was removed in the new state, so
              // select the first tab by default.
            tb.selectChild(0);
          }
          else {
          }
        }
      }
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.tabview.TabView

        Test test = util.getTestByName(inputEl.get("value"));
        setCurrentTest(test);
      }
    });

    TabView tb = Y.newTabView(TabViewConfig.create(new TabConfig[] {
        // TabConfig.create().label("Categories TreeView").content("<div id=\"testcategoriesTreeView\"></div>"),
        TabConfig.create().label("Categories Accordion").content("<div id=\"testcategories\"></div>"),
        TabConfig.create().label("all").content("<div id=\"testall\"></div>") }));
    tb.render(getNavContent());

    getNavContent().setStyles(Style.create().overflow("scroll"));

    drawAccordionTest(Y, Y.one("#testcategories"));
    drawAllTest(Y, Y.one("#testall"));

    tb.selectChild(0);

  }
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.tabview.TabView

    for (int i = 0; i < tabConfig.length; i++) {
      String header = headerContent.get(i); // [i];
      String body = bodyContent.get(i); // [i];
      tabConfig[i] = TabConfig.create().label(header).content(body);
    }
    final TabView tb = Y.newTabView(TabViewConfig.create(tabConfig));
    tb.render(tbEl);

    // now render the panel
    PanelConfig panelConfig = (PanelConfig) PanelConfig.create().centered(true).srcNode(panelEl).width("80%").height("450px");
    panelConfig.headerContent("Example Sources");
    panelConfig.bodyContent(tbEl);
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.tabview.TabView

    for (int i = 0; i < tabConfig.length; i++) {
      String header = headers.get(i); // [i];
      String body = bodies.get(i); // [i];
      tabConfig[i] = TabConfig.create().label(header).content(body);
    }
    final TabView tb = y.newTabView(TabViewConfig.create(tabConfig));
    tb.render(parent);
    UIBinderUserGuide.prettyPrint();
  }
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.tabview.TabView

  @Override
  public void ready(final YuiContext Y) {
   
    parent.append("<p id=\"sometabcontent\">I will be a tab content some day</p>");
   
    final TabView tb = Y.newTabView(TabViewConfig.create(new TabConfig[]{
      TabConfig.create().label("foo").content("<p>foo content</p>"),
      TabConfig.create().label("bar").content("<p><b>Hello</b>foo <i>content</i></p>"),
      TabConfig.create().label("ben").content("<p><b>ben parker</b>foo <i>holla dooba do</i></p>"),
      TabConfig.create().label("from markup").content(Y.one("#sometabcontent")),
    }));
   
    tb.render(parent);
   
    tb.selectChild(1);
   
//    Y.newButton(ButtonConfig.create().label("add new tab").render(parent).
//      on("click", new EventCallback<ButtonEvent>() {       
//        @Override
//        public void call(ButtonEvent e) {
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.