Package org.zkoss.zul

Examples of org.zkoss.zul.Button$EncodedHref


    private void appendOperationsFieldOrLabel(final Row row) {
        Hbox hbox = new Hbox();
        hbox.setParent(row);

        Button downbutton = new Button("", "/common/img/ico_subir1.png");
        downbutton.setHoverImage("/common/img/ico_subir.png");
        downbutton.setParent(hbox);
        downbutton.setSclass("icono");
        downbutton.addEventListener(Events.ON_CLICK, new EventListener() {
            @Override
            public void onEvent(Event event) {
                boolean intoHeading = intoHeading(row.getGrid());
                workReportTypeModel.upFieldOrLabel(row.getValue(), intoHeading);
                Util.reloadBindings(row.getGrid());
            }
        });

        Button upbutton = new Button("", "/common/img/ico_bajar1.png");
        upbutton.setHoverImage("/common/img/ico_bajar.png");
        upbutton.setParent(hbox);
        upbutton.setSclass("icono");
        upbutton.addEventListener(Events.ON_CLICK, new EventListener() {
            @Override
            public void onEvent(Event event) {
                boolean intoHeading = intoHeading(row.getGrid());
                workReportTypeModel.downFieldOrLabel(row.getValue(),
                        intoHeading);
View Full Code Here


                    public void onEvent(Event event) {
                        goToEditForm(unitType);
                    }
                }));

                Button removeButton = Util
                        .createRemoveButton(new EventListener() {

                    @Override
                    public void onEvent(Event event) {
                        confirmDelete(unitType);
                    }
                });
                removeButton.setDisabled(unitTypeModel
                        .isUnitTypeUsedInAnyMaterial(unitType));
                hbox.appendChild(removeButton);

                row.appendChild(hbox);
            }
View Full Code Here

                final Rows rows = listCostCategories.getRows();
                for (Iterator i = rows.getChildren().iterator(); i.hasNext(); ) {
                    final Row row = (Row) i.next();
                    final CostCategory category = (CostCategory) row.getValue();
                    Button btnDelete = (Button) ((Hbox)row.getChildren().get(2)).getChildren().get(1);
                    if (!canRemoveCostCategory(category)) {
                        btnDelete.setDisabled(true);
                        btnDelete.setImage("/common/img/ico_borrar_out.png");
                        btnDelete.setHoverImage("/common/img/ico_borrar_out.png");
                    }
                }
            }
        });
        initializeHoursType();
View Full Code Here

     * Append a delete {@link Button} to {@link Row}
     *
     * @param row
     */
    private void appendDeleteButton(final Row row) {
        Button delete = new Button("", "/common/img/ico_borrar1.png");
        delete.setHoverImage("/common/img/ico_borrar.png");
        delete.setSclass("icono");
        delete.setTooltiptext(_("Delete"));
        delete.addEventListener(Events.ON_CLICK, new EventListener() {
            @Override
            public void onEvent(Event event) {
                confirmRemove((HourCost) row.getValue());
            }
        });
View Full Code Here

            row.appendChild(vbox);
        }

        private Button getExportButton(
                final SubcontractedTaskData subcontractedTaskData) {
            Button exportButton = new Button("XML");
            exportButton.addEventListener(Events.ON_CLICK, new EventListener() {

                IServletRequestHandler requestHandler = new IServletRequestHandler() {

                    @Override
                    public void handle(HttpServletRequest request,
View Full Code Here

            return exportButton;
        }

        private Button getSendButton(
                final SubcontractedTaskData subcontractedTaskData) {
            Button sendButton = new Button(_("Send"));
            sendButton.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    try {
                        subcontractedTasksModel
                                .sendToSubcontractor(subcontractedTaskData);
                        messagesForUser.showMessage(Level.INFO,
                                _("Subcontracted task sent successfully"));
                    } catch (UnrecoverableErrorServiceException e) {
                        messagesForUser
                                .showMessage(Level.ERROR, e.getMessage());
                    } catch (ConnectionProblemsException e) {
                        messagesForUser
                                .showMessage(Level.ERROR, e.getMessage());
                    } catch (ValidationException e) {
                        messagesForUser.showInvalidValues(e);
                    }
                    reload();
                }

            });

            sendButton.setDisabled(!subcontractedTaskData.isSendable());

            return sendButton;
        }
View Full Code Here

            code.setConstraint(checkConstraintLineCodes(line));
            row.appendChild(code);
        }

        private void appendDeleteButton(final Row row) {
            Button delete = new Button("", "/common/img/ico_borrar1.png");
            delete.setHoverImage("/common/img/ico_borrar.png");
            delete.setSclass("icono");
            delete.setTooltiptext(_("Delete"));
            delete.addEventListener(Events.ON_CLICK, new EventListener() {
                @Override
                public void onEvent(Event event) {
                    confirmRemove((ExpenseSheetLine) row.getValue());
                }
            });
View Full Code Here

            row.appendChild(hbox);
        }

        private Button getExportButton(
                final Order order) {
            Button exportButton = new Button("XML");
            exportButton.addEventListener(Events.ON_CLICK, new EventListener() {

                IServletRequestHandler requestHandler = new IServletRequestHandler() {

                    @Override
                    public void handle(HttpServletRequest request,
View Full Code Here

            return exportButton;
        }

        private Button getSendButton(final Order order,
                boolean sendButtonDisabled) {
            Button sendButton = new Button(_("Send"));
            sendButton.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    try {
                        reportAdvancesModel.sendAdvanceMeasurements(order);
                        messagesForUser.showMessage(Level.INFO,
                                _("Progress sent successfully"));
                    } catch (UnrecoverableErrorServiceException e) {
                        messagesForUser
                                .showMessage(Level.ERROR, e.getMessage());
                    } catch (ConnectionProblemsException e) {
                        messagesForUser
                                .showMessage(Level.ERROR, e.getMessage());
                    } catch (ValidationException e) {
                        messagesForUser.showInvalidValues(e);
                    }

                    Util.reloadBindings(window);
                }

            });

            sendButton.setDisabled(sendButtonDisabled);

            return sendButton;
        }
View Full Code Here

                final Rows rows = gridMaterials.getRows();
                for (Iterator i = rows.getChildren().iterator(); i.hasNext(); ) {
                    final Row row = (Row) i.next();
                    final Material material = (Material) row.getValue();
                    Button btnDelete = (Button) row.getChildren().get(6);
                    if (!materialsModel.canRemoveMaterial(material)) {
                        btnDelete.setDisabled(true);
                        btnDelete.setImage("/common/img/ico_borrar_out.png");
                        btnDelete.setHoverImage("/common/img/ico_borrar_out.png");
                    }
                }
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Button$EncodedHref

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.