Package org.moxie

Examples of org.moxie.DocElement


    for (DocElement element : elements) {
      if (element instanceof DocMenu) {
        DocMenu menu = (DocMenu) element;

        for (int i = 0, maxIndex = menu.elements.size() - 1; i <= maxIndex; i++) {
          DocElement subElement = menu.elements.get(i);
          if (subElement instanceof DocPage) {
            prepareTemplatePage((DocPage) subElement);

            if (menu.showPager) {
              // link to previous page
              DocPage page = (DocPage) subElement;
              DocElement prev = i == 0 ? null : menu.elements.get(i - 1);
              if (prev != null && prev instanceof DocPage) {
                page.prevPage = (DocPage) prev;
              }

              // link to next page
              DocElement next = i == maxIndex ? null : menu.elements.get(i + 1);
              if (next != null && next instanceof DocPage) {
                page.nextPage = (DocPage) next;
              }

              // show pager is dependent on having at least a prev or next
View Full Code Here

TOP

Related Classes of org.moxie.DocElement

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.