1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-02 00:20:49 +00:00

version 1.2018.10

This commit is contained in:
Arnaud Roques 2018-08-26 14:09:50 +02:00
parent 1a8e4feb6a
commit 4758fa1d66
70 changed files with 515 additions and 180 deletions

View File

@ -35,7 +35,7 @@
<groupId>net.sourceforge.plantuml</groupId> <groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId> <artifactId>plantuml</artifactId>
<version>1.2018.10-SNAPSHOT</version> <version>1.2018.11-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>PlantUML</name> <name>PlantUML</name>

View File

@ -160,5 +160,7 @@ public interface ISkinParam extends ISkinSimple {
public boolean responseMessageBelowArrow(); public boolean responseMessageBelowArrow();
public boolean svgDimensionStyle(); public boolean svgDimensionStyle();
public boolean fixCircleLabelOverlapping();
} }

View File

@ -82,8 +82,18 @@ public class LineLocationImpl implements LineLocation {
return parent; return parent;
} }
private boolean isStandardLibrary() {
return desc.startsWith("<");
}
public int compareTo(LineLocation other) { public int compareTo(LineLocation other) {
final LineLocationImpl other2 = (LineLocationImpl) other; final LineLocationImpl other2 = (LineLocationImpl) other;
if (this.isStandardLibrary() && other2.isStandardLibrary() == false) {
return -1;
}
if (this.isStandardLibrary() == false && other2.isStandardLibrary()) {
return 1;
}
return this.position - other2.position; return this.position - other2.position;
} }

View File

@ -281,6 +281,11 @@ public class Option {
OptionPrint.printLicense(); OptionPrint.printLicense();
} else if (s.equalsIgnoreCase("-checkversion")) { } else if (s.equalsIgnoreCase("-checkversion")) {
OptionPrint.checkVersion(); OptionPrint.checkVersion();
} else if (s.startsWith("-DPLANTUML_LIMIT_SIZE=")) {
final String v = s.substring("-DPLANTUML_LIMIT_SIZE=".length());
if (v.matches("\\d+")) {
System.setProperty("PLANTUML_LIMIT_SIZE", v);
}
} else if (s.startsWith("-D")) { } else if (s.startsWith("-D")) {
manageDefine(s.substring(2)); manageDefine(s.substring(2));
} else if (s.startsWith("-S")) { } else if (s.startsWith("-S")) {

View File

@ -159,7 +159,7 @@ public class OptionPrint {
} }
public static void printLicense() throws InterruptedException { public static void printLicense() throws InterruptedException {
for (String s : License.getCurrent().getText()) { for (String s : License.getCurrent().getText(false)) {
System.out.println(s); System.out.println(s);
} }
exit(); exit();

View File

@ -71,7 +71,6 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt;
import net.sourceforge.plantuml.version.LicenseInfo;
import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemError extends AbstractPSystem { public class PSystemError extends AbstractPSystem {
@ -145,11 +144,10 @@ public class PSystemError extends AbstractPSystem {
} else { } else {
udrawable = result; udrawable = result;
} }
if (LicenseInfo.retrieveQuick().isValid() == false) { final int min = (int) (System.currentTimeMillis() / 60000L) % 60;
final int min = (int) (System.currentTimeMillis() / 60000L) % 60; if (min == 0 /* && LicenseInfo.retrieveQuick().isValid() == false*/ ) {
if (min == 0) { udrawable = addMessage(udrawable);
udrawable = addMessage(udrawable);
}
} }
imageBuilder.setUDrawable(udrawable); imageBuilder.setUDrawable(udrawable);
final ImageData imageData = imageBuilder.writeImageTOBEMOVED(fileFormat, seed(), os); final ImageData imageData = imageBuilder.writeImageTOBEMOVED(fileFormat, seed(), os);

View File

@ -1006,4 +1006,12 @@ public class SkinParam implements ISkinParam {
return true; return true;
} }
public boolean fixCircleLabelOverlapping() {
final String value = getValue("fixcirclelabeloverlapping");
if ("true".equalsIgnoreCase(value)) {
return true;
}
return false;
}
} }

View File

@ -299,4 +299,8 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.swimlaneWrapTitleWidth(); return skinParam.swimlaneWrapTitleWidth();
} }
public boolean fixCircleLabelOverlapping() {
return skinParam.fixCircleLabelOverlapping();
}
} }

View File

@ -317,10 +317,6 @@ public class StringUtils {
return stringsToDisplay.size(); return stringsToDisplay.size();
} }
private static boolean isSpaceOrTab(char c) {
return c == ' ' || c == '\t';
}
public static boolean isDiagramCacheable(String uml) { public static boolean isDiagramCacheable(String uml) {
uml = uml.toLowerCase(); uml = uml.toLowerCase();
if (uml.startsWith("@startuml\nversion\n")) { if (uml.startsWith("@startuml\nversion\n")) {
@ -490,11 +486,11 @@ public class StringUtils {
return arg.toString(); return arg.toString();
} }
int i = 0; int i = 0;
while (i < arg.length() && isSpaceOrTab(arg.charAt(i))) { while (i < arg.length() && isSpaceOrTabOrNull(arg.charAt(i))) {
i++; i++;
} }
int j = arg.length() - 1; int j = arg.length() - 1;
while (j >= i && isSpaceOrTab(arg.charAt(j))) { while (j >= i && isSpaceOrTabOrNull(arg.charAt(j))) {
j--; j--;
} }
if (i == 0 && j == arg.length() - 1) { if (i == 0 && j == arg.length() - 1) {
@ -503,5 +499,9 @@ public class StringUtils {
return arg.subSequence(i, j + 1).toString(); return arg.subSequence(i, j + 1).toString();
} }
private static boolean isSpaceOrTabOrNull(char c) {
return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\0';
}
// http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html // http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html
} }

View File

@ -57,6 +57,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockRecentred; import net.sourceforge.plantuml.graphic.TextBlockRecentred;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
@ -389,10 +390,10 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }
public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor) { public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor, USymbol type) {
manageSwimlaneStrategy(); manageSwimlaneStrategy();
final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor, final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor,
swinlanes.getCurrentSwimlane(), borderColor, nextLinkRenderer()); swinlanes.getCurrentSwimlane(), borderColor, nextLinkRenderer(), type);
current().add(instructionGroup); current().add(instructionGroup);
setCurrent(instructionGroup); setCurrent(instructionGroup);
} }

View File

@ -44,6 +44,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
@ -56,13 +57,15 @@ public class InstructionGroup implements Instruction, InstructionCollection {
private final HtmlColor borderColor; private final HtmlColor borderColor;
private final HtmlColor titleColor; private final HtmlColor titleColor;
private final LinkRendering linkRendering; private final LinkRendering linkRendering;
private final USymbol type;
private final Display test; private final Display test;
private PositionedNote note = null; private PositionedNote note = null;
public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor, public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor,
Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering) { Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering, USymbol type) {
this.list = new InstructionList(swimlane); this.list = new InstructionList(swimlane);
this.type = type;
this.linkRendering = linkRendering; this.linkRendering = linkRendering;
this.parent = parent; this.parent = parent;
this.test = test; this.test = test;
@ -80,7 +83,7 @@ public class InstructionGroup implements Instruction, InstructionCollection {
if (note != null) { if (note != null) {
tmp = new FtileWithNotes(tmp, Collections.singleton(note), factory.skinParam()); tmp = new FtileWithNotes(tmp, Collections.singleton(note), factory.skinParam());
} }
return factory.createGroup(tmp, test, backColor, titleColor, null, borderColor); return factory.createGroup(tmp, test, backColor, titleColor, null, borderColor, type);
} }
public Instruction getParent() { public Instruction getParent() {

View File

@ -42,6 +42,7 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.USymbol;
public class CommandGroup3 extends SingleLineCommand2<ActivityDiagram3> { public class CommandGroup3 extends SingleLineCommand2<ActivityDiagram3> {
@ -59,7 +60,7 @@ public class CommandGroup3 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) {
diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null); diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null, USymbol.FRAME);
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }

View File

@ -47,6 +47,7 @@ import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
@ -59,7 +60,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
static RegexConcat getRegexConcat() { static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), // return new RegexConcat(new RegexLeaf("^"), //
new RegexLeaf("partition"), // new RegexLeaf("TYPE", "(partition|package|rectangle|card)"), //
new RegexLeaf("[%s]+"), // new RegexLeaf("[%s]+"), //
new RegexOptional(// new RegexOptional(//
new RegexConcat( // new RegexConcat( //
@ -73,6 +74,19 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
new RegexLeaf("[%s]*\\{?$")); new RegexLeaf("[%s]*\\{?$"));
} }
private USymbol getUSymbol(String type) {
if ("card".equalsIgnoreCase(type)) {
return USymbol.CARD;
}
if ("package".equalsIgnoreCase(type)) {
return USymbol.PACKAGE;
}
if ("rectangle".equalsIgnoreCase(type)) {
return USymbol.RECTANGLE;
}
return USymbol.FRAME;
}
private static ColorParser color(String id) { private static ColorParser color(String id) {
return ColorParser.simpleColor(ColorType.BACK, id); return ColorParser.simpleColor(ColorType.BACK, id);
} }
@ -101,8 +115,10 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
borderColor = HtmlColorUtils.BLACK; borderColor = HtmlColorUtils.BLACK;
} }
diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor); diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor,
getUSymbol(arg.get("TYPE", 0)));
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }
} }

View File

@ -48,6 +48,7 @@ import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
public interface FtileFactory { public interface FtileFactory {
@ -89,6 +90,6 @@ public interface FtileFactory {
public Ftile createParallel(Swimlane swimlane, List<Ftile> all, ForkStyle style, String label); public Ftile createParallel(Swimlane swimlane, List<Ftile> all, ForkStyle style, String label);
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor); HtmlColor borderColor, USymbol type);
} }

View File

@ -55,6 +55,7 @@ import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
@ -167,8 +168,8 @@ public class FtileFactoryDelegator implements FtileFactory {
} }
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor) { HtmlColor borderColor, USymbol type) {
return factory.createGroup(list, name, backColor, titleColor, note, borderColor); return factory.createGroup(list, name, backColor, titleColor, note, borderColor, type);
} }
public StringBounder getStringBounder() { public StringBounder getStringBounder() {

View File

@ -44,6 +44,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator { public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@ -56,9 +57,9 @@ public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@Override @Override
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor) { HtmlColor borderColor, USymbol type) {
final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow); final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow);
Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor); Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor, type);
if (note != null) { if (note != null) {
result = new FtileWithNotes(result, Collections.singleton(note), skinParam()); result = new FtileWithNotes(result, Collections.singleton(note), skinParam());
} }

View File

@ -75,19 +75,19 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam());
final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
// .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
if (thens.size() > 1) {
if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */)
return FtileIfLongVertical.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile);
return FtileIfLongHorizontal.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile);
}
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
: FontParam.ARROW; : FontParam.ARROW;
final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null) final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null)
.changeColor(fontColor(FontParam.ACTIVITY_DIAMOND)); .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
if (thens.size() > 1) {
if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */)
return FtileIfLongVertical.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile);
return FtileIfLongHorizontal.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile, fcTest);
}
return ConditionalBuilder.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle, return ConditionalBuilder.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle,
thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest); thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest);
} }

View File

@ -77,10 +77,12 @@ public class FtileGroup extends AbstractFtile {
private final HtmlColor borderColor; private final HtmlColor borderColor;
private final HtmlColor backColor; private final HtmlColor backColor;
private final UStroke stroke; private final UStroke stroke;
private final USymbol type;
public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor, public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor,
HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor) { HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor, USymbol type) {
super(inner.skinParam()); super(inner.skinParam());
this.type = type;
this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor; this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor;
this.inner = FtileUtils.addHorizontalMargin(inner, 10); this.inner = FtileUtils.addHorizontalMargin(inner, 10);
this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor; this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor;
@ -196,7 +198,7 @@ public class FtileGroup extends AbstractFtile {
final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow( final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow(
skinParam().shadowing()).withStroke(stroke); skinParam().shadowing()).withStroke(stroke);
USymbol.FRAME.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null), type.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null),
TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext).drawU(ug); TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext).drawU(ug);
final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder); final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder);

View File

@ -142,7 +142,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2, FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) { FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
FontConfiguration fcTest) {
if (afterEndwhile == null) { if (afterEndwhile == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
@ -157,9 +158,9 @@ class FtileIfLongHorizontal extends AbstractFtile {
List<Ftile> diamonds = new ArrayList<Ftile>(); List<Ftile> diamonds = new ArrayList<Ftile>();
List<Double> inlabelSizes = new ArrayList<Double>(); List<Double> inlabelSizes = new ArrayList<Double>();
for (Branch branch : thens) { for (Branch branch : thens) {
final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT, final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
ftileFactory.skinParam()); ftileFactory.skinParam());
final TextBlock tbTest = branch.getLabelTest().create(fc, HorizontalAlignment.LEFT, final TextBlock tbTest = branch.getLabelTest().create(fcTest, HorizontalAlignment.LEFT,
ftileFactory.skinParam()); ftileFactory.skinParam());
final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor(); final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
@ -169,7 +170,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
if (Display.isNull(branch.getInlabel())) { if (Display.isNull(branch.getInlabel())) {
inlabelSizes.add(0.0); inlabelSizes.add(0.0);
} else { } else {
tbInlabel = branch.getInlabel().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); tbInlabel = branch.getInlabel().create(fcArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
inlabelSizes.add(tbInlabel.calculateDimension(ftileFactory.getStringBounder()).getWidth()); inlabelSizes.add(tbInlabel.calculateDimension(ftileFactory.getStringBounder()).getWidth());
diamond = diamond.withWest(tbInlabel); diamond = diamond.withWest(tbInlabel);
} }
@ -177,7 +178,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
diamonds.add(diamond); diamonds.add(diamond);
} }
final TextBlock tb2 = branch2.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final TextBlock tb2 = branch2.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
ftileFactory.skinParam());
final int last = diamonds.size() - 1; final int last = diamonds.size() - 1;
diamonds.set(last, ((FtileDiamondInside2) diamonds.get(last)).withEast(tb2)); diamonds.set(last, ((FtileDiamondInside2) diamonds.get(last)).withEast(tb2));
@ -477,7 +479,6 @@ class FtileIfLongHorizontal extends AbstractFtile {
return Collections.unmodifiableList(result); return Collections.unmodifiableList(result);
} }
@Override @Override
public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) {
if (child == tile2) { if (child == tile2) {

View File

@ -63,6 +63,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFont;
@ -149,7 +150,7 @@ public class VCompactFactory implements FtileFactory {
} }
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor) { HtmlColor borderColor, USymbol type) {
return list; return list;
} }

View File

@ -47,8 +47,6 @@ import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2;
import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2.Mode; import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2.Mode;
import net.sourceforge.plantuml.classdiagram.command.CommandDiamondAssociation; import net.sourceforge.plantuml.classdiagram.command.CommandDiamondAssociation;
import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2; import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2;
import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificClass;
import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificStereotype;
import net.sourceforge.plantuml.classdiagram.command.CommandImport; import net.sourceforge.plantuml.classdiagram.command.CommandImport;
import net.sourceforge.plantuml.classdiagram.command.CommandLayoutNewLine; import net.sourceforge.plantuml.classdiagram.command.CommandLayoutNewLine;
import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass;

View File

@ -102,7 +102,7 @@ public class ArobaseStringCompressor implements StringCompressor {
} }
private String clean(String s) { private String clean(String s) {
s = s.replace("\0", ""); // s = s.replace("\0", "");
s = StringUtils.trin(s); s = StringUtils.trin(s);
s = clean1(s); s = clean1(s);
s = s.replaceAll("@enduml[^\\n\\r]*", ""); s = s.replaceAll("@enduml[^\\n\\r]*", "");

View File

@ -50,9 +50,9 @@ public class ArobaseStringCompressor2 implements StringCompressor {
} }
private String clean2(String s) { private String clean2(String s) {
s = s.replace("\0", ""); // s = s.replace("\0", "");
s = StringUtils.trin(s); s = StringUtils.trin(s);
s = s.replace("\r", "").replaceAll("\n+$", ""); // s = s.replace("\r", "").replaceAll("\n+$", "");
if (s.startsWith("@start")) { if (s.startsWith("@start")) {
return s; return s;
} }

View File

@ -79,7 +79,7 @@ public class CommandMultilinesLegend extends CommandMultilines2<UmlDiagram> {
if (alignment == null) { if (alignment == null) {
alignment = HorizontalAlignment.CENTER; alignment = HorizontalAlignment.CENTER;
} }
diagram.setLegend(DisplayPositionned.single(strings, alignment, valignment)); diagram.setLegend(DisplayPositionned.single(strings.replaceBackslashT(), alignment, valignment));
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }
return CommandExecutionResult.error("No legend defined"); return CommandExecutionResult.error("No legend defined");

View File

@ -57,7 +57,7 @@ public class CommandMultilinesTitle extends CommandMultilines<UmlDiagram> {
lines = lines.removeEmptyColumns(); lines = lines.removeEmptyColumns();
final Display strings = lines.toDisplay(); final Display strings = lines.toDisplay();
if (strings.size() > 0) { if (strings.size() > 0) {
diagram.setTitle(DisplayPositionned.single(strings, HorizontalAlignment.CENTER, VerticalAlignment.TOP)); diagram.setTitle(DisplayPositionned.single(strings.replaceBackslashT(), HorizontalAlignment.CENTER, VerticalAlignment.TOP));
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }
return CommandExecutionResult.error("No title defined"); return CommandExecutionResult.error("No title defined");

View File

@ -51,6 +51,8 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.FileSystem;
import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.code.Base64Coder; import net.sourceforge.plantuml.code.Base64Coder;
import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.ImgValign; import net.sourceforge.plantuml.graphic.ImgValign;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
@ -70,6 +72,15 @@ public class AtomImg implements Atom {
this.scale = scale; this.scale = scale;
} }
public static Atom createQrcode(String flash, double scale) {
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
BufferedImage im = utils.exportFlashcode(flash);
if (im == null) {
im = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
}
return new AtomImg(new UImage(im).scaleNearestNeighbor(scale).getImage(), 1);
}
public static Atom create(String src, final ImgValign valign, final int vspace, final double scale) { public static Atom create(String src, final ImgValign valign, final int vspace, final double scale) {
final UFont font = UFont.monospaced(14); final UFont font = UFont.monospaced(14);
final FontConfiguration fc = FontConfiguration.blackBlueTrue(font); final FontConfiguration fc = FontConfiguration.blackBlueTrue(font);

View File

@ -70,7 +70,7 @@ public class CommandCreoleImg implements Command {
throw new IllegalStateException(); throw new IllegalStateException();
} }
String src = m.group(2); String src = m.group(2);
final double scale = getScale(m.group(3)); final double scale = getScale(m.group(3), 1);
if (src.toLowerCase().startsWith("src=")) { if (src.toLowerCase().startsWith("src=")) {
src = src.substring(4); src = src.substring(4);
} }
@ -79,16 +79,16 @@ public class CommandCreoleImg implements Command {
return line.substring(m.group(1).length()); return line.substring(m.group(1).length());
} }
public static double getScale(String s) { public static double getScale(String s, double def) {
if (s == null) { if (s == null) {
return 1; return def;
} }
final Pattern p = Pattern.compile("(?:scale=|\\*)([0-9.]+)"); final Pattern p = Pattern.compile("(?:scale=|\\*)([0-9.]+)");
final Matcher m = p.matcher(s); final Matcher m = p.matcher(s);
if (m.find()) { if (m.find()) {
return Double.parseDouble(m.group(1)); return Double.parseDouble(m.group(1));
} }
return 1; return def;
} }
} }

View File

@ -0,0 +1,74 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML 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 General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.creole;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.graphic.Splitter;
public class CommandCreoleQrcode implements Command {
private final Pattern2 pattern;
private CommandCreoleQrcode(String p) {
this.pattern = MyPattern.cmpile(p);
}
public static Command create() {
return new CommandCreoleQrcode("^(?i)(" + Splitter.qrcodePattern + ")");
}
public int matchingSize(String line) {
final Matcher2 m = pattern.matcher(line);
if (m.find() == false) {
return 0;
}
return m.group(1).length();
}
public String executeAndGetRemaining(String line, StripeSimple stripe) {
final Matcher2 m = pattern.matcher(line);
if (m.find() == false) {
throw new IllegalStateException();
}
final String src = m.group(2);
final double scale = CommandCreoleImg.getScale(m.group(3), 3);
stripe.addQrcode(src, scale);
return line.substring(m.group(1).length());
}
}

View File

@ -66,7 +66,7 @@ public class CommandCreoleSprite implements Command {
throw new IllegalStateException(); throw new IllegalStateException();
} }
final String src = m.group(2); final String src = m.group(2);
final double scale = CommandCreoleImg.getScale(m.group(3)); final double scale = CommandCreoleImg.getScale(m.group(3), 1);
stripe.addSprite(src, scale); stripe.addSprite(src, scale);
return line.substring(m.group(1).length()); return line.substring(m.group(1).length());
} }

View File

@ -113,6 +113,7 @@ public class StripeSimple implements Stripe {
this.commands.add(CommandCreoleExposantChange.create(FontPosition.EXPOSANT)); this.commands.add(CommandCreoleExposantChange.create(FontPosition.EXPOSANT));
this.commands.add(CommandCreoleExposantChange.create(FontPosition.INDICE)); this.commands.add(CommandCreoleExposantChange.create(FontPosition.INDICE));
this.commands.add(CommandCreoleImg.create()); this.commands.add(CommandCreoleImg.create());
this.commands.add(CommandCreoleQrcode.create());
this.commands.add(CommandCreoleOpenIcon.create()); this.commands.add(CommandCreoleOpenIcon.create());
final double scale = skinParam.getDpi() / 96.0; final double scale = skinParam.getDpi() / 96.0;
this.commands.add(CommandCreoleMath.create(scale)); this.commands.add(CommandCreoleMath.create(scale));
@ -168,6 +169,10 @@ public class StripeSimple implements Stripe {
atoms.add(AtomImg.create(src, ImgValign.TOP, 0, scale)); atoms.add(AtomImg.create(src, ImgValign.TOP, 0, scale));
} }
public void addQrcode(String src, double scale) {
atoms.add(AtomImg.createQrcode(src, scale));
}
public void addSpace(int size) { public void addSpace(int size) {
atoms.add(AtomSpace.create(size)); atoms.add(AtomSpace.create(size));
} }

View File

@ -83,6 +83,17 @@ public class Display implements Iterable<CharSequence> {
public final static Display NULL = new Display(null, null, true, CreoleMode.FULL); public final static Display NULL = new Display(null, null, true, CreoleMode.FULL);
public Display replaceBackslashT() {
final Display result = new Display(this, defaultCreoleMode);
for (int i = 0; i < result.display.size(); i++) {
final CharSequence s = display.get(i);
if (s.toString().contains("\\t")) {
result.display.set(i, s.toString().replace("\\t", "\t"));
}
}
return result;
}
public Display replace(String src, String dest) { public Display replace(String src, String dest) {
final List<CharSequence> newDisplay = new ArrayList<CharSequence>(); final List<CharSequence> newDisplay = new ArrayList<CharSequence>();
for (CharSequence cs : display) { for (CharSequence cs : display) {

View File

@ -470,9 +470,9 @@ final class EntityImpl implements ILeaf, IGroup {
if (getLeafType() == LeafType.CIRCLE) { if (getLeafType() == LeafType.CIRCLE) {
return USymbol.INTERFACE; return USymbol.INTERFACE;
} }
if (symbol != null && stereotype != null && stereotype.getSprite() != null) { // if (symbol != null && stereotype != null && stereotype.getSprite() != null) {
return symbol.withStereoAlignment(HorizontalAlignment.RIGHT); // return symbol.withStereoAlignment(HorizontalAlignment.RIGHT);
} // }
return symbol; return symbol;
} }
@ -520,7 +520,7 @@ final class EntityImpl implements ILeaf, IGroup {
} }
return isRemovedInternal(); return isRemovedInternal();
} }
private boolean isRemovedInternal() { private boolean isRemovedInternal() {
if (isGroup()) { if (isGroup()) {
if (entityFactory.isRemoved(this)) { if (entityFactory.isRemoved(this)) {
@ -544,8 +544,6 @@ final class EntityImpl implements ILeaf, IGroup {
return entityFactory.isRemoved(this); return entityFactory.isRemoved(this);
} }
private int layer; private int layer;
public int getHectorLayer() { public int getHectorLayer() {

View File

@ -68,20 +68,20 @@ import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemDonors extends AbstractPSystem { public class PSystemDonors extends AbstractPSystem {
public static final String DONORS = "6wW70AmEU9ELAuNYZT_MZn6AGOgeeHNOWjgQuZoZA1P0SxnDhXdMoRgDdR45mND5SGKL8Az2C-THCiPX" public static final String DONORS = "6-e702mEU9F9PHN1hXQZLurLW-3nVtlrrwZeRZDYIgOGkdS8eIVXBunYGbPF5d9zqTbiGjQCIJSsPpZF"
+ "qGYJjjcQVk6-VTu2CLLilsL2UtyTQ4BoLZ2km4tbpF_b0XiJv0R8GZti1NIZZNlZcZIc_NyMPXz_WHRm" + "A8e5KEDPF_rXcvjTUFPkr2_5d-Bb2uKfAihW7jk4J2TYN0HFczUtrCbQaWS9fxkw5F0d590ld4unVmxG"
+ "DBfiMLGwq5cTNHLD233np1odb9A7OjnVaSBNZIs0buu7kTfO7U4RgRFlr0AQj6RJa9are5X6YaJpiT7Q" + "btJi7RlLOhTFYHKwl0ze0boDFjOibEWOhUzKgS55ft-TKrAJLZ6kIQJOQiSMsEI4XsnDicFoHCRVT-e9"
+ "SO3jOnWuqM5T7JOGEvGuw1kC0-eRCKh65JJ8ZE9cRAZcdIS4J3YXmavyKPAQeuLaHXawq65jWGAyFnC4" + "rBIMfY4zLq2npoaINIxxMXq6K3v10eSNYrYmmSoXv8FRGAlNHWnhimWQqgkeZGtc37b2m-205lRbYpB9"
+ "n3uffoHdAsy32hR85ZKDahhmkZDTx1-MKe7yqd0ATB0Sj0Ae0F8Vw8O_PvkvnBcENL4pv5qPvx9no6kz" + "yHQoiihGviNY3XJO_4q0aEcdh2OnMnuCAD0YMbGrMABpuwQxC0_3KlwSQ3WB5XOMb0BLOEG_w0QVtfOy"
+ "Lx6_UQ2liwuCb9VDYvdnMdvKjnRIEUMwng-k1lcX8IjxUnXhlBA4yFnlBeNsnG8wFe2EjOQAyVV3-Sr2" + "nRdcNb5Bo5iIhxGnrBUKLtWsBVhQSqcWN5P7oNJn_b5rBQJIyXpdlSO6kMl8oDakMevNzX3U_imbONvA"
+ "6eJ7bBgGWtFopdOJ0R7AKbZeNLnIBV3pBccnkbWUpLayH_lNXLOoi8Ch5fkXZsi5irldZ9AgeVvvoQkk" + "0VmmT6nCL18_NxQ1XJG8TqizaKVcnCbTYu3Pa5Asy5DCMSs_eqjCLXFBsy3YFkg_pZTb1Lh8IkGsz8PM"
+ "urFacg1PtfVeHx9fIFp_BSqCqXsqteGFrwM8KgMlhAh5HHU1qw1_Gsu1kGFLq-JHTLg-9Bxt1-JUUv50" + "88zspaWf3VNtjxoQEh-BM1Cmc_SbwfFPD2J-vswfPbGSeBKXlA7BWg8mIwfACO48N6RwD-GcG7gWUfay"
+ "53OJx9-wPjIdtBo4UM9Bfwfu01Zl4kr6X_CWCuYg0rq7bMTas5s_tQHdsBGnTcxqYdhJRWnT7zDfoitq" + "YfVbjyIrFo1ugvA1o6r6f7ygNgYx74AOZgLEbcW1J7OfPUF5weKU8ZenkemepqYRkwwJISsoHSV4RL87"
+ "tLpWCmo3icWE7DRUuYZWFfnG3gsMRwleDjVmRbkanZiPxAzXpWYapuXo76bBfazrb9dbiUHDNUBTt2x-" + "srM3COYZEasvqNsQ2zpTCA3cpVv1snkiOjpB2UVwlLjfMWKmbtktd2ojPp1Ghp2dXQNFY78Oqaxfxkee"
+ "F7JnJ-yMjT1vT_j7wljDVYMrr2F6esimz9PTrczjikXOG6prZ0Kk0tPgjnkJ0vNSGgSsd1KznGbOzxRE" + "aUMnnQ4kiOVRoC935_vnJsDHrutxRzu_7J8VVdwbAQcN63vfqEmjGTPd-qII9n3s56z3E3BkW-CZoO6Q"
+ "mN4jWukcTREIdQcT73Dh1nskINx8qO1HqPr83hwsEoFFU1G5zYVddLZrKD-757yNK2o62PvIeMmZfEWA" + "7F5YjfpX6DW2m6uihjtra9XRGrNM8pkjQGbJaw_kGYNuOJw1kU8MaImsbZiXphWjYkmJyqwCUjNxMPAd"
+ "czF9f76hPzmTl8zRcozKj_7DXIS4XH-RQDDoWzUd0FSK-a5J1v0wgrNoqiR42E1tVFq6FS-j3ZpAQ6cL" + "1HIDMGLFQQ6CEIGfmfO5PCXSbPvEcy3sJHiMv2ggC_6eGU5Z5QrQRF1W2d7_mbreQa3MMQcGIvia1l3h"
+ "SNQv8PRIf_S8y1ioyahsjhkX10q0"; + "pw_5SzTraF5RBQqY3f3E9I642dUwxPKWarBf7_yiyzSFivDP4jBlTNue0SpBQhfNr955-XS0";
@Override @Override
final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed)
@ -94,7 +94,7 @@ public class PSystemDonors extends AbstractPSystem {
} }
private UDrawable getGraphicStrings() throws IOException { private UDrawable getGraphicStrings() throws IOException {
final List<TextBlock> cols = getCols(getDonors(), 4, 5); final List<TextBlock> cols = getCols(getDonors(), 6, 5);
return new UDrawable() { return new UDrawable() {
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
final TextBlockBackcolored header = GraphicStrings.createBlackOnWhite(Arrays final TextBlockBackcolored header = GraphicStrings.createBlackOnWhite(Arrays

View File

@ -50,7 +50,12 @@ import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
public class FlashCodeUtilsZxing implements FlashCodeUtils { public class FlashCodeUtilsZxing implements FlashCodeUtils {
private static final boolean USE_FLASH = true;
public BufferedImage exportFlashcode(String s) { public BufferedImage exportFlashcode(String s) {
if (USE_FLASH == false) {
return null;
}
try { try {
final QRCodeWriter writer = new QRCodeWriter(); final QRCodeWriter writer = new QRCodeWriter();
final Hashtable hints = new Hashtable(); final Hashtable hints = new Hashtable();

View File

@ -48,6 +48,12 @@ public class HtmlColorGradient implements HtmlColor {
if (color1 == null || color2 == null) { if (color1 == null || color2 == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
if (color1 instanceof HtmlColorGradient) {
color1 = ((HtmlColorGradient) color1).color1;
}
if (color2 instanceof HtmlColorGradient) {
color2 = ((HtmlColorGradient) color2).color2;
}
this.color1 = color1; this.color1 = color1;
this.color2 = color2; this.color2 = color2;
this.policy = policy; this.policy = policy;

View File

@ -257,7 +257,9 @@ public class QuoteUtils {
"Zl ernyvgl vf whfg qvssrerag guna lbhef", "Zl ernyvgl vf whfg qvssrerag guna lbhef",
"Uvfgbel vf n avtugzner sebz juvpu V nz gelvat gb njnxr", "Uvfgbel vf n avtugzner sebz juvpu V nz gelvat gb njnxr",
"L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf", "L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf",
"Gb ree vf uhzna, ohg gb ernyyl sbhy guvatf hc erdhverf n pbzchgre."); "Gb ree vf uhzna, ohg gb ernyyl sbhy guvatf hc erdhverf n pbzchgre.",
"Vs lbh oryvrir rirelguvat lbh ernq, lbh orggre abg ernq",
"Gurer vf ab ceboyrz fb onq lbh pna'g znxr vg jbefr");
private QuoteUtils() { private QuoteUtils() {
} }

View File

@ -57,6 +57,7 @@ public class Splitter {
public static final String fontSizePattern2 = "\\<size[\\s:]+(\\d+)[%s]*\\>"; public static final String fontSizePattern2 = "\\<size[\\s:]+(\\d+)[%s]*\\>";
static final String fontSup = "\\<sup\\>"; static final String fontSup = "\\<sup\\>";
static final String fontSub = "\\<sub\\>"; static final String fontSub = "\\<sub\\>";
public static final String qrcodePattern = "\\<qrcode[\\s:]+([^>{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>";
static final String imgPattern = "\\<img\\s+(src[%s]*=[%s]*[%q%g]?[^\\s%g>]+[%q%g]?[%s]*|vspace\\s*=\\s*[%q%g]?\\d+[%q%g]?\\s*|valign[%s]*=[%s]*[%q%g]?(top|middle|bottom)[%q%g]?[%s]*)+\\>"; static final String imgPattern = "\\<img\\s+(src[%s]*=[%s]*[%q%g]?[^\\s%g>]+[%q%g]?[%s]*|vspace\\s*=\\s*[%q%g]?\\d+[%q%g]?\\s*|valign[%s]*=[%s]*[%q%g]?(top|middle|bottom)[%q%g]?[%s]*)+\\>";
public static final String imgPatternNoSrcColon = "\\<img[\\s:]+([^>{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>"; public static final String imgPatternNoSrcColon = "\\<img[\\s:]+([^>{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>";
public static final String fontFamilyPattern = "\\<font[\\s:]+([^>]+)/?\\>"; public static final String fontFamilyPattern = "\\<font[\\s:]+([^>]+)/?\\>";
@ -97,6 +98,8 @@ public class Splitter {
sb.append('|'); sb.append('|');
sb.append(endSupSub); sb.append(endSupSub);
sb.append('|'); sb.append('|');
sb.append(qrcodePattern);
sb.append('|');
sb.append(imgPattern); sb.append(imgPattern);
sb.append('|'); sb.append('|');
sb.append(imgPatternNoSrcColon); sb.append(imgPatternNoSrcColon);

View File

@ -54,7 +54,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker;
import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -162,7 +162,7 @@ public class CucaDiagramFileMakerHectorB1 implements CucaDiagramFileMaker {
} }
private IEntityImage computeImage(final ILeaf leaf) { private IEntityImage computeImage(final ILeaf leaf) {
final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks()); false, diagram, null, null, null, diagram.getLinks());
return image; return image;
} }

View File

@ -43,7 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.hector2.layering.Layer; import net.sourceforge.plantuml.hector2.layering.Layer;
import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.IEntityImage;
public class Foo1 { public class Foo1 {
@ -59,7 +59,7 @@ public class Foo1 {
} }
private static IEntityImage computeImage(final ILeaf leaf, CucaDiagram diagram) { private static IEntityImage computeImage(final ILeaf leaf, CucaDiagram diagram) {
final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks()); false, diagram, null, null, null, diagram.getLinks());
return image; return image;
} }

View File

@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.hector2.MinMax; import net.sourceforge.plantuml.hector2.MinMax;
import net.sourceforge.plantuml.hector2.layering.Layer; import net.sourceforge.plantuml.hector2.layering.Layer;
import net.sourceforge.plantuml.hector2.mpos.Distribution; import net.sourceforge.plantuml.hector2.mpos.Distribution;
import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
@ -100,7 +100,7 @@ public class Foo2 extends AbstractTextBlock implements TextBlock {
} }
private IEntityImage computeImage(final ILeaf leaf) { private IEntityImage computeImage(final ILeaf leaf) {
final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks()); false, diagram, null, null, null, diagram.getLinks());
return image; return image;
} }

View File

@ -99,7 +99,7 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Bibliotekon;
import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.Cluster;
import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker;
import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.DotStringFactory; import net.sourceforge.plantuml.svek.DotStringFactory;
import net.sourceforge.plantuml.svek.GraphvizCrash; import net.sourceforge.plantuml.svek.GraphvizCrash;
import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.IEntityImage;
@ -594,7 +594,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
// skinParam = new SkinParamSameClassWidth(dotData.getSkinParam(), width); // skinParam = new SkinParamSameClassWidth(dotData.getSkinParam(), width);
} }
return DotDataImageBuilder.createEntityImageBlock(ent, skinParam, diagram.isHideEmptyDescriptionForState(), return GeneralImageBuilder.createEntityImageBlock(ent, skinParam, diagram.isHideEmptyDescriptionForState(),
diagram, getBibliotekon(), null, diagram.getUmlDiagramType(), diagram.getLinks()); diagram, getBibliotekon(), null, diagram.getUmlDiagramType(), diagram.getLinks());
} }
return ent.getSvekImage(); return ent.getSvekImage();

View File

@ -0,0 +1,38 @@
@startuml
interface Positionable {
+ Dimension2D getSize();
+ Point2D getPosition();
}
interface Clusterable {
+Cluster getParent();
}
Positionable <|-- Clusterable
class Cluster
Cluster *-- Cluster : subclusters
Clusterable <|.. Cluster
Cluster *-- Block
Clusterable <|.. Block
Path *-- "2" Cluster
Path --> Label : has one
Positionable <|-- Label
SimpleDrawer --> Cluster
SimpleDrawer *--> Path
class GraphvizSolver {
+ Dimension2D solve(Cluster root, Collection<Path> paths)
}
GraphvizSolver --> Cluster
GraphvizSolver *--> Path
'Clusterable --> Cluster : Parent
@enduml

View File

@ -37,28 +37,108 @@
package net.sourceforge.plantuml.preproc; package net.sourceforge.plantuml.preproc;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import net.sourceforge.plantuml.FileSystem;
import net.sourceforge.plantuml.Log;
public class FileWithSuffix { public class FileWithSuffix {
private final File file; private final File file;
private final String suffix; private final String suffix;
private final String entry;
public Reader getReader(String charset) throws IOException {
if (entry == null) {
if (charset == null) {
Log.info("Using default charset");
return new FileReader(file);
}
Log.info("Using charset " + charset);
return new InputStreamReader(new FileInputStream(file), charset);
}
final InputStream is = getDataFromZip(file, entry);
if (is == null) {
return null;
}
if (charset == null) {
Log.info("Using default charset");
return new InputStreamReader(is);
}
Log.info("Using charset " + charset);
return new InputStreamReader(is, charset);
}
private InputStream getDataFromZip(File f, String name) throws IOException {
final ZipInputStream zis = new ZipInputStream(new FileInputStream(f));
ZipEntry ze = zis.getNextEntry();
while (ze != null) {
final String fileName = ze.getName();
if (ze.isDirectory()) {
} else if (fileName.equals(name)) {
return zis;
}
ze = zis.getNextEntry();
}
zis.closeEntry();
zis.close();
return null;
}
public boolean fileOk() {
if (file.exists() == false || file.isDirectory()) {
return false;
}
return true;
}
public FileWithSuffix(File file, String suffix) { public FileWithSuffix(File file, String suffix) {
this.file = file; this.file = file;
this.suffix = suffix; this.suffix = suffix;
this.entry = null;
}
public FileWithSuffix(String fileName, String suffix) throws IOException {
final int idx = fileName.indexOf('~');
this.suffix = suffix;
if (idx == -1) {
this.file = FileSystem.getInstance().getFile(fileName);
this.entry = null;
} else {
this.file = FileSystem.getInstance().getFile(fileName.substring(0, idx));
this.entry = fileName.substring(idx + 1);
}
} }
@Override @Override
public int hashCode() { public int hashCode() {
return file.hashCode() + (suffix == null ? 0 : suffix.hashCode() * 43); return file.hashCode() + (suffix == null ? 0 : suffix.hashCode() * 43) + (entry == null ? 0 : entry.hashCode());
} }
@Override @Override
public boolean equals(Object arg) { public boolean equals(Object arg) {
final FileWithSuffix other = (FileWithSuffix) arg; final FileWithSuffix other = (FileWithSuffix) arg;
return this.file.equals(other.file) && equals(suffix, other.suffix); return this.file.equals(other.file) && equals(suffix, other.suffix) && same(entry, other.entry);
}
private static boolean same(String s1, String s2) {
if (s1 == null && s2 == null) {
return true;
}
if (s1 != null && s2 != null) {
return s1.equals(s2);
}
return false;
} }
private static boolean equals(String s1, String s2) { private static boolean equals(String s1, String s2) {
@ -80,4 +160,23 @@ public class FileWithSuffix {
return result; return result;
} }
public final File getFile() {
return file;
}
public File getParentFile() {
return file.getParentFile();
}
public String getDescription() {
if (entry == null) {
return file.getAbsolutePath();
}
return file.getAbsolutePath() + "~" + entry;
}
public final String getSuffix() {
return suffix;
}
} }

View File

@ -37,11 +37,10 @@
package net.sourceforge.plantuml.preproc; package net.sourceforge.plantuml.preproc;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.Reader;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -149,7 +148,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
if (s == null) { if (s == null) {
return null; return null;
} }
if (OptionFlags.ALLOW_INCLUDE) { if (s.getPreprocessorError() == null && OptionFlags.ALLOW_INCLUDE) {
assert included == null; assert included == null;
final Matcher2 m1 = includePattern.matcher(s); final Matcher2 m1 = includePattern.matcher(s);
if (m1.find()) { if (m1.find()) {
@ -188,7 +187,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
} }
try { try {
final URL url = new URL(urlString); final URL url = new URL(urlString);
included = new PreprocessorInclude(config, getReaderInclude(s, url, suf), defines, charset, null, included = new PreprocessorInclude(config, getReaderInclude(url, s, suf), defines, charset, null,
filesUsedCurrent, filesUsedGlobal, definitionsContainer); filesUsedCurrent, filesUsedGlobal, definitionsContainer);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
return s.withErrorPreprocessor("Cannot include url " + urlString); return s.withErrorPreprocessor("Cannot include url " + urlString);
@ -222,17 +221,17 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
suf = fileName.substring(idx + 1); suf = fileName.substring(idx + 1);
fileName = fileName.substring(0, idx); fileName = fileName.substring(0, idx);
} }
final File f = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName)); // final File f = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
final FileWithSuffix f2 = new FileWithSuffix(f, suf); final FileWithSuffix f2 = new FileWithSuffix(withEnvironmentVariable(fileName), suf);
if (f.exists() == false || f.isDirectory()) { if (f2.fileOk() == false) {
return s.withErrorPreprocessor("Cannot include " + f.getAbsolutePath()); return s.withErrorPreprocessor("Cannot include " + f2.getFile().getAbsolutePath());
} else if (allowMany == false && filesUsedCurrent.contains(f2)) { } else if (allowMany == false && filesUsedCurrent.contains(f2)) {
// return CharSequence2Impl.errorPreprocessor("File already included " + f.getAbsolutePath(), lineLocation); // return CharSequence2Impl.errorPreprocessor("File already included " + f.getAbsolutePath(), lineLocation);
return this.readLine(); return this.readLine();
} }
filesUsedCurrent.add(f2); filesUsedCurrent.add(f2);
filesUsedGlobal.add(f2); filesUsedGlobal.add(f2);
included = new PreprocessorInclude(config, getReaderInclude(s, f, suf), defines, charset, f.getParentFile(), included = new PreprocessorInclude(config, getReaderInclude(f2, s), defines, charset, f2.getParentFile(),
filesUsedCurrent, filesUsedGlobal, definitionsContainer); filesUsedCurrent, filesUsedGlobal, definitionsContainer);
return this.readLine(); return this.readLine();
} }
@ -280,9 +279,9 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
} }
final String description = "<" + filename + ">"; final String description = "<" + filename + ">";
try { try {
if (StartDiagramExtractReader.containsStartDiagram(s, is, description)) { if (StartDiagramExtractReader.containsStartDiagram(is, s, description)) {
is = getStdlibInputStream(filename); is = getStdlibInputStream(filename);
return new StartDiagramExtractReader(s, is, description); return StartDiagramExtractReader.build(is, s, description);
} }
is = getStdlibInputStream(filename); is = getStdlibInputStream(filename);
if (is == null) { if (is == null) {
@ -290,32 +289,32 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
} }
return ReadLineReader.create(new InputStreamReader(is), description); return ReadLineReader.create(new InputStreamReader(is), description);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
return new ReadLineSimple(s, e.toString()); return new ReadLineSimple(s, e.toString());
} }
} }
private ReadLine getReaderInclude(CharSequence2 s, final File f, String suf) { private ReadLine getReaderInclude(FileWithSuffix f2, CharSequence2 s) {
try { try {
if (StartDiagramExtractReader.containsStartDiagram(s, f, charset)) { if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) {
return new StartDiagramExtractReader(s, f, suf, charset); return StartDiagramExtractReader.build(f2, s, charset);
} }
if (charset == null) { final Reader reader = f2.getReader(charset);
Log.info("Using default charset"); if (reader == null) {
return ReadLineReader.create(new FileReader(f), f.getAbsolutePath(), s.getLocation()); return new ReadLineSimple(s, "Cannot open " + f2.getDescription());
} }
Log.info("Using charset " + charset); return ReadLineReader.create(reader, f2.getDescription(), s.getLocation());
return ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset), f.getAbsolutePath(),
s.getLocation());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
return new ReadLineSimple(s, e.toString()); return new ReadLineSimple(s, e.toString());
} }
} }
private ReadLine getReaderInclude(CharSequence2 s, final URL url, String suf) { private ReadLine getReaderInclude(final URL url, CharSequence2 s, String suf) {
try { try {
if (StartDiagramExtractReader.containsStartDiagram(s, url, charset)) { if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) {
return new StartDiagramExtractReader(s, url, suf, charset); return StartDiagramExtractReader.build(url, s, suf, charset);
} }
final InputStream is = url.openStream(); final InputStream is = url.openStream();
if (charset == null) { if (charset == null) {
@ -325,6 +324,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
Log.info("Using charset " + charset); Log.info("Using charset " + charset);
return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation()); return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
return new ReadLineSimple(s, e.toString()); return new ReadLineSimple(s, e.toString());
} }

View File

@ -35,12 +35,10 @@
*/ */
package net.sourceforge.plantuml.preproc; package net.sourceforge.plantuml.preproc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL; import java.net.URL;
import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.CharSequence2;
@ -52,16 +50,16 @@ public class StartDiagramExtractReader implements ReadLine {
private final ReadLine raw; private final ReadLine raw;
private boolean finished = false; private boolean finished = false;
public StartDiagramExtractReader(CharSequence2 s, File f, String uid, String charset) { public static StartDiagramExtractReader build(FileWithSuffix f2, CharSequence2 s, String charset) {
this(getReadLine(s, f, charset), uid); return new StartDiagramExtractReader(getReadLine(f2, s, charset), f2.getSuffix());
} }
public StartDiagramExtractReader(CharSequence2 s, URL url, String uid, String charset) { public static StartDiagramExtractReader build(URL url, CharSequence2 s, String uid, String charset) {
this(getReadLine(s, url, charset), uid); return new StartDiagramExtractReader(getReadLine(url, s, charset), uid);
} }
public StartDiagramExtractReader(CharSequence2 s, InputStream is, String desc) { public static StartDiagramExtractReader build(InputStream is, CharSequence2 s, String desc) {
this(getReadLine(s, is, desc), null); return new StartDiagramExtractReader(getReadLine(is, s, desc), null);
} }
private StartDiagramExtractReader(ReadLine raw, String suf) { private StartDiagramExtractReader(ReadLine raw, String suf) {
@ -103,25 +101,23 @@ public class StartDiagramExtractReader implements ReadLine {
return false; return false;
} }
private static ReadLine getReadLine(CharSequence2 s, File f, String charset) { private static ReadLine getReadLine(FileWithSuffix f2, CharSequence2 s, String charset) {
try { try {
if (charset == null) { final Reader tmp1 = f2.getReader(charset);
Log.info("Using default charset"); if (tmp1 == null) {
return new UncommentReadLine(ReadLineReader.create(new FileReader(f), f.getAbsolutePath())); return new ReadLineSimple(s, "Cannot open " + f2.getDescription());
} }
Log.info("Using charset " + charset); return new UncommentReadLine(ReadLineReader.create(tmp1, f2.getDescription()));
return new UncommentReadLine(ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset),
f.getAbsolutePath()));
} catch (IOException e) { } catch (IOException e) {
return new ReadLineSimple(s, e.toString()); return new ReadLineSimple(s, e.toString());
} }
} }
private static ReadLine getReadLine(CharSequence2 s, InputStream is, String description) { private static ReadLine getReadLine(InputStream is, CharSequence2 s, String description) {
return new UncommentReadLine(ReadLineReader.create(new InputStreamReader(is), description)); return new UncommentReadLine(ReadLineReader.create(new InputStreamReader(is), description));
} }
private static ReadLine getReadLine(CharSequence2 s, URL url, String charset) { private static ReadLine getReadLine(URL url, CharSequence2 s, String charset) {
try { try {
if (charset == null) { if (charset == null) {
Log.info("Using default charset"); Log.info("Using default charset");
@ -136,18 +132,18 @@ public class StartDiagramExtractReader implements ReadLine {
} }
} }
static public boolean containsStartDiagram(CharSequence2 s, File f, String charset) throws IOException { static public boolean containsStartDiagram(FileWithSuffix f2, CharSequence2 s, String charset) throws IOException {
final ReadLine r = getReadLine(s, f, charset); final ReadLine r = getReadLine(f2, s, charset);
return containsStartDiagram(r); return containsStartDiagram(r);
} }
static public boolean containsStartDiagram(CharSequence2 s, URL url, String charset) throws IOException { static public boolean containsStartDiagram(URL url, CharSequence2 s, String charset) throws IOException {
final ReadLine r = getReadLine(s, url, charset); final ReadLine r = getReadLine(url, s, charset);
return containsStartDiagram(r); return containsStartDiagram(r);
} }
static public boolean containsStartDiagram(CharSequence2 s, InputStream is, String description) throws IOException { static public boolean containsStartDiagram(InputStream is, CharSequence2 s, String description) throws IOException {
final ReadLine r = getReadLine(s, is, description); final ReadLine r = getReadLine(is, s, description);
return containsStartDiagram(r); return containsStartDiagram(r);
} }

View File

@ -82,7 +82,7 @@ public class CommunicationExoTile implements TileWithUpdateStairs {
arrowConfiguration = arrowConfiguration.reverse(); arrowConfiguration = arrowConfiguration.reverse();
} }
final Component comp = skin.createComponent(ComponentType.ARROW, arrowConfiguration, skinParam, final Component comp = skin.createComponent(ComponentType.ARROW, arrowConfiguration, skinParam,
message.getLabel()); message.getLabelNumbered());
return comp; return comp;
} }

View File

@ -40,6 +40,7 @@ import java.awt.geom.Point2D;
import java.util.Iterator; import java.util.Iterator;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.real.Real;
import net.sourceforge.plantuml.sequencediagram.Event; import net.sourceforge.plantuml.sequencediagram.Event;
@ -101,10 +102,10 @@ public class CommunicationTileSelf implements TileWithUpdateStairs {
if (message.isActivate()) { if (message.isActivate()) {
livingSpace1.addStepForLivebox(getEvent(), y + p2.getY()); livingSpace1.addStepForLivebox(getEvent(), y + p2.getY());
System.err.println("CommunicationTileSelf::updateStairs activate y=" + (y + p2.getY()) + " " + message); Log.info("CommunicationTileSelf::updateStairs activate y=" + (y + p2.getY()) + " " + message);
} else if (message.isDeactivate()) { } else if (message.isDeactivate()) {
livingSpace1.addStepForLivebox(getEvent(), y + p1.getY()); livingSpace1.addStepForLivebox(getEvent(), y + p1.getY());
System.err.println("CommunicationTileSelf::updateStairs deactivate y=" + (y + p1.getY()) + " " + message); Log.info("CommunicationTileSelf::updateStairs deactivate y=" + (y + p1.getY()) + " " + message);
} }
// livingSpace1.addStep(y + arrowY, level1); // livingSpace1.addStep(y + arrowY, level1);
@ -121,8 +122,7 @@ public class CommunicationTileSelf implements TileWithUpdateStairs {
double x1 = getPoint1(stringBounder).getCurrentValue(); double x1 = getPoint1(stringBounder).getCurrentValue();
final int levelIgnore = livingSpace1.getLevelAt(this, EventsHistoryMode.IGNORE_FUTURE_ACTIVATE); final int levelIgnore = livingSpace1.getLevelAt(this, EventsHistoryMode.IGNORE_FUTURE_ACTIVATE);
final int levelConsidere = livingSpace1.getLevelAt(this, EventsHistoryMode.CONSIDERE_FUTURE_DEACTIVATE); final int levelConsidere = livingSpace1.getLevelAt(this, EventsHistoryMode.CONSIDERE_FUTURE_DEACTIVATE);
System.err.println("CommunicationTileSelf::drawU levelIgnore=" + levelIgnore + " levelConsidere=" Log.info("CommunicationTileSelf::drawU levelIgnore=" + levelIgnore + " levelConsidere=" + levelConsidere);
+ levelConsidere);
x1 += CommunicationTile.LIVE_DELTA_SIZE * levelIgnore; x1 += CommunicationTile.LIVE_DELTA_SIZE * levelIgnore;
if (levelIgnore < levelConsidere) { if (levelIgnore < levelConsidere) {
x1 += CommunicationTile.LIVE_DELTA_SIZE; x1 += CommunicationTile.LIVE_DELTA_SIZE;

View File

@ -45,12 +45,11 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
public class EmptyTile implements Tile { public class EmptyTile implements Tile {
private final double height; private final double height;
private final Tile position;
private final Real origin; public EmptyTile(double height, Tile position) {
public EmptyTile(double height, TileArguments tileArguments) {
this.origin = tileArguments.getOrigin();
this.height = height; this.height = height;
this.position = position;
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
@ -64,11 +63,11 @@ public class EmptyTile implements Tile {
} }
public Real getMinX(StringBounder stringBounder) { public Real getMinX(StringBounder stringBounder) {
return origin; return position.getMinX(stringBounder);
} }
public Real getMaxX(StringBounder stringBounder) { public Real getMaxX(StringBounder stringBounder) {
return origin; return position.getMaxX(stringBounder);
} }
public Event getEvent() { public Event getEvent() {

View File

@ -135,6 +135,12 @@ public class EventsHistory {
} }
private SymbolContext getActivateColor(Event event) { private SymbolContext getActivateColor(Event event) {
if (event instanceof LifeEvent) {
final LifeEvent le = (LifeEvent) event;
if (le.isActivate()) {
return le.getSpecificColors();
}
}
for (Iterator<Event> it = events.iterator(); it.hasNext();) { for (Iterator<Event> it = events.iterator(); it.hasNext();) {
final Event current = it.next(); final Event current = it.next();
if (event != current) { if (event != current) {

View File

@ -139,10 +139,11 @@ public class TileBuilder {
tiles.add(new DividerTile(divider, tileArguments)); tiles.add(new DividerTile(divider, tileArguments));
} else if (ev instanceof GroupingStart) { } else if (ev instanceof GroupingStart) {
final GroupingStart start = (GroupingStart) ev; final GroupingStart start = (GroupingStart) ev;
tiles.add(new EmptyTile(4, tileArguments)); final GroupingTile groupingTile = new GroupingTile(it, start, tileArguments.withBackColorGeneral(
tiles.add(new GroupingTile(it, start, tileArguments.withBackColorGeneral(start.getBackColorElement(), start.getBackColorElement(), start.getBackColorGeneral()), tileArguments);
start.getBackColorGeneral()), tileArguments)); tiles.add(new EmptyTile(4, groupingTile));
tiles.add(new EmptyTile(4, tileArguments)); tiles.add(groupingTile);
tiles.add(new EmptyTile(4, groupingTile));
// tiles.add(TileUtils.withMargin(tile, 0, 0, 4, 4); // tiles.add(TileUtils.withMargin(tile, 0, 0, 4, 4);
} else if (ev instanceof GroupingLeaf && ((GroupingLeaf) ev).getType() == GroupingType.ELSE) { } else if (ev instanceof GroupingLeaf && ((GroupingLeaf) ev).getType() == GroupingType.ELSE) {
final GroupingLeaf anElse = (GroupingLeaf) ev; final GroupingLeaf anElse = (GroupingLeaf) ev;

View File

@ -75,12 +75,12 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
} }
} }
private DotDataImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) { private GeneralImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) {
final DotData dotData = new DotData(diagram.getEntityFactory().getRootGroup(), getOrderedLinks(), final DotData dotData = new DotData(diagram.getEntityFactory().getRootGroup(), getOrderedLinks(),
diagram.getLeafsvalues(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, diagram, diagram.getLeafsvalues(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, diagram,
diagram.getColorMapper(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), diagram.getColorMapper(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(),
dotMode, diagram.getNamespaceSeparator(), diagram.getPragma()); dotMode, diagram.getNamespaceSeparator(), diagram.getPragma());
return new DotDataImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(), return new GeneralImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(),
stringBounder); stringBounder);
} }
@ -94,7 +94,7 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
} }
// System.err.println("FOO11 type=" + os.getClass()); // System.err.println("FOO11 type=" + os.getClass());
DotDataImageBuilder svek2 = createDotDataImageBuilder(DotMode.NORMAL, GeneralImageBuilder svek2 = createDotDataImageBuilder(DotMode.NORMAL,
fileFormatOption.getDefaultStringBounder()); fileFormatOption.getDefaultStringBounder());
BaseFile basefile = null; BaseFile basefile = null;
if (fileFormatOption.isDebugSvek() && os instanceof NamedOutputStream) { if (fileFormatOption.isDebugSvek() && os instanceof NamedOutputStream) {

View File

@ -120,7 +120,7 @@ import net.sourceforge.plantuml.svek.image.EntityImageTips;
import net.sourceforge.plantuml.svek.image.EntityImageUseCase; import net.sourceforge.plantuml.svek.image.EntityImageUseCase;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
public final class DotDataImageBuilder { public final class GeneralImageBuilder {
private final DotData dotData; private final DotData dotData;
private final EntityFactory entityFactory; private final EntityFactory entityFactory;
@ -130,7 +130,7 @@ public final class DotDataImageBuilder {
private final StringBounder stringBounder; private final StringBounder stringBounder;
public DotDataImageBuilder(DotData dotData, EntityFactory entityFactory, UmlSource source, Pragma pragma, public GeneralImageBuilder(DotData dotData, EntityFactory entityFactory, UmlSource source, Pragma pragma,
StringBounder stringBounder) { StringBounder stringBounder) {
this.dotData = dotData; this.dotData = dotData;
this.entityFactory = entityFactory; this.entityFactory = entityFactory;

View File

@ -116,7 +116,7 @@ public final class GroupPngMakerActivity {
skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(), false, skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(), false,
DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma()); DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma());
final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(), final GeneralImageBuilder svek2 = new GeneralImageBuilder(dotData, diagram.getEntityFactory(),
diagram.getSource(), diagram.getPragma(), stringBounder); diagram.getSource(), diagram.getPragma(), stringBounder);
if (group.getGroupType() == GroupType.INNER_ACTIVITY) { if (group.getGroupType() == GroupType.INNER_ACTIVITY) {

View File

@ -124,7 +124,7 @@ public final class GroupPngMakerState {
diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(),
diagram.getPragma()); diagram.getPragma());
final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(), final GeneralImageBuilder svek2 = new GeneralImageBuilder(dotData, diagram.getEntityFactory(),
diagram.getSource(), diagram.getPragma(), stringBounder); diagram.getSource(), diagram.getPragma(), stringBounder);
if (group.getGroupType() == GroupType.CONCURRENT_STATE) { if (group.getGroupType() == GroupType.CONCURRENT_STATE) {

View File

@ -101,8 +101,8 @@ public class EntityImageDescription extends AbstractEntityImage {
if (symbol == USymbol.FOLDER) { if (symbol == USymbol.FOLDER) {
this.shapeType = ShapeType.FOLDER; this.shapeType = ShapeType.FOLDER;
} else if (symbol == USymbol.INTERFACE) { } else if (symbol == USymbol.INTERFACE) {
this.shapeType = ShapeType.RECTANGLE; this.shapeType = skinParam.fixCircleLabelOverlapping() ? ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE
// this.shapeType = ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE; : ShapeType.RECTANGLE;
} else { } else {
this.shapeType = ShapeType.RECTANGLE; this.shapeType = ShapeType.RECTANGLE;
} }

View File

@ -71,7 +71,7 @@ class LicenseWindow extends JFrame {
this.setTitle("Licence PlantUML (" + Version.versionString() + ")"); this.setTitle("Licence PlantUML (" + Version.versionString() + ")");
getContentPane().add(getNorthLabel(), BorderLayout.NORTH); getContentPane().add(getNorthLabel(), BorderLayout.NORTH);
final List<String> list = new ArrayList<String>(License.getCurrent().getText()); final List<String> list = new ArrayList<String>(License.getCurrent().getText(false));
getContentPane().add(getJComponent(list), BorderLayout.CENTER); getContentPane().add(getJComponent(list), BorderLayout.CENTER);
getContentPane().add(getSouthLabel(), BorderLayout.SOUTH); getContentPane().add(getSouthLabel(), BorderLayout.SOUTH);

View File

@ -151,6 +151,7 @@ public class LanguageDescriptor {
keyword.add("again"); keyword.add("again");
keyword.add("kill"); keyword.add("kill");
keyword.add("order"); keyword.add("order");
keyword.add("allow_mixing");
preproc.add("!exit"); preproc.add("!exit");
preproc.add("!include"); preproc.add("!include");

View File

@ -45,6 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.HtmlColorGradient;
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
@ -181,7 +182,6 @@ public class SpriteMonochrome implements Sprite {
} }
public UImage toUImage(ColorMapper colorMapper, HtmlColor backcolor, HtmlColor color) { public UImage toUImage(ColorMapper colorMapper, HtmlColor backcolor, HtmlColor color) {
final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
if (backcolor == null) { if (backcolor == null) {
backcolor = HtmlColorUtils.WHITE; backcolor = HtmlColorUtils.WHITE;
@ -189,6 +189,10 @@ public class SpriteMonochrome implements Sprite {
if (color == null) { if (color == null) {
color = HtmlColorUtils.BLACK; color = HtmlColorUtils.BLACK;
} }
// if (backcolor instanceof HtmlColorGradient) {
// return special(colorMapper, (HtmlColorGradient) backcolor, color);
// }
final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
final HtmlColorGradient gradient = new HtmlColorGradient(backcolor, color, '\0'); final HtmlColorGradient gradient = new HtmlColorGradient(backcolor, color, '\0');
for (int col = 0; col < width; col++) { for (int col = 0; col < width; col++) {
for (int line = 0; line < height; line++) { for (int line = 0; line < height; line++) {
@ -200,6 +204,21 @@ public class SpriteMonochrome implements Sprite {
return new UImage(im); return new UImage(im);
} }
private UImage special(ColorMapper colorMapper, HtmlColorGradient backcolor, HtmlColor color) {
final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int col = 0; col < width; col++) {
for (int line = 0; line < height; line++) {
final HtmlColor backColorLocal = new HtmlColorSimple(backcolor.getColor(colorMapper, 1.0 * line
/ height), false);
final HtmlColorGradient gradient = new HtmlColorGradient(backColorLocal, color, '\0');
final double coef = 1.0 * grey[line][col] / (grayLevel - 1);
final Color c = gradient.getColor(colorMapper, coef);
im.setRGB(col, line, c.getRGB());
}
}
return new UImage(im);
}
public TextBlock asTextBlock(final HtmlColor color, final double scale) { public TextBlock asTextBlock(final HtmlColor color, final double scale) {
return new AbstractTextBlock() { return new AbstractTextBlock() {

View File

@ -280,7 +280,7 @@ public enum License {
text.add("textual description in PlantUML language). Those images are not covered by"); text.add("textual description in PlantUML language). Those images are not covered by");
} }
private List<String> getHeaderStart(LicenseInfo licenseInfo) { private List<String> getHeaderStart(LicenseInfo licenseInfo, boolean withQrcode) {
final List<String> text = new ArrayList<String>(); final List<String> text = new ArrayList<String>();
if (licenseInfo.isNone()) { if (licenseInfo.isNone()) {
text.add("========================================================================"); text.add("========================================================================");
@ -304,7 +304,12 @@ public enum License {
text.add(" "); text.add(" ");
text.add("http://plantuml.com/patreon (only 1$ per month!)"); text.add("http://plantuml.com/patreon (only 1$ per month!)");
text.add("http://plantuml.com/paypal"); text.add("http://plantuml.com/paypal");
text.add(" "); if (withQrcode) {
text.add("\t\t<qrcode:http://plantuml.com/patreon>\t\t\t\t<qrcode:http://plantuml.com/paypal>");
} else {
text.add("");
text.add(" ");
}
} }
return text; return text;
} }
@ -451,9 +456,9 @@ public enum License {
return Collections.unmodifiableList(h); return Collections.unmodifiableList(h);
} }
public List<String> getText() { public List<String> getText(boolean withQrcode) {
final LicenseInfo licenseInfo = LicenseInfo.retrieveSlow(); final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick();
final List<String> text = getHeaderStart(licenseInfo); final List<String> text = getHeaderStart(licenseInfo, withQrcode);
if (this == License.GPL) { if (this == License.GPL) {
addGpl(licenseInfo, text); addGpl(licenseInfo, text);
} else if (this == License.GPLV2) { } else if (this == License.GPLV2) {

View File

@ -48,6 +48,7 @@ import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.SignatureUtils; import net.sourceforge.plantuml.SignatureUtils;
import net.sourceforge.plantuml.dedication.Dedication; import net.sourceforge.plantuml.dedication.Dedication;
import net.sourceforge.plantuml.dedication.QBlock; import net.sourceforge.plantuml.dedication.QBlock;
@ -110,6 +111,9 @@ public class LicenseInfo {
public static synchronized LicenseInfo retrieveSlow() { public static synchronized LicenseInfo retrieveSlow() {
cache = LicenseInfo.NONE; cache = LicenseInfo.NONE;
if (OptionFlags.ALLOW_INCLUDE == false) {
return cache;
}
final String key = prefs.get("license", ""); final String key = prefs.get("license", "");
if (key.length() > 0) { if (key.length() > 0) {
cache = setIfValid(retrieve(key), cache); cache = setIfValid(retrieve(key), cache);
@ -153,7 +157,7 @@ public class LicenseInfo {
} }
public static LicenseInfo retrieve(final String key) { public static LicenseInfo retrieve(final String key) {
if (key.matches("^[0-9a-z]+$")) { if (key.length() > 99 && key.matches("^[0-9a-z]+$")) {
try { try {
final BigInteger lu = new BigInteger(key, 36); final BigInteger lu = new BigInteger(key, 36);
final QBlock qb2 = new QBlock(lu); final QBlock qb2 = new QBlock(lu);

View File

@ -90,13 +90,14 @@ public class PSystemKeygen extends AbstractPSystem {
} }
private void drawInternal(UGraphic ug) throws IOException { private void drawInternal(UGraphic ug) throws IOException {
final LicenseInfo installed = LicenseInfo.retrieveSlow();
if (key.length() == 0) { if (key.length() == 0) {
drawFlash(ug); drawFlash(ug, installed);
return; return;
} }
final LicenseInfo info = LicenseInfo.retrieve(key); final LicenseInfo info = LicenseInfo.retrieve(key);
if (info.isNone()) { if (info.isNone()) {
drawFlash(ug); drawFlash(ug, installed);
return; return;
} }
final List<String> strings = header(); final List<String> strings = header();
@ -110,7 +111,6 @@ public class PSystemKeygen extends AbstractPSystem {
strings.add("<i>Error: Cannot store license key.</i>"); strings.add("<i>Error: Cannot store license key.</i>");
} }
final LicenseInfo installed = LicenseInfo.retrieveSlow();
if (installed.isNone()) { if (installed.isNone()) {
strings.add("No license currently installed."); strings.add("No license currently installed.");
strings.add(" "); strings.add(" ");
@ -138,7 +138,7 @@ public class PSystemKeygen extends AbstractPSystem {
return strings; return strings;
} }
public void drawFlash(UGraphic ug) throws IOException { private void drawFlash(UGraphic ug, LicenseInfo info) throws IOException {
final List<String> strings = header(); final List<String> strings = header();
strings.add("To get your <i>Professional Edition License</i>,"); strings.add("To get your <i>Professional Edition License</i>,");
strings.add("please send this flashcode to <b>plantuml@gmail.com</b> :"); strings.add("please send this flashcode to <b>plantuml@gmail.com</b> :");
@ -150,12 +150,12 @@ public class PSystemKeygen extends AbstractPSystem {
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils(); final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
final BufferedImage im = utils.exportFlashcode(Version.versionString() + "\n" final BufferedImage im = utils.exportFlashcode(Version.versionString() + "\n"
+ SignatureUtils.toHexString(Magic.signature())); + SignatureUtils.toHexString(Magic.signature()));
final UImage flash = new UImage(im).scaleNearestNeighbor(4); if (im != null) {
ug.draw(flash); final UImage flash = new UImage(im).scaleNearestNeighbor(4);
ug.draw(flash);
ug = ug.apply(new UTranslate(0, flash.getHeight()));
}
ug = ug.apply(new UTranslate(0, flash.getHeight()));
final LicenseInfo info = LicenseInfo.retrieveSlow();
if (info.isNone() == false) { if (info.isNone() == false) {
strings.clear(); strings.clear();
strings.add("<u>Installed license</u>:"); strings.add("<u>Installed license</u>:");

View File

@ -53,7 +53,7 @@ public class PSystemLicense extends AbstractPSystem {
private final List<String> strings = new ArrayList<String>(); private final List<String> strings = new ArrayList<String>();
PSystemLicense() throws IOException { PSystemLicense() throws IOException {
strings.addAll(License.getCurrent().getText()); strings.addAll(License.getCurrent().getText(true));
} }
@Override @Override

View File

@ -43,7 +43,7 @@ public class Version {
private static final int MAJOR_SEPARATOR = 1000000; private static final int MAJOR_SEPARATOR = 1000000;
public static int version() { public static int version() {
return 1201809; return 1201810;
} }
public static int versionPatched() { public static int versionPatched() {
@ -88,7 +88,7 @@ public class Version {
} }
public static long compileTime() { public static long compileTime() {
return 1532710698423L; return 1535216579971L;
} }
public static String compileTimeString() { public static String compileTimeString() {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,6 @@
aws aws
cloudinsight cloudinsight
cloudogu cloudogu
devicons tupadr3
font-awesome
material material
office office

BIN
stdlib/tupadr3-abx.repx Normal file

Binary file not shown.

BIN
stdlib/tupadr3-dex.repx Normal file

Binary file not shown.