Package org.zkoss.zul

Examples of org.zkoss.zul.Button


            });
            return result;
        }

        private Button manualButton(final LimitingResourceQueueElementDTO element) {
            Button result = new Button();
            result.setLabel(_("Manual"));
            result.setTooltiptext(_("Assign element to queue manually"));
            result.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    showManualAllocationWindow(element.getOriginal());
                }
View Full Code Here


            });
            return result;
        }

        private Button removeButton(final LimitingResourceQueueElementDTO element) {
            Button result = new Button("", "/common/img/ico_borrar1.png");
            result.setHoverImage("/common/img/ico_borrar.png");
            result.setSclass("icono");
            result.setTooltiptext(_("Remove queue-based resource element"));
            result.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    removeUnassignedLimitingResourceQueueElement(element);
                }
View Full Code Here

            reloadUnassignedLimitingResourceQueueElements();
        }

        private Button automaticButton(
                final LimitingResourceQueueElementDTO element) {
            Button result = new Button();
            result.setLabel(_("Automatic"));
            result.setTooltiptext(_("Assign element to queue automatically"));
            result.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    assignLimitingResourceQueueElement(element);
                }
View Full Code Here

            toolbar.insertBefore(asButton(c), separator);
        }
    }

    private Button asButton(final IToolbarCommand c) {
        Button result = new Button();
        result.addEventListener(Events.ON_CLICK, new EventListener() {
            @Override
            public void onEvent(Event event) {
                c.doAction();
            }
        });
        if (!StringUtils.isEmpty(c.getImage())) {
            result.setImage(c.getImage());
            result.setTooltiptext(c.getLabel());
        } else {
            result.setLabel(c.getLabel());
        }
        return result;
    }
View Full Code Here

    Button toButton() {
        if (button != null) {
            return button;
        }
        Button result = new Button();
        if (StringUtils.isEmpty(command.getImage())) {
            result.setLabel(command.getName());
        } else {
            result.setImage(command.getImage());
            result.setTooltiptext(command.getName());
        }
        if (command.isDisabled()) {
            result.setDisabled(true);
        } else {
            result.addEventListener(Events.ON_CLICK, new EventListener() {

                @Override
                public void onEvent(Event event) {
                    doAction();
                }
View Full Code Here

        if (chartComponent != null) {
            setAt("insertionPointChart", chartComponent);
        }

        if (!configuration.isCriticalPathEnabled()) {
            Button showCriticalPathButton = (Button) getFellow("showCriticalPath");
            showCriticalPathButton.setVisible(false);
        }
        if (!configuration.isExpandAllEnabled()) {
            Button expandAllButton = (Button) getFellow("expandAll");
            expandAllButton.setVisible(false);
        }
        if (!configuration.isFlattenTreeEnabled()) {
            Button flattenTree = (Button) getFellow("flattenTree");
            flattenTree.setVisible(false);
        }
        if (!configuration.isShowAllResourcesEnabled()) {
            Button showAllResources = (Button) getFellow("showAllResources");
            showAllResources.setVisible(false);
        }
        if (!configuration.isMoneyCostBarEnabled()) {
            Button showMoneyCostBarButton = (Button) getFellow("showMoneyCostBar");
            showMoneyCostBarButton.setVisible(false);
        }

        listZoomLevels.setSelectedIndex(getZoomLevel().ordinal());

        this.visibleChart = configuration.isExpandPlanningViewCharts();
View Full Code Here

        this.leftPane = new LeftPane(disabilityConfiguration, this, predicate);
        this.ganttPanel = new GanttPanel(this,
                commandsOnTasksContextualized, doubleClickCommand,
                disabilityConfiguration, predicate);

        Button button = (Button) getFellow("btnPrint");
        button.setDisabled(!context.isPrintEnabled());
    }
View Full Code Here

    private FilterAndParentExpandedPredicates predicate;

    private boolean visibleChart;

    public void showCriticalPath() {
        Button showCriticalPathButton = (Button) getFellow("showCriticalPath");
        if (disabilityConfiguration.isCriticalPathEnabled()) {
            if (isShowingCriticalPath) {
                context.hideCriticalPath();
                diagramGraph.removePostGraphChangeListener(showCriticalPathOnChange);
                showCriticalPathButton.setSclass("planner-command");
                showCriticalPathButton.setTooltiptext(_("Show critical path"));
            } else {
                context.showCriticalPath();
                diagramGraph.addPostGraphChangeListener(showCriticalPathOnChange);
                showCriticalPathButton.setSclass("planner-command clicked");
                showCriticalPathButton.setTooltiptext(_("Hide critical path"));
            }
            isShowingCriticalPath = !isShowingCriticalPath;
        }
    }
View Full Code Here

            showAdvances();
        }
    }

    public void showAdvances() {
        Button showAdvancesButton = (Button) getFellow("showAdvances");
        if (disabilityConfiguration.isAdvancesEnabled()) {
            Combobox progressTypesCombo = (Combobox) getFellow("cbProgressTypes");
            if (isShowingAdvances) {
                context.hideAdvances();
                diagramGraph.removePostGraphChangeListener(showAdvanceOnChange);
                showAdvancesButton.setSclass("planner-command");
                showAdvancesButton.setTooltiptext(_("Show progress"));
                if (progressTypesCombo.getItemCount() > 0) {
                    progressTypesCombo.setSelectedIndex(0);
                }
            } else {
                context.showAdvances();
                diagramGraph.addPostGraphChangeListener(showAdvanceOnChange);
                showAdvancesButton.setSclass("planner-command clicked");
                showAdvancesButton.setTooltiptext(_("Hide progress"));
            }
            isShowingAdvances = !isShowingAdvances;
        }
    }
View Full Code Here

            isShowingAdvances = !isShowingAdvances;
        }
    }

    public void showReportedHours() {
        Button showReportedHoursButton = (Button) getFellow("showReportedHours");
        if (disabilityConfiguration.isReportedHoursEnabled()) {
            if (isShowingReportedHours) {
                context.hideReportedHours();
                diagramGraph
                        .removePostGraphChangeListener(showReportedHoursOnChange);
                showReportedHoursButton.setSclass("planner-command");
                showReportedHoursButton
                        .setTooltiptext(_("Show reported hours"));
            } else {
                context.showReportedHours();
                diagramGraph
                        .addPostGraphChangeListener(showReportedHoursOnChange);
                showReportedHoursButton.setSclass("planner-command clicked");
                showReportedHoursButton
                        .setTooltiptext(_("Hide reported hours"));
            }
            isShowingReportedHours = !isShowingReportedHours;
        }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Button

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.