Package org.zkoss.ganttz.data

Examples of org.zkoss.ganttz.data.Position


            public boolean accepts(Object object) {
                return accepts((Task) object);
            }

            private boolean accepts(Task task) {
                Position position = context.getMapper().findPositionFor(task);
                if (position.isAtTop()) {
                    return true;
                } else {
                    for (TaskContainer taskContainer : position.getAncestors()) {
                        if (!taskContainer.isExpanded()) {
                            return false;
                        }
                    }
                    return true;
View Full Code Here


    }

    @Override
    public Position remove(T domainObject) {
        Task task = mapper.findAssociatedBean(domainObject);
        Position position = mapper.findPositionFor(task);
        adapter.doRemovalOf(mapper.findAssociatedDomainObject(task));
        mapper.remove(domainObject);
        diagramGraph.remove(task);
        task.removed();
        planner.removeTask(task);
View Full Code Here

        return planner;
    }

    @Override
    public void replace(T oldDomainObject, T newDomainObject) {
        Position position = remove(oldDomainObject);
        add(position, newDomainObject);
    }
View Full Code Here

            return result;
        }

        @Override
        public List<? extends TaskContainer> getParents(Task task) {
            Position position = findPositionFor(task);
            return position.getAncestors();
        }
View Full Code Here

            TaskElement task) {
        TaskMilestone milestone = TaskMilestone.create(task.getEndDate());
        milestone.setName(_("new milestone"));
        taskElementDAO.reattach(task);

        Position taskPosition = context.getMapper().findPositionFor(task);
        int insertAt = taskPosition.getInsertionPosition() + 1;

        TaskGroup parent = task.getParent();
        parent.addTaskElement(insertAt, milestone);
        context.add(taskPosition.sameLevelAt(insertAt), milestone);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.ganttz.data.Position

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.