Package org.zkoss.zk.au.out

Examples of org.zkoss.zk.au.out.AuInvoke


                if (canShowResourcesText()) {
                    smartUpdate("resourcesText", getResourcesText());
                }
                String cssClass = calculateCSSClass();

                response("setClass", new AuInvoke(TaskComponent.this,
                        "setClass", cssClass));

                // FIXME: Refactorize to another listener
                updateDeadline();
                invalidate();
View Full Code Here


     * We send a response to the client to create the arrow we are going to use
     * to create the dependency
     */

    public void addDependency() {
        response("depkey", new AuInvoke(this, "addDependency"));
    }
View Full Code Here

        // Task mark is placed after midnight date of the deadline day
        if (task.getDeadline() != null) {
            String position = (getMapper().toPixels(
                    LocalDate.fromDateFields(task.getDeadline()).plusDays(1)) - HALF_DEADLINE_MARK)
                    + "px";
            response(null, new AuInvoke(this, "moveDeadline", position));
        } else {
            // Move deadline out of visible area
            response(null, new AuInvoke(this, "moveDeadline","-100px"));
        }

        if (task.getConsolidatedline() != null) {
            int pixels = getMapper().toPixels(
                    LocalDate.fromDateFields(task.getConsolidatedline()
                            .toDayRoundedDate()))
                    - CONSOLIDATED_MARK_HALF_WIDTH;
            String position = pixels + "px";
            response(null, new AuInvoke(this, "moveConsolidatedline", position));
        } else {
            // Move consolidated line out of visible area
            response(null, new AuInvoke(this, "moveConsolidatedline", "-100px"));
        }
    }
View Full Code Here

        if (task.isShowingReportedHours()) {
            int startPixels = this.task.getBeginDate().toPixels(getMapper());
            String widthHoursAdvancePercentage = pixelsFromStartUntil(
                    startPixels,
                this.task.getHoursAdvanceBarEndDate()) + "px";
            response(null, new AuInvoke(this, "resizeCompletionAdvance",
                widthHoursAdvancePercentage));

            Date firstTimesheetDate = task.getFirstTimesheetDate();
            Date lastTimesheetDate = task.getLastTimesheetDate();
            if (firstTimesheetDate != null && lastTimesheetDate != null) {
                Duration firstDuration = Days.daysBetween(
                        task.getBeginDateAsLocalDate(),
                        LocalDate.fromDateFields(firstTimesheetDate))
                        .toStandardDuration();
                int pixelsFirst = getMapper().toPixels(firstDuration);
                String positionFirst = pixelsFirst + "px";

                Duration lastDuration = Days
                        .daysBetween(
                                task.getBeginDateAsLocalDate(),
                                LocalDate.fromDateFields(lastTimesheetDate)
                                        .plusDays(1)).toStandardDuration();
                int pixelsLast = getMapper().toPixels(lastDuration);
                String positionLast = pixelsLast + "px";

                response(null, new AuInvoke(this, "showTimsheetDateMarks",
                        positionFirst, positionLast));
            } else {
                response(null, new AuInvoke(this, "hideTimsheetDateMarks"));
            }

        } else {
            response(null, new AuInvoke(this, "resizeCompletionAdvance", "0px"));
            response(null, new AuInvoke(this, "hideTimsheetDateMarks"));
        }
    }
View Full Code Here

            int startPixels = this.task.getBeginDate().toPixels(getMapper());
            int endPixels = this.task.getEndDate().toPixels(getMapper());
            int widthPixels = (int) ((endPixels - startPixels) * this.task
                    .getMoneyCostBarPercentage().doubleValue());
            String widthMoneyCostBar = widthPixels + "px";
            response(null, new AuInvoke(this, "resizeCompletionMoneyCostBar",
                    widthMoneyCostBar));
        } else {
            response(null, new AuInvoke(this, "resizeCompletionMoneyCostBar",
                    "0px"));
        }
    }
View Full Code Here

    private void updateCompletionAdvance() {
        if (task.isShowingAdvances()) {
            int startPixels = this.task.getBeginDate().toPixels(getMapper());
            String widthAdvancePercentage = pixelsFromStartUntil(startPixels,
                this.task.getAdvanceBarEndDate()) + "px";
            response(null, new AuInvoke(this, "resizeCompletion2Advance",
                    widthAdvancePercentage));
        } else {
            response(null,
                    new AuInvoke(this, "resizeCompletion2Advance", "0px"));
        }
    }
View Full Code Here

        if (task.isShowingAdvances()) {
            int startPixels = this.task.getBeginDate().toPixels(getMapper());

            String widthAdvancePercentage = pixelsFromStartUntil(startPixels,
                    this.task.getAdvanceBarEndDate(progressType)) + "px";
            response(null, new AuInvoke(this, "resizeCompletion2Advance",
                    widthAdvancePercentage));
        } else {
            response(null,
                    new AuInvoke(this, "resizeCompletion2Advance", "0px"));
        }
    }
View Full Code Here

        this.destination = destination;
        this.dependency = dependency;
    }

    private void sendCSSUpdate() {
        response("constraintViolated", new AuInvoke(DependencyComponent.this,
                "setCSSClass", getCSSClass()));
    }
View Full Code Here

    public void zoomChanged() {
        redrawDependency();
    }

    public void redrawDependency() {
        response("redrawDependency" + getId(), new AuInvoke(this, "draw"));
    }
View Full Code Here

    private TimeTrackerComponent timeTrackerForGanttPanel(
            TimeTracker timeTracker) {
        return new TimeTrackerComponent(timeTracker) {
            @Override
            protected void scrollHorizontalPercentage(int daysDisplacement) {
                response("scroll_horizontal", new AuInvoke(GanttPanel.this,
                        "scroll_horizontal", "" + daysDisplacement));
                moveCurrentPositionScroll();
            }

            // FIXME: this is quite awful, it should be simple
            @Override
            protected void moveCurrentPositionScroll() {
                // get the previous data.
                LocalDate previousStart = getPreviousStart();

                // get the current data
                int diffDays = getTimeTrackerComponent().getDiffDays(
                        previousStart);
                double pixelPerDay = getTimeTrackerComponent().getPixelPerDay();

                response("move_scroll", new AuInvoke(GanttPanel.this,
                        "move_scroll", "" + diffDays, "" + pixelPerDay));
            }

            protected void updateCurrentDayScroll() {
                double previousPixelPerDay = getTimeTracker().getMapper()
                        .getPixelsPerDay()
                        .doubleValue();

                response("update_day_scroll", new AuInvoke(GanttPanel.this,
                        "update_day_scroll", "" + previousPixelPerDay));

            }

        };
View Full Code Here

TOP

Related Classes of org.zkoss.zk.au.out.AuInvoke

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.