1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-26 06:46:45 +00:00
Arnaud Roques 2023-04-11 19:57:58 +02:00
parent 6a2ef30d73
commit e23d7e56fc
6 changed files with 36 additions and 5 deletions

View File

@ -51,7 +51,6 @@ public class ErrorStatus {
// public synchronized void goNoData() {
// this.noData = true;
//
// }
public synchronized void goWithError() {

View File

@ -95,4 +95,9 @@ public class HColorGradient extends HColor {
return color1.toColor(mapper);
}
@Override
public HColor opposite() {
return color1.opposite();
}
}

View File

@ -674,6 +674,11 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
return openClose.getStartingDay();
}
public Day getEndingDate() {
initMinMax();
return max;
}
public int daysInWeek() {
return openClose.daysInWeek();
}
@ -772,6 +777,13 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
nameDays.put(day, name);
}
public Day getToday() {
if (today == null)
this.today = Day.today();
return today;
}
public void setTodayColors(CenterBorderColor colors) {
if (today == null)
this.today = Day.today();

View File

@ -111,6 +111,10 @@ public abstract class TimeHeaderCalendar extends TimeHeader {
}
}
if (pending != null)
pending.draw(ug, height);
}
}

View File

@ -75,8 +75,18 @@ public class SubjectDayAsDate implements Subject {
}
private Day resultE(GanttDiagram system, RegexResult arg) {
final int day = Integer.parseInt(arg.get("ECOUNT", 0));
final String type = arg.get("ETYPE", 0).toUpperCase();
final String operation = arg.get("EOPERATION", 0);
int day = Integer.parseInt(arg.get("ECOUNT", 0));
if ("-".equals(operation))
day = -day;
if ("D".equals(type))
return system.getStartingDate().addDays(day);
if ("T".equals(type))
return system.getToday().addDays(day);
if ("E".equals(type))
return system.getEndingDate().addDays(day);
throw new IllegalStateException();
}
public Collection<? extends SentenceSimple> getSentences() {
@ -138,7 +148,8 @@ public class SubjectDayAsDate implements Subject {
private IRegex toRegexE() {
return new RegexConcat( //
new RegexLeaf("[dD]\\+"), //
new RegexLeaf("ETYPE", "([dDtTeE])"), //
new RegexLeaf("EOPERATION", "([-+])"), //
new RegexLeaf("ECOUNT", "([\\d]+)") //
);
}

View File

@ -82,7 +82,7 @@ public class Version {
}
public static int beta() {
final int beta = 3;
final int beta = 4;
return beta;
}