Package org.zkoss.zul

Examples of org.zkoss.zul.Listitem


                    if (intervalEnd.isBefore(itemEnd)
                            || !intervalEnd.isAfter(itemEnd
                                    .plus(intervalIncrease()))) {
                        itemEnd = intervalEnd;
                    }
                    Listitem item = new Listitem(Util.formatDate(itemStart)
                            + " - " + Util.formatDate(itemEnd.minusDays(1)));
                    horizontalPagination.appendChild(item);
                    itemStart = itemEnd;
                    itemEnd = itemEnd.plus(intervalIncrease());
                }
View Full Code Here


        }
    }

    public void updateSelectedZoomLevel() {
        ganttPanel.getTimeTracker().setZoomLevel(zoomLevel);
        Listitem selectedItem = (Listitem) listZoomLevels.getItems().get(
                zoomLevel.ordinal());
        listZoomLevels.setSelectedItem(selectedItem);
        listZoomLevels.invalidate();
    }
View Full Code Here

    public static Listitem findItemByValue(Listbox listbox, Object needle) {
        if (listbox == null || needle == null) {
            return null;
        }
        for (Object each : listbox.getItems()) {
            Listitem item = (Listitem) each;
            Object value = item.getValue();
            if (needle.toString().equals(value.toString())) {
                return item;
            }
        }
        return null;
View Full Code Here

        }
        if (filterFinishDate.getValue() != null) {
            finishDate = LocalDate.fromDateFields(filterFinishDate.getValue());
        }

        final Listitem item = filterLimitingResource.getSelectedItem();
        Boolean isLimitingResource = (item != null) ? LimitingResourceEnum
                .valueOf((LimitingResourceEnum) item.getValue()) : null;

        if (listFilters.isEmpty()
                && (personalFilter == null || personalFilter.isEmpty())
                && startDate == null && finishDate == null
                && isLimitingResource == null) {
View Full Code Here

    }

    private void setupFilterLimitingResourceListbox() {
        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);
            }
            return 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

            gridCriticalPathTasks.renderAll();
        }
    }

    public List<MonteCarloTask> getSelectedCriticalPath() {
        Listitem selectedItem = lbCriticalPaths.getSelectedItem();
        String selectedPath = selectedItem != null ? selectedItem.getLabel()
                : null;
        return monteCarloModel.getCriticalPath(selectedPath);
    }
View Full Code Here

    }

    public void addCriterionRequirement(MachineWorkersConfigurationUnit unit,
            Button button) {
        Bandbox bandbox = (Bandbox) button.getPreviousSibling();
        Listitem item = ((Listbox) bandbox.getFirstChild().getFirstChild())
                .getSelectedItem();
        if (item != null) {
            CriterionWithItsType criterionAndType = (CriterionWithItsType) item
                    .getValue();
            bandbox.setValue(criterionAndType.getNameAndType());
            if (checkExistingCriterion(unit, criterionAndType.getCriterion())) {
                messages.showMessage(Level.ERROR,
                        _("Criterion previously selected"));
View Full Code Here

        defaultCalendarBandboxSearch.setListboxEventListener(Events.ON_SELECT,
                new EventListener() {
                    @Override
                    public void onEvent(Event event) {
                        Listitem selectedItem = (Listitem) ((SelectEvent) event)
                                .getSelectedItems().iterator().next();
                        setDefaultCalendar((BaseCalendar) selectedItem
                                .getValue());
                    }
                });
        initializeProgressTypeList();
        messages = new MessagesForUser(messagesContainer);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listitem

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.