Examples of Intbox


Examples of org.zkoss.zul.Intbox

        private Label label(String value) {
            return new Label(value);
        }

        private Intbox intboxHours(final LimitingAllocationRow resourceAllocation) {
            Intbox result = bindToHours(new Intbox(), resourceAllocation);
            result.setDisabled(resourceAllocation.hasDayAssignments() && disableHours);
            return result;
        }
View Full Code Here

Examples of org.zkoss.zul.Intbox

        protected void addCodeCell(final OrderElementTemplate element) {
            //empty because templates don't have code attribute
        }

        void addInitCell(final OrderElementTemplate currentElement) {
            final Intbox intbox = new Intbox();
            Util.bind(intbox, new Getter<Integer>() {

                @Override
                public Integer get() {
                    return currentElement.getStartAsDaysFromBeginning();
View Full Code Here

Examples of org.zkoss.zul.Intbox

            });
            addCell(intbox);
        }

        void addEndCell(final OrderElementTemplate currentElement) {
            final Intbox intbox = new Intbox();
            Util.bind(intbox, new Getter<Integer>() {

                @Override
                public Integer get() {
                    return currentElement.getDeadlineAsDaysFromBeginning();
View Full Code Here

Examples of org.zkoss.zul.Intbox

                }
                return iterations;
            }

            private void validateRowsPercentages() {
                Intbox intbox;

                int page = 0;
                int counter = 0;

                Rows rows = gridCriticalPathTasks.getRows();
                for (Object each : rows.getChildren()) {
                    Row row = (Row) each;
                    List<org.zkoss.zk.ui.Component> children = row
                            .getChildren();

                    Integer sum = 0;
                    intbox = (Intbox) children.get(3);
                    sum += intbox.getValue();
                    intbox = (Intbox) children.get(5);
                    sum += intbox.getValue();
                    intbox = (Intbox) children.get(7);
                    sum += intbox.getValue();

                    if (sum != 100) {
                        gridCriticalPathTasks.setActivePage(page);
                        throw new WrongValueException(row,
                                _("Percentages should sum 100"));
View Full Code Here

Examples of org.zkoss.zul.Intbox

            return result;
        }

        private Intbox pessimisticDurationPercentage(
                final MonteCarloTask task) {
            Intbox result = new Intbox();
            Util.bind(result, new Util.Getter<Integer>() {

                @Override
                public Integer get() {
                    return task.getPessimisticDurationPercentage();
View Full Code Here

Examples of org.zkoss.zul.Intbox

            });
            return result;
        }

        private Intbox normalDurationPercentage(final MonteCarloTask task) {
            Intbox result = new Intbox();
            Util.bind(result, new Util.Getter<Integer>() {

                @Override
                public Integer get() {
                    return task.getNormalDurationPercentage();
View Full Code Here

Examples of org.zkoss.zul.Intbox

            });
            return result;
        }

        private Intbox optimisticDurationPercentage(final MonteCarloTask task) {
            Intbox result = new Intbox();
            Util.bind(result, new Util.Getter<Integer>() {

                @Override
                public Integer get() {
                    return task.getOptimisticDurationPercentage();
View Full Code Here

Examples of org.zkoss.zul.Intbox

                            throw new WrongValueException(prefixBox,
                                    errorMessage);
                        }
                    }

                Intbox digitsBox = (Intbox) row.getChildren().get(3);
                    try {
                        if (!seq.isAlreadyInUse()) {
                            seq.setNumberOfDigits(digitsBox.getValue());
                        }
                    } catch (IllegalArgumentException e) {
                        throw new WrongValueException(digitsBox, _(
                                "number of digits must be between {0} and {1}",
                                EntitySequence.MIN_NUMBER_OF_DIGITS,
View Full Code Here

Examples of org.zkoss.zul.Intbox

            row.appendChild(textbox);
        }

        private void appendNumberOfDigitsInbox(Row row,
                final EntitySequence entitySequence) {
            final Intbox tempIntbox = new Intbox();
            Intbox intbox = Util.bind(tempIntbox, new Util.Getter<Integer>() {

                @Override
                public Integer get() {
                    return entitySequence.getNumberOfDigits();
                }
            }, new Util.Setter<Integer>() {

                @Override
                public void set(Integer value) {
                    try {
                        entitySequence.setNumberOfDigits(value);
                    } catch (IllegalArgumentException e) {
                        throw new WrongValueException(tempIntbox, _(
                                "number of digits must be between {0} and {1}",
                                EntitySequence.MIN_NUMBER_OF_DIGITS,
                                EntitySequence.MAX_NUMBER_OF_DIGITS));
                    }
                }
            });
            intbox.setConstraint(checkConstraintNumberOfDigits());

            if (entitySequence.isAlreadyInUse()) {
                intbox.setDisabled(true);
            }

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

Examples of org.zkoss.zul.Intbox

            };
        }

        public void addHoursCell(final T currentElement) {
            Intbox intboxHours = buildHoursIntboxFor(currentElement);
            hoursIntBoxByElement.put(currentElement, intboxHours);
            if (readOnly || currentElement.isJiraIssue()) {
                intboxHours.setDisabled(true);
            }
            Treecell cellHours = addCell(intboxHours);
            setReadOnlyHoursCell(currentElement, intboxHours, cellHours);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.