Package org.zkoss.zul

Examples of org.zkoss.zul.Listcell


        @Override
        public void render(Listitem item, Object data) {
            final HoursGroup hoursGroup = (HoursGroup) data;

            // Criterion Requirements hours Group
            Listcell cellCriterionRequirements = new Listcell();
            cellCriterionRequirements.setParent(item);
            cellCriterionRequirements
                    .appendChild(appendRequirements(hoursGroup));

            // Type hours Group
            Listcell cellType = new Listcell();
            cellType.setParent(item);
            cellType.appendChild(appendType(hoursGroup));

            // Working hours
            Listcell cellWorkingHours = new Listcell();
            cellWorkingHours.setParent(item);
            cellWorkingHours.appendChild(appendWorkingHours(hoursGroup));
        }
View Full Code Here


        for(LimitingResourceEnum resourceEnum :
            LimitingResourceEnum.getLimitingResourceFilterOptionList()) {
            Listitem item = new Listitem();
            item.setParent(filterLimitingResource);
            item.setValue(resourceEnum);
            item.appendChild(new Listcell(resourceEnum.toString()));
            filterLimitingResource.appendChild(item);
        }
        filterLimitingResource.setSelectedIndex(0);
    }
View Full Code Here

        private Listbox buildPriorityList(int selectedValue) {
            Listbox result = listbox();
            for (int i = 1; i <= 10; i++) {
                Listitem item = new Listitem();
                Listcell cell = new Listcell(i + "");
                cell.setParent(item);
                if (i == selectedValue) {
                    item.setSelected(true);
                }
                item.setParent(result);
            }
View Full Code Here

            return listbox;
        }

        private String getSelectedValue(Listbox listbox) {
            final Listitem item = listbox.getSelectedItem();
            final Listcell cell = (Listcell) item.getChildren().get(0);
            return cell.getLabel();
        }
View Full Code Here

        private void appendLabelResource(Listitem item) {
            ResourceWithItsLoadRatios dataToRender = (ResourceWithItsLoadRatios) item
                    .getValue();

            Listcell cellName = new Listcell();
            Resource resource = dataToRender.getResource();
            cellName.appendChild(new Label(resource.getShortDescription()));
            item.appendChild(cellName);

            Listcell cellAvailability = new Listcell();
            BigDecimal availability = dataToRender.getRatios()
                    .getAvailiabilityRatio();
            Div totalDiv = new Div();
            totalDiv.setStyle("width:50px;height:12px;border: solid 1px black");
            Div containedDiv = new Div();
            String styleValue = "width:" + availability.movePointRight(2)
                    + "%;height:12px;background-color:"
                    + calculateRgba(availability) + ";float:left;left:0";
            containedDiv.setStyle(styleValue);
            Label l = new Label(availability.movePointRight(2).toString() + "%");
            l.setStyle("width:50px;margin-left: 12px");
            containedDiv.appendChild(l);
            totalDiv.appendChild(containedDiv);
            cellAvailability.appendChild(totalDiv);
            item.appendChild(cellAvailability);

            Listcell cellOvertime = new Listcell();
            BigDecimal overtime = dataToRender.getRatios().getOvertimeRatio();
            Label overtimeLabel = new Label(overtime.toString());
            cellOvertime.appendChild(overtimeLabel);
            if (!overtime.equals(BigDecimal.ZERO.setScale(2))) {
                overtimeLabel.setStyle("position: relative; top: -12px");
                Image img = new Image(
                        "/dashboard/img/value-meaning-negative.png");
                img.setStyle("width: 25px; position: relative; top: -5px");
                cellOvertime.appendChild(img);
            }
            item.appendChild(cellOvertime);
        }
View Full Code Here

public class EnumsListitemRenderer implements ListitemRenderer {

    @Override
    public void render(Listitem item, Object data) {
        item.setValue(data);
        item.appendChild(new Listcell(_(data.toString())));
    }
View Full Code Here

    private void appendType(final Listitem item) {
        Resource resource = (Resource) item.getValue();
        org.zkoss.zul.Label typeLabel = new org.zkoss.zul.Label(
                getType(resource));

        Listcell typeResourceCell = new Listcell();
        typeResourceCell.appendChild(typeLabel);
        item.appendChild(typeResourceCell);
    }
View Full Code Here

        final Resource resource = (Resource) item.getValue();
        final Checkbox limitingCheckbox = new Checkbox();
        limitingCheckbox.setChecked(resource.isLimitingResource());
        limitingCheckbox.setDisabled(true);

        Listcell limitingResourceCell = new Listcell();
        limitingResourceCell.appendChild(limitingCheckbox);
        item.appendChild(limitingResourceCell);
    }
View Full Code Here

    private void appendName(final Listitem item) {
        Resource resource = (Resource) item.getValue();
        org.zkoss.zul.Label nameLabel = new org.zkoss.zul.Label(
                getName(resource));

        Listcell nameResourceCell = new Listcell();
        nameResourceCell.appendChild(nameLabel);
        item.appendChild(nameResourceCell);
    }
View Full Code Here

    private void appendCode(Listitem item) {
        Resource resource = (Resource) item.getValue();
        org.zkoss.zul.Label codeLabel = new org.zkoss.zul.Label(resource
                .getCode());

        Listcell codeResourceCell = new Listcell();
        codeResourceCell.appendChild(codeLabel);
        item.appendChild(codeResourceCell);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listcell

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.