ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #125] Renaming edit command to double click command

This commit is contained in:
Óscar González Fernández 2009-12-07 19:26:57 +01:00
parent 5abfe86292
commit f48a54956e
6 changed files with 20 additions and 20 deletions

View file

@ -98,7 +98,7 @@ public class DataForPlanner {
}
});
configuration.setEditTaskCommand(new ICommandOnTask<ITaskFundamentalProperties>() {
configuration.setDoubleClickCommand(new ICommandOnTask<ITaskFundamentalProperties>() {
@Override
public void doAction(

View file

@ -43,14 +43,14 @@ public class GanttPanel extends XulElement implements AfterCompose {
public GanttPanel(
FunctionalityExposedForExtensions<?> context,
List<? extends CommandOnTaskContextualized<?>> commandsOnTasksContextualized,
CommandOnTaskContextualized<?> editTaskCommand,
CommandOnTaskContextualized<?> doubleClickCommand,
IDisabilityConfiguration disabilityConfiguration) {
this.diagramGraph = context.getDiagramGraph();
timeTrackerComponent = timeTrackerForGanttPanel(context
.getTimeTracker());
appendChild(timeTrackerComponent);
dependencyList = new DependencyList(context);
tasksLists = TaskList.createFor(context, editTaskCommand,
tasksLists = TaskList.createFor(context, doubleClickCommand,
commandsOnTasksContextualized, disabilityConfiguration);
appendChild(tasksLists);
appendChild(dependencyList);

View file

@ -71,7 +71,7 @@ public class Planner extends HtmlMacroComponent {
private List<? extends CommandOnTaskContextualized<?>> commandsOnTasksContextualized;
private CommandOnTaskContextualized<?> editTaskCommand;
private CommandOnTaskContextualized<?> doubleClickCommand;
private FunctionalityExposedForExtensions<?> context;
@ -161,8 +161,8 @@ public class Planner extends HtmlMacroComponent {
configuration.getCommandsOnTasks());
goingDownInLastArrowCommand = contextualize(newContext, configuration
.getGoingDownInLastArrowCommand());
editTaskCommand = contextualize(newContext, configuration
.getEditTaskCommand());
doubleClickCommand = contextualize(newContext, configuration
.getDoubleClickCommand());
this.context = newContext;
this.disabilityConfiguration = configuration;
newContext.add(configuration.getData());
@ -234,7 +234,7 @@ public class Planner extends HtmlMacroComponent {
insertGlobalCommands();
this.leftPane = new LeftPane(this.diagramGraph.getTopLevelTasks());
this.ganttPanel = new GanttPanel(this.context,
commandsOnTasksContextualized, editTaskCommand,
commandsOnTasksContextualized, doubleClickCommand,
disabilityConfiguration);
}

View file

@ -61,7 +61,7 @@ public class TaskList extends XulElement implements AfterCompose {
private List<Task> originalTasks;
private final CommandOnTaskContextualized<?> editTaskCommand;
private final CommandOnTaskContextualized<?> doubleClickCommand;
private final List<? extends CommandOnTaskContextualized<?>> commandsOnTasksContextualized;
@ -71,12 +71,12 @@ public class TaskList extends XulElement implements AfterCompose {
public TaskList(
FunctionalityExposedForExtensions<?> context,
CommandOnTaskContextualized<?> editTaskCommand,
CommandOnTaskContextualized<?> doubleClickCommand,
List<Task> tasks,
List<? extends CommandOnTaskContextualized<?>> commandsOnTasksContextualized,
IDisabilityConfiguration disabilityConfiguration) {
this.context = context;
this.editTaskCommand = editTaskCommand;
this.doubleClickCommand = doubleClickCommand;
this.originalTasks = tasks;
this.commandsOnTasksContextualized = commandsOnTasksContextualized;
this.disabilityConfiguration = disabilityConfiguration;
@ -84,10 +84,10 @@ public class TaskList extends XulElement implements AfterCompose {
public static TaskList createFor(
FunctionalityExposedForExtensions<?> context,
CommandOnTaskContextualized<?> editTaskCommand,
CommandOnTaskContextualized<?> doubleClickCommand,
List<? extends CommandOnTaskContextualized<?>> commandsOnTasksContextualized,
IDisabilityConfiguration disabilityConfiguration) {
TaskList result = new TaskList(context, editTaskCommand, context
TaskList result = new TaskList(context, doubleClickCommand, context
.getDiagramGraph().getTopLevelTasks(),
commandsOnTasksContextualized, disabilityConfiguration);
return result;
@ -195,14 +195,14 @@ public class TaskList extends XulElement implements AfterCompose {
private void addListenerForTaskComponentEditForm(
final TaskComponent taskComponent) {
if (editTaskCommand == null) {
if (doubleClickCommand == null) {
return;
}
taskComponent.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
editTaskCommand.doAction(taskComponent);
doubleClickCommand.doAction(taskComponent);
}
});
}

View file

@ -80,7 +80,7 @@ public class PlannerConfiguration<T> implements IDisabilityConfiguration {
private ICommand<T> goingDownInLastArrowCommand = new NullCommand<T>();
private ICommandOnTask<T> editTaskCommand = new NullCommandOnTask<T>();
private ICommandOnTask<T> doubleClickCommand = new NullCommandOnTask<T>();
private Component chartComponent;
@ -149,13 +149,13 @@ public class PlannerConfiguration<T> implements IDisabilityConfiguration {
this.goingDownInLastArrowCommand = goingDownInLastArrowCommand;
}
public ICommandOnTask<T> getEditTaskCommand() {
return editTaskCommand;
public ICommandOnTask<T> getDoubleClickCommand() {
return doubleClickCommand;
}
public void setEditTaskCommand(ICommandOnTask<T> editTaskCommand) {
public void setDoubleClickCommand(ICommandOnTask<T> editTaskCommand) {
Validate.notNull(editTaskCommand);
this.editTaskCommand = editTaskCommand;
this.doubleClickCommand = editTaskCommand;
}
public void setChartComponent(Component chartComponent) {

View file

@ -173,7 +173,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
configuration
.addCommandOnTask(buildCalendarAllocationCommand(calendarAllocationController));
configuration.setEditTaskCommand(buildEditTaskCommand(editTaskController));
configuration.setDoubleClickCommand(buildEditTaskCommand(editTaskController));
Tabbox chartComponent = new Tabbox();
chartComponent.setOrient("vertical");
chartComponent.setHeight("200px");