Examples of Accordion


Examples of org.sgx.yuigwt.yuigallery.accordion.Accordion

      }));
    }
  }

  private void drawAccordionTest(YuiGalleryContext Y, Node parent) {
    Accordion acc1 = Y.newAccordion(AccordionConfig.create().useAnimation(true).reorderItems(true));
    acc1.render(parent);

    Map<String, Set<Test>> testByTag = util.getTestsByTag();

    for (int i = 0; i < GalleryConstants.ALL_TAGS.length; i++) {
      String tag = GalleryConstants.ALL_TAGS[i];
      Set<Test> tests = testByTag.get(tag);
      if (tests == null)
        continue;
      AccordionItem item1 = Y.newAccordionItem(AccordionItemConfig.create().label(tag).contentHeight("fixed", 80));
      String parentId = "parent-" + tag;
      item1.set("bodyContent", "<div class=\"parent-tag\" id=\"" + parentId + "\"></div>");

      acc1.addItem(item1);

      Node testParent = Y.one("#" + parentId);
      for (final Test test : tests) {
        Y.newButton(Button.config().label(test.getName()).render(testParent).on("click", new EventCallback() {
          @Override
View Full Code Here

Examples of org.sgx.yuigwt.yuigallery.accordion.Accordion

      public void ready(YuiContext Y_) {

        // cast to YuiGalleryContext for using the yui gallery java api.
        final YuiGalleryContext Y = Y_.cast();

        Accordion acc1 = Y.newAccordion(AccordionConfig.create().useAnimation(true).reorderItems(true));
        acc1.render(parent);

        AccordionItem item1 = Y.newAccordionItem(AccordionItemConfig.create().label("Item1, added from script").contentHeight("fixed", 80));

        item1.set("bodyContent", "This is the body of the item, added dynamically to accordion.<br>Content height has been set as \"fixed, 80px\".");

        acc1.addItem(item1);

        AccordionItem item2 = Y.newAccordionItem(AccordionItemConfig.create().label("Item2, added from script").expanded(true).contentHeight("stretch").id("dinnode2"));

        item2.set("bodyContent", "This is the body of the item, added dynamically to accordion, before item1.<br>Content height has been set as \"stretch\".");

        acc1.addItem(item2);

        AccordionItem item3 = Y.newAccordionItem(AccordionItemConfig.create().label("Item2, added from script").expanded(true).alwaysVisible(true).contentHeight("auto")
            .id("dinnode3"));

        item3.set("bodyContent",
            "<div style='position:relative;'>This is the body of the item, added dynamically to accordion.<br>Content height has been set as \"auto\".</div>");

        acc1.addItem(item3);
      }
    });
  }
View Full Code Here

Examples of pivot.wtk.Accordion

  }

  public void install(Component component) {
        super.install(component);

        Accordion accordion = (Accordion)component;

        // Add this as a listener on the accordion
        accordion.getAccordionListeners().add(this);
        accordion.getAccordionSelectionListeners().add(this);
        accordion.getAccordionAttributeListeners().add(this);

        // Add header buttons for all existing panels
        for (Component panel : accordion.getPanels()) {
            PanelHeader panelHeader = new PanelHeader(new ButtonData(Accordion.getIcon(panel),
                Accordion.getName(panel)));
            panelHeader.setGroup(panelHeaderGroup);
            accordion.add(panelHeader);
            panelHeaders.add(panelHeader);
        }

        selectedIndexChanged(accordion, -1);
    }
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.