Package org.apache.ecs.html

Examples of org.apache.ecs.html.P.addElement()


    private String getPager(int currentPage, int pages, LabelResource labels) {
        P pager = new P().setAlign(AlignType.CENTER);

        if(currentPage > 0){
            pager
              .addElement(new A("TransferLog?" + PAGE + "=" + (0), "<< " + labels.getLabel("first")))
            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (currentPage - 1), "< " + labels.getLabel("previous")))
            .addElement("&nbsp;");
        }else{
View Full Code Here


              .addElement(new A("TransferLog?" + PAGE + "=" + (0), "<< " + labels.getLabel("first")))
            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (currentPage - 1), "< " + labels.getLabel("previous")))
            .addElement("&nbsp;");
        }else{
            pager
              .addElement("<< " + labels.getLabel("first"))
            .addElement("&nbsp;")
              .addElement("< " + labels.getLabel("previous"))
            .addElement("&nbsp;");
        }
View Full Code Here

            .addElement("&nbsp;");
        }

        for(int i = 0; i < pages; i++) {
            if(i == currentPage)
                pager.addElement(new B(String.valueOf(i + 1)));
            else if(Math.abs(i - currentPage) <= PAGER_DIRECT_LINKS)
                pager.addElement(new A("TransferLog?" + PAGE + "=" + i, String.valueOf(i + 1)));
            if(currentPage - i <= PAGER_DIRECT_LINKS && currentPage - i > -(PAGER_DIRECT_LINKS) && i != pages - 1)
                pager.addElement(" | ");
        }
View Full Code Here

        for(int i = 0; i < pages; i++) {
            if(i == currentPage)
                pager.addElement(new B(String.valueOf(i + 1)));
            else if(Math.abs(i - currentPage) <= PAGER_DIRECT_LINKS)
                pager.addElement(new A("TransferLog?" + PAGE + "=" + i, String.valueOf(i + 1)));
            if(currentPage - i <= PAGER_DIRECT_LINKS && currentPage - i > -(PAGER_DIRECT_LINKS) && i != pages - 1)
                pager.addElement(" | ");
        }

        if(currentPage < pages - 1){
View Full Code Here

            if(i == currentPage)
                pager.addElement(new B(String.valueOf(i + 1)));
            else if(Math.abs(i - currentPage) <= PAGER_DIRECT_LINKS)
                pager.addElement(new A("TransferLog?" + PAGE + "=" + i, String.valueOf(i + 1)));
            if(currentPage - i <= PAGER_DIRECT_LINKS && currentPage - i > -(PAGER_DIRECT_LINKS) && i != pages - 1)
                pager.addElement(" | ");
        }

        if(currentPage < pages - 1){
          pager
            .addElement("&nbsp;")
View Full Code Here

            if(currentPage - i <= PAGER_DIRECT_LINKS && currentPage - i > -(PAGER_DIRECT_LINKS) && i != pages - 1)
                pager.addElement(" | ");
        }

        if(currentPage < pages - 1){
          pager
            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (currentPage + 1), labels.getLabel("next") + " >"))
            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (pages-1), labels.getLabel("last") + " >>"));
        }else{
View Full Code Here

            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (currentPage + 1), labels.getLabel("next") + " >"))
            .addElement("&nbsp;")
              .addElement(new A("TransferLog?" + PAGE + "=" + (pages-1), labels.getLabel("last") + " >>"));
        }else{
          pager
            .addElement("&nbsp;")
              .addElement(labels.getLabel("next") + " >")
            .addElement("&nbsp;")
              .addElement(labels.getLabel("last") + " >>");
      }
View Full Code Here

              .addElement(labels.getLabel("next") + " >")
            .addElement("&nbsp;")
              .addElement(labels.getLabel("last") + " >>");
      }
       
        pager.addElement("</p>");

        return pager.toString();
    }
} // SyncroTransferLog
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.