mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 13:05:09 +00:00
fix: minor issues
https://github.com/plantuml/plantuml/issues/1367 https://github.com/plantuml/plantuml/issues/1389
This commit is contained in:
parent
6a2ef30d73
commit
e23d7e56fc
@ -51,7 +51,6 @@ public class ErrorStatus {
|
||||
|
||||
// public synchronized void goNoData() {
|
||||
// this.noData = true;
|
||||
//
|
||||
// }
|
||||
|
||||
public synchronized void goWithError() {
|
||||
|
@ -95,4 +95,9 @@ public class HColorGradient extends HColor {
|
||||
return color1.toColor(mapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HColor opposite() {
|
||||
return color1.opposite();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -111,6 +111,10 @@ public abstract class TimeHeaderCalendar extends TimeHeader {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (pending != null)
|
||||
pending.draw(ug, height);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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));
|
||||
return system.getStartingDate().addDays(day);
|
||||
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]+)") //
|
||||
);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 3;
|
||||
final int beta = 4;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user