Package org.zkoss.zul

Examples of org.zkoss.zul.Listheader


  public final class OnSortEventListener implements EventListener, Serializable {
    private static final long serialVersionUID = 1L;

    @Override
    public void onEvent(Event event) throws Exception {
      final Listheader lh = (Listheader) event.getTarget();
      final String sortDirection = lh.getSortDirection();

      if ("ascending".equals(sortDirection)) {
        final Comparator<?> cmpr = lh.getSortDescending();
        if (cmpr instanceof FieldComparator) {
          String orderBy = ((FieldComparator) cmpr).getOrderBy();
          orderBy = StringUtils.substringBefore(orderBy, "DESC").trim();

          // update SearchObject with orderBy
          getSearchObject().clearSorts();
          getSearchObject().addSort(orderBy, true);
        }
      } else if ("descending".equals(sortDirection) || "natural".equals(sortDirection) || Strings.isBlank(sortDirection)) {
        final Comparator<?> cmpr = lh.getSortAscending();
        if (cmpr instanceof FieldComparator) {
          String orderBy = ((FieldComparator) cmpr).getOrderBy();
          orderBy = StringUtils.substringBefore(orderBy, "ASC").trim();

          // update SearchObject with orderBy
View Full Code Here


    this.listbox.setParent(divCenter2);
    this.listbox.setItemRenderer(new SearchBoxItemRenderer());

    Listhead listhead = new Listhead();
    listhead.setParent(this.listbox);
    Listheader listheader = new Listheader();
    listheader.setSclass("FDListBoxHeader1");
    listheader.setParent(listhead);
    listheader.setLabel(this._listHeader1);

    South south2 = new South();
    south2.setBorder("none");
    south2.setHeight("26px");
    south2.setParent(bl2);
View Full Code Here

    this.lbTotalCount.setParent(center);

    final Listhead listhead = new Listhead();
    listhead.setSizable(true);
    listhead.setParent(this.lbTotalCount);
    final Listheader lh1 = new Listheader();
    lh1.setSclass("FDListBoxHeader1");
    lh1.setWidth("10%");
    lh1.setSortAscending(new FieldComparator("country", true));
    lh1.setSortDescending(new FieldComparator("country", false));
    lh1.setParent(listhead);
    final Listheader lh2 = new Listheader(Labels.getLabel("listheader_SecLoginlogList_CountryCode2.label"));
    lh2.setSclass("FDListBoxHeader1");
    lh2.setWidth("60%");
    lh2.setSortAscending(new FieldComparator("countryName", true));
    lh2.setSortDescending(new FieldComparator("countryName", false));
    lh2.setParent(listhead);
    final Listheader lh3 = new Listheader(Labels.getLabel("ListheaderStatisticTotalCountByCountries.TotalCount.Label"));
    lh3.setSclass("FDListBoxHeader1");
    lh3.setWidth("30%");
    lh3.setSortAscending(new FieldComparator("totalCount", true));
    lh3.setSortDescending(new FieldComparator("totalCount", false));
    lh3.setSortDirection("descending");
    lh3.setParent(listhead);

    final Listfoot listfoot = new Listfoot();
    listfoot.setHeight("20px");
    listfoot.setParent(this.lbTotalCount);
View Full Code Here

    this.lbMonthlyCount.setParent(center);

    final Listhead listhead = new Listhead();
    listhead.setSizable(true);
    listhead.setParent(this.lbMonthlyCount);
    final Listheader lh1 = new Listheader();
    lh1.setSclass("FDListBoxHeader1");
    lh1.setWidth("10%");
    lh1.setSortAscending(new FieldComparator("country", true));
    lh1.setSortDescending(new FieldComparator("country", false));
    lh1.setParent(listhead);
    final Listheader lh2 = new Listheader(Labels.getLabel("listheader_SecLoginlogList_CountryCode2.label"));
    lh2.setSclass("FDListBoxHeader1");
    lh2.setWidth("60%");
    lh2.setSortAscending(new FieldComparator("countryName", true));
    lh2.setSortDescending(new FieldComparator("countryName", false));
    lh2.setParent(listhead);
    final Listheader lh3 = new Listheader(Labels.getLabel("ListheaderStatisticTotalCountByCountries.TotalCount.Label"));
    lh3.setSclass("FDListBoxHeader1");
    lh3.setWidth("30%");
    lh3.setSortAscending(new FieldComparator("totalCount", true));
    lh3.setSortDescending(new FieldComparator("totalCount", false));
    lh3.setSortDirection("descending");
    lh3.setParent(listhead);

    final Listfoot listfoot = new Listfoot();
    listfoot.setHeight("20px");
    listfoot.setParent(this.lbMonthlyCount);
View Full Code Here

    this.lbDailyCount.setParent(center);

    final Listhead listhead = new Listhead();
    listhead.setSizable(true);
    listhead.setParent(this.lbDailyCount);
    final Listheader lh1 = new Listheader();
    lh1.setSclass("FDListBoxHeader1");
    lh1.setWidth("10%");
    lh1.setSortAscending(new FieldComparator("country", true));
    lh1.setSortDescending(new FieldComparator("country", false));
    lh1.setParent(listhead);
    final Listheader lh2 = new Listheader(Labels.getLabel("listheader_SecLoginlogList_CountryCode2.label"));
    lh2.setSclass("FDListBoxHeader1");
    lh2.setWidth("60%");
    lh2.setSortAscending(new FieldComparator("countryName", true));
    lh2.setSortDescending(new FieldComparator("countryName", false));
    lh2.setParent(listhead);
    final Listheader lh3 = new Listheader(Labels.getLabel("ListheaderStatisticTotalCountByCountries.TotalCount.Label"));
    lh3.setSclass("FDListBoxHeader1");
    lh3.setWidth("30%");
    lh3.setSortAscending(new FieldComparator("totalCount", true));
    lh3.setSortDescending(new FieldComparator("totalCount", false));
    lh3.setSortDirection("descending");
    lh3.setParent(listhead);

    final Listfoot listfoot = new Listfoot();
    listfoot.setHeight("20px");
    listfoot.setParent(this.lbDailyCount);
View Full Code Here

  }

  private void initFileListbox() {
    //TODO: move this to become a component, re-use in here and fileListOpen.zul
    Listhead listhead = new Listhead();
    Listheader filenameHeader = new Listheader("File");
    filenameHeader.setHflex("2");
    filenameHeader.setParent(listhead);
   
    Listheader dateHeader = new Listheader("Date");
    dateHeader.setHflex("1");
    dateHeader.setParent(listhead);
    filesListbox.appendChild(listhead);
   
    filesListbox.setItemRenderer(new ListitemRenderer() {
     
      public void render(Listitem item, Object obj) throws Exception {
View Full Code Here

   */
  private void initFileListbox() {

    //TODO: move this to become a component, re-use in here and fileListOpen.zul
    Listhead listhead = new Listhead();
    Listheader filenameHeader = new Listheader("File");
    filenameHeader.setHflex("2");
    filenameHeader.setParent(listhead);
   
    Listheader dateHeader = new Listheader("Date");
    dateHeader.setHflex("1");
    dateHeader.setParent(listhead);
    allFilesListbox.appendChild(listhead);
   
    allFilesListbox.setItemRenderer(new ListitemRenderer() {
     
      public void render(Listitem item, Object obj) throws Exception {
View Full Code Here

    @SuppressWarnings("unchecked")
    public void addHeaders() {
        clearHeaderIfNecessary();
        final String[] headers = multipleFiltersFinder.getHeaders();
        for (int i = 0; i < headers.length; i++) {
            listhead.getChildren().add(new Listheader(_(headers[i])));
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public void addHeaders() {
        clearHeaderIfNecessary();
        final String[] headers = finder.getHeaders();
        for (int i = 0; i < headers.length; i++) {
            listhead.getChildren().add(new Listheader(_(headers[i])));
        }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listheader

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.