mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
fix: improve minor issues in Gantt
This commit is contained in:
parent
55598085f5
commit
870d09d272
@ -662,7 +662,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
|||||||
return colorSet;
|
return colorSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartingDate(Day start) {
|
public void setProjectStartingDate(Day start) {
|
||||||
openClose.setStartingDay(start);
|
openClose.setStartingDay(start);
|
||||||
this.min = start;
|
this.min = start;
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,11 @@ public class SentenceTaskEndsAbsolute extends SentenceSimple {
|
|||||||
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
||||||
final Task task = (Task) subject;
|
final Task task = (Task) subject;
|
||||||
final Day end = (Day) complement;
|
final Day end = (Day) complement;
|
||||||
// final Day startingDate = project.getStartingDate();
|
final Day startingDate = project.getStartingDate();
|
||||||
// if (startingDate == null) {
|
if (startingDate.getAbsoluteDayNum() == 0)
|
||||||
// return CommandExecutionResult.error("No starting date for the project");
|
return CommandExecutionResult.error("No starting date for the project");
|
||||||
// }
|
|
||||||
task.setEnd(end);
|
task.setEnd(end);
|
||||||
|
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,10 +56,10 @@ public class SentenceTaskStarts extends SentenceSimple {
|
|||||||
HColor color = null;
|
HColor color = null;
|
||||||
when = (TaskInstant) complement;
|
when = (TaskInstant) complement;
|
||||||
task.setStart(when.getInstantPrecise());
|
task.setStart(when.getInstantPrecise());
|
||||||
if (when.isTask()) {
|
if (when.isTask())
|
||||||
project.addContraint(new GanttConstraint(project.getIHtmlColorSet(), project.getCurrentStyleBuilder(), when,
|
project.addContraint(new GanttConstraint(project.getIHtmlColorSet(), project.getCurrentStyleBuilder(), when,
|
||||||
new TaskInstant(task, TaskAttribute.START), color));
|
new TaskInstant(task, TaskAttribute.START), color));
|
||||||
}
|
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -50,10 +50,10 @@ public class SentenceTaskStartsAbsolute extends SentenceSimple {
|
|||||||
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
||||||
final Task task = (Task) subject;
|
final Task task = (Task) subject;
|
||||||
final Day start = (Day) complement;
|
final Day start = (Day) complement;
|
||||||
// final Day startingDate = project.getStartingDate();
|
final Day startingDate = project.getStartingDate();
|
||||||
// if (startingDate == null) {
|
if (startingDate.getAbsoluteDayNum() == 0)
|
||||||
// return CommandExecutionResult.error("No starting date for the project");
|
project.setProjectStartingDate(start);
|
||||||
// }
|
|
||||||
task.setStart(start);
|
task.setStart(start);
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class SubjectProject implements Subject {
|
|||||||
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
public CommandExecutionResult execute(GanttDiagram project, Object subject, Object complement) {
|
||||||
final Day start = (Day) complement;
|
final Day start = (Day) complement;
|
||||||
assert project == subject;
|
assert project == subject;
|
||||||
project.setStartingDate(start);
|
project.setProjectStartingDate(start);
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user