Package org.zkoss.zul

Examples of org.zkoss.zul.Label


                    }
                });
            }

            private void appendLabelName(Row row, AdvanceType advanceType) {
                row.appendChild(new Label(advanceType.getUnitName()));
            }

            private void appendCheckboxEnabled(Row row, AdvanceType advanceType) {
                Checkbox checkbox = new Checkbox();
                checkbox.setChecked(advanceType.getActive());
View Full Code Here


            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);
            }
View Full Code Here

    public void invalidValue(InvalidValue invalidValue) {
        addMessage(Level.WARNING, createLabelFor(invalidValue));
    }

    public static Label createLabelFor(InvalidValue invalidValue) {
        Label result = new Label();
        result.setValue(_(invalidValue.getMessage()));
        return result;
    }
View Full Code Here

        return result;
    }

    @Override
    public void showMessage(Level level, String message) {
        addMessage(level, new Label(message));
    }
View Full Code Here

                    .getLastSubcontractorCommunicationValues();
            return (value != null) ? value.toString() : "";
        }

        private void appendLabel(Row row, String label) {
            row.appendChild(new Label(label));
        }
View Full Code Here

        }

        private void appendLabelWithTooltip(final Row row,
                final SubcontractorCommunication subcontractorCommunication) {
            String lastValue = getLastValue(subcontractorCommunication);
            final Label compLabel = new Label(lastValue);

            if (subcontractorCommunication.getCommunicationType().equals(
                    CommunicationType.PROGRESS_UPDATE)) {
            compLabel.setTooltip(pp);
            compLabel.addEventListener(Events.ON_MOUSE_OVER,
                    new EventListener() {
                        @Override
                        public void onEvent(Event arg0) throws Exception {
                            List<SubcontractorCommunicationValue> model = subcontractorCommunication
                                    .getSubcontractorCommunicationValues();
View Full Code Here

        /**
         * Copied verbatim from org.zkoss.zul.Tree;
         */
        @Override
        public void render(Treeitem ti, Object node) {
            Label lblName = null;
            if (node instanceof MaterialCategory) {
                final MaterialCategory materialCategory = (MaterialCategory) node;
                lblName = new Label(materialCategory.getName());
            } else if (node instanceof Material) {
                final Material material = (Material) node;
                lblName = new Label(material.getDescription());
            }

            Treerow tr = null;
            ti.setValue(node);
            if (ti.getTreerow() == null) {
                tr = new Treerow();
                tr.setParent(ti);
                ti.setOpen(true); // Expand node
            } else {
                tr = ti.getTreerow();
                tr.getChildren().clear();
            }
            // Add category name
            Treecell cellName = new Treecell();
            lblName.setParent(cellName);
            cellName.setParent(tr);
        }
View Full Code Here

                if (breadcrumbs.getChildren() != null) {
                    breadcrumbs.getChildren().clear();
                }
                breadcrumbs.appendChild(new Image(BREADCRUMBS_SEPARATOR));
                breadcrumbs.appendChild(new Label(getSchedulingLabel()));
                breadcrumbs.appendChild(new Image(BREADCRUMBS_SEPARATOR));
                breadcrumbs.appendChild(new Label(_("Projects List")));
            }
        };
    }
View Full Code Here

                ordersTabCreator) {
            @Override
            protected void afterShowAction() {
                breadcrumbs.getChildren().clear();
                breadcrumbs.appendChild(new Image(BREADCRUMBS_SEPARATOR));
                breadcrumbs.appendChild(new Label(getSchedulingLabel()));
                breadcrumbs.appendChild(new Image(BREADCRUMBS_SEPARATOR));
                breadcrumbs.appendChild(new Label(PROJECT_DETAILS));
                breadcrumbs.appendChild(new Image(BREADCRUMBS_SEPARATOR));
                if (mode.isOf(ModeType.ORDER)) {
                    orderCRUDController.showOrderElementFilter();
                    orderCRUDController.showCreateButtons(false);
                    orderCRUDController.initEdit(mode.getOrder());
                    breadcrumbs
                            .appendChild(new Label(mode.getOrder().getName()));
                }

            }
        };
    }
View Full Code Here

        return new RowRenderer() {
            @Override
            public void render(Row row, Object data) throws Exception {
                final UserRole role = (UserRole) data;

                row.appendChild(new Label(_(role.getDisplayName())));

                row.appendChild(Util.createRemoveButton(new EventListener() {
                    @Override
                    public void onEvent(Event event) throws Exception {
                        removeRole(role);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Label

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.