Package org.zkoss.zul

Examples of org.zkoss.zul.Column


        other.setAlign("center");
        columns.appendChild(other);
    }

    private void createTotalColumn() {
        Column total = new Column(_("Total"));
        total.setWidth(TOTAL_DURATION_TEXTBOX_WIDTH);
        total.setSclass("totals-column");
        total.setAlign("center");
        columns.appendChild(total);
    }
View Full Code Here


        updateSummary(result);
        return result;
    }

    public void sortQueryWorkReportLines() {
        Column columnDateLine = (Column) listQueryWindow.getFellow("date");
        if (columnDateLine != null) {
            if (columnDateLine.getSortDirection().equals("ascending")) {
                columnDateLine.sort(false, false);
                columnDateLine.setSortDirection("ascending");
            } else if (columnDateLine.getSortDirection().equals("descending")) {
                columnDateLine.sort(true, false);
                columnDateLine.setSortDirection("descending");
            }
        }
    }
View Full Code Here

        Util.reloadBindings(listingCriterions);
        forceSortGridSatisfaction();
    }

    public void forceSortGridSatisfaction() {
        Column column = (Column) listingCriterions.getColumns().getFirstChild();
        ListModelExt model = (ListModelExt) listingCriterions.getModel();
        if (model != null) {
            if ("ascending".equals(column.getSortDirection())) {
                model.sort(column.getSortAscending(), true);
            }
            if ("descending".equals(column.getSortDirection())) {
                model.sort(column.getSortDescending(), false);
            }
        }
    }
View Full Code Here

        Util.reloadBindings(assignedTaskQualityForms);
        assignedTaskQualityForms.invalidate();
    }

    public void sortTaskQualityForms() {
        Column columnName = (Column) assignedTaskQualityForms.getColumns()
                .getChildren().get(1);
        if (columnName != null) {
            if (columnName.getSortDirection().equals("ascending")) {
                columnName.sort(false, false);
                columnName.setSortDirection("ascending");
            } else if (columnName.getSortDirection().equals("descending")) {
                columnName.sort(true, false);
                columnName.setSortDirection("descending");
            }
        }
    }
View Full Code Here

        // Delete all headers
        columns.getChildren().clear();
        columns.setSizable(true);

        // Add static headers
        Column columnName = new Column();
        columnName.setLabel(_("Name"));
        Util.setSort(columnName, "auto=(name)");
        columnName.setSortDirection("ascending");
        columns.appendChild(columnName);

        Column columnPosition = new Column();
        columnPosition.setLabel(_("Position"));
        columns.appendChild(columnPosition);

        Column columnPercentage = new Column();
        columnPercentage.setLabel(_("Percentage"));
        columns.appendChild(columnPercentage);

        Column columnPassed = new Column();
        columnPassed.setLabel(_("Checked"));
        columns.appendChild(columnPassed);

        Column columnDate = new Column();
        columnDate.setLabel(_("Date"));
        columns.appendChild(columnDate);

        columns.setParent(gridItems);
    }
View Full Code Here

        Util.reloadBindings(listingCriterions);
        forceSortGridSatisfaction();
    }

    public void forceSortGridSatisfaction() {
        Column column = (Column) listingCriterions.getColumns().getFirstChild();
        ListModelExt model = (ListModelExt) listingCriterions.getModel();
        if ("ascending".equals(column.getSortDirection())) {
            model.sort(column.getSortAscending(), true);
        }
        if ("descending".equals(column.getSortDirection())) {
            model.sort(column.getSortDescending(), false);
        }
    }
View Full Code Here

            tab.setSelected(true);
        }
    }

    public void sortWorkReportTypes() {
        Column columnName = (Column) listWindow
                .getFellow("workReportTypeName");
        if (columnName != null) {
            if (columnName.getSortDirection().equals("ascending")) {
                columnName.sort(false, false);
                columnName.setSortDirection("ascending");
            } else if (columnName.getSortDirection().equals("descending")) {
                columnName.sort(true, false);
                columnName.setSortDirection("descending");
            }
        }
    }
View Full Code Here

     * FIXME: This is a temporary solution, there should be a better/smarter way
     * of preserving order in the Grid every time a new element is added to its
     * model
     */
    private void forceSortGridQualityFormItems() {
        Column column = (Column) gridQualityFormItems.getColumns()
                .getChildren().get(2);
        ListModelExt model = (ListModelExt) gridQualityFormItems.getModel();
        if ("ascending".equals(column.getSortDirection())) {
            model.sort(column.getSortAscending(), true);
        }
        if ("descending".equals(column.getSortDirection())) {
            model.sort(column.getSortDescending(), false);
        }
    }
View Full Code Here

        Util.reloadBindings(window);
        forceSortGridSatisfaction();
    }

    public void forceSortGridSatisfaction() {
        Column column = (Column) columnBySort;
        ListModelExt model = (ListModelExt) listing.getModel();
        if ("ascending".equals(column.getSortDirection())) {
            model.sort(column.getSortAscending(), true);
        }
        if ("descending".equals(column.getSortDirection())) {
            model.sort(column.getSortDescending(), false);
        }
    }
View Full Code Here

     * FIXME: This is a temporary solution, there should be a better/smarter way
     * of preserving order in the Grid every time a new element is added to its
     * model
     */
    private void forceSortGridLabels() {
        Column column = (Column) gridLabels.getColumns().getFirstChild();
        ListModelExt model = (ListModelExt) gridLabels.getModel();
        if ("ascending".equals(column.getSortDirection())) {
            model.sort(column.getSortAscending(), true);
        }
        if ("descending".equals(column.getSortDirection())) {
            model.sort(column.getSortDescending(), false);
        }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Column

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.