/*
* This file is part of ###PROJECT_NAME###
*
* Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
* Desenvolvemento Tecnolóxico de Galicia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package org.zkoss.ganttz;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.zkoss.ganttz.adapters.IDisabilityConfiguration;
import org.zkoss.ganttz.adapters.PlannerConfiguration;
import org.zkoss.ganttz.data.Dependency;
import org.zkoss.ganttz.data.GanttDiagramGraph;
import org.zkoss.ganttz.data.Position;
import org.zkoss.ganttz.data.Task;
import org.zkoss.ganttz.extensions.ICommand;
import org.zkoss.ganttz.extensions.ICommandOnTask;
import org.zkoss.ganttz.extensions.IContext;
import org.zkoss.ganttz.timetracker.TimeTracker;
import org.zkoss.ganttz.timetracker.TimeTrackerComponent;
import org.zkoss.ganttz.timetracker.TimeTrackerComponentWithoutColumns;
import org.zkoss.ganttz.util.ComponentsFinder;
import org.zkoss.ganttz.util.OnZKDesktopRegistry;
import org.zkoss.ganttz.util.script.IScriptsRegister;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.HtmlMacroComponent;
import org.zkoss.zul.Separator;
public class Planner extends HtmlMacroComponent {
private GanttDiagramGraph diagramGraph = new GanttDiagramGraph();
private LeftPane leftPane;
private GanttPanel ganttPanel;
private List extends CommandContextualized>> contextualizedGlobalCommands;
private CommandContextualized> goingDownInLastArrowCommand;
private List extends CommandOnTaskContextualized>> commandsOnTasksContextualized;
private CommandOnTaskContextualized> editTaskCommand;
private FunctionalityExposedForExtensions> context;
private IDisabilityConfiguration disabilityConfiguration;
public Planner() {
registerNeededScripts();
}
private void registerNeededScripts() {
IScriptsRegister register = getScriptsRegister();
register.register(ScriptsRequiredByPlanner.class);
}
TaskList getTaskList() {
if (ganttPanel == null)
return null;
List