Package org.zkoss.zul

Examples of org.zkoss.zul.RowRenderer


    }
  }
 
  public static class GridRendererFactory {
    public static RowRenderer getBeanRowRenderer() {
      return new RowRenderer() {
        public void render(Row row, Object data) throws Exception {
          SampleBean b = (SampleBean) data;
          row.appendChild(new Label(b.getName()));
          row.appendChild(new Label(b.getNumber()+""));
          row.appendChild(new Label(df.format(b.getDate())));
View Full Code Here


          row.appendChild(new Label(df.format(b.getDate())));
        }
      };
    }
    public static RowRenderer getArrayRowRenderer() {
      return new RowRenderer() {
        public void render(Row row, Object data) throws Exception {
          String[] ary = (String[]) data;
          row.appendChild(new Label(ary[0]));
          row.appendChild(new Label(ary[1]));
          row.appendChild(new Label(ary[2]));
View Full Code Here

          row.appendChild(new Label(ary[2]));
        }
      };
    }
    public static RowRenderer getGroupBeanRowRenderer() {
      return new RowRenderer() {
        public void render(Row row, Object data) {
          if (row instanceof Group) {
            Object[] obj = (Object[]) data; // prepared by
            // createGroupHead()
            row.appendChild(new Label(
View Full Code Here

          }
        }
      };
    }
    public static RowRenderer getGroupArrayRowRenderer() {
      return new RowRenderer () {
        public void render(Row row, java.lang.Object obj) {
          if (row instanceof Group) {
            row.appendChild(new Label(obj.toString()));
          } else {
            Object[] data = (Object[]) obj;
View Full Code Here

      if (min < 0)
        if (max < 0) min = 0;
        else min = max - cnt + 1;
      if (min > oldsz) min = oldsz;

      RowRenderer renderer = null;
      final Component next =
        min < oldsz ? (Component)rows.getChildren().get(min): null;
      while (--cnt >= 0) {
        if (renderer == null)
          renderer = (RowRenderer) getRealRenderer();
View Full Code Here

    }
  }
 
  /** Creates a new and unloaded row. */
  protected Component newUnloadedItem(Object renderer, int index) {
    final RowRenderer renderer0 = (RowRenderer) renderer;
    final ListModel model = ((Grid)getOwner()).getModel();
    Row row = null;
    if (model instanceof GroupsListModel) {
      final GroupsListModel gmodel = (GroupsListModel) model;
      final GroupDataInfo info = gmodel.getDataInfo(index);
View Full Code Here

    label.setPre(true); //to make sure &nbsp; is generated, and then occupies some space
    return label;
  }
 
  public Object getRealRenderer() {
    final RowRenderer renderer = _grid.getRowRenderer();
    return renderer != null ? renderer : _defRend;
  }
View Full Code Here

    final Paginal pgi = _grid.getPaginal();
    final boolean inPaging = inPagingMold();

    int newcnt = newsz - oldsz;
    int atg = pgi != null ? _grid.getActivePage(): 0;
    RowRenderer renderer = null;
    Component next = null;   
    if (oldsz > 0) {
      if (min < 0) min = 0;
      else if (min > oldsz - 1) min = oldsz - 1;
      if (max < 0) max = oldsz - 1;
View Full Code Here

                    Level.INFO, _("This worker was already removed by other user"));
        }
    }

    public RowRenderer getWorkersRenderer() {
        return new RowRenderer() {

            @Override
            public void render(Row row, Object data) {
                final Worker worker = (Worker) data;
                row.setValue(worker);
View Full Code Here

    public boolean isImmutableOrAlreadyInUse(AdvanceType advanceType) {
        return advanceTypeModel.isImmutableOrAlreadyInUse(advanceType);
    }

    public RowRenderer getAdvanceTypeRenderer() {
        return new RowRenderer() {

            @Override
            public void render(Row row, Object data) {
                final AdvanceType advanceType = (AdvanceType) data;
                appendLabelName(row, advanceType);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.RowRenderer

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.