Package org.zkoss.zul

Examples of org.zkoss.zul.Row


   * @param tableName
   * @param value
   */
  private void addNewRow(Rows rowParent, String tableName, Object value) {

    Row row = new Row();

    Html html_TableName = new Html(tableName);
    html_TableName.setStyle("padding-left: 5px;");
    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");
      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    html_RecordCount.setStyle("padding-right: 5px;");
    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);

    row.appendChild(divKey);
    row.appendChild(divValue);
    row.setParent(rowParent);
  }
View Full Code Here


    // !color.equalsIgnoreCase("black") | !color.equalsIgnoreCase("cyan") |
    // !color.equalsIgnoreCase("brown")) {
    // color = "black";
    // }

    Row row = new Row();

    Html html_TableName = new Html(tableName);

    html_TableName.setStyle("padding-left: 5px;");

    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");
      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    if (!color.equalsIgnoreCase("black")) {
      html_RecordCount.setStyle("padding-right: 5px;  color: " + color + ";");
    } else
      html_RecordCount.setStyle("padding-right: 5px;");

    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);

    row.appendChild(divKey);
    row.appendChild(divValue);
    row.setParent(rowParent);
  }
View Full Code Here

   
    LocationManager manager=(LocationManager)WebApplication.lookup(LocationManager.LocalJNDIName);
    List<Location> warehouses=manager.findByWarehouse(warehouseText.getText());
    Iterator<Location> it=warehouses.iterator();
    while(it.hasNext()){
      Row row=new Row();
      Location c=it.next();
      row.appendChild(new Checkbox());
      row.appendChild(new Label(c.getId().toString()));
      row.appendChild(new Label(c.getName()));
      row.appendChild(new Label(c.getWarehouse().getName()));
      row.appendChild(new Label(c.getDescription().getShortDescription()));
     
      gridRows.appendChild(row);
    }
   
  }
View Full Code Here

    Rows gridRows=companiesGrid.getRows();
    UnitOfMeasureManager manager=(UnitOfMeasureManager)WebApplication.lookup(UnitOfMeasureManager.LocalJNDIName);
    List<UnitOfMeasure> divisions=manager.findAll();
    Iterator<UnitOfMeasure> it=divisions.iterator();
    while(it.hasNext()){
      Row row=new Row();
      UnitOfMeasure c=it.next();
      row.appendChild(new Checkbox());
      row.appendChild(new Label(c.getId().toString()));
      row.appendChild(new Label(c.getName()));
      row.appendChild(new Label(c.getDescription().getShortDescription()));
     
      gridRows.appendChild(row);
    }
   
  }
View Full Code Here

    public void selectedAllUnassignedQueueElements() {
        final boolean value = cbSelectAll.isChecked();

        final Rows rows = gridUnassignedLimitingResourceQueueElements.getRows();
        for (Object each: rows.getChildren()) {
            final Row row = (Row) each;
            Checkbox cbAutoQueueing = getAutoQueueing(row);
            cbAutoQueueing.setChecked(value);
        }
    }
View Full Code Here

    private List<LimitingResourceQueueElement> getAllSelectedQueueElements() {
        List<LimitingResourceQueueElement> result = new ArrayList<LimitingResourceQueueElement>();

        final Rows rows = gridUnassignedLimitingResourceQueueElements.getRows();
        for (Object each : rows.getChildren()) {
            final Row row = (Row) each;
            Checkbox cbAutoQueueing = getAutoQueueing(row);
            if (cbAutoQueueing.isChecked()) {
                LimitingResourceQueueElementDTO dto = (LimitingResourceQueueElementDTO) row
                        .getValue();
                result.add((LimitingResourceQueueElement) dto.getOriginal());
            }
        }
        return result;
View Full Code Here

        if (listHoursGroups != null) {
            List<Row> listRowsHoursGroup = (List<Row>) ((Rows) listHoursGroups
                    .getRows()).getChildren();
            for (Row row : listRowsHoursGroup) {
                Rows listRequirementRows = getRequirementRows(row);
                Row requirementRow = findRowOfCriterionRequirementWrapper(
                        listRequirementRows, requirementWrapper);
                showInvalidValue(requirementRow, requirementWrapper);
            }
        }
    }
View Full Code Here

     */
    private void showInvalidValues(
            CriterionRequirementWrapper requirementWrapper) {
        if (listingRequirements != null) {
            // Find which listItem contains CriterionSatisfaction inside listBox
            Row row = findRowOfCriterionRequirementWrapper(listingRequirements
                    .getRows(), requirementWrapper);
            showInvalidValue(row, requirementWrapper);
        }
    }
View Full Code Here

    protected abstract CriterionRequirementWrapper addExceptionToHoursGroupWrapper(
            HoursGroupWrapper hoursGroupWrapper);

    public void removeCriterionToHoursGroup(Component self) {
        try {
            Row row = (Row) self.getParent().getParent();
            CriterionRequirementWrapper requirementWrapper = (CriterionRequirementWrapper) row
                    .getValue();
            HoursGroupWrapper hoursGroupWrapper = getHoursGroupOfRequirementWrapper(row);
            deleteCriterionToHoursGroup(hoursGroupWrapper, requirementWrapper);
            repaint(self, hoursGroupWrapper);
        } catch (Exception e) {
View Full Code Here

        Listbox listbox = (Listbox) bandbox.getFirstChild().getFirstChild();
        listbox.setModel(new SimpleListModel(getCriterionWithItsTypes()));

        if (item != null) {

            Row row = (Row) bandbox.getParent().getParent();
            CriterionWithItsType criterionAndType = (CriterionWithItsType) item
                    .getValue();
            HoursGroupWrapper hoursGroupWrapper = getHoursGroupOfRequirementWrapper(row);
            bandbox.setValue(criterionAndType.getNameAndType());
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Row

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.