mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
Import version 1.2021.6
This commit is contained in:
parent
534bab1df4
commit
f83a207360
2
pom.xml
2
pom.xml
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<groupId>net.sourceforge.plantuml</groupId>
|
<groupId>net.sourceforge.plantuml</groupId>
|
||||||
<artifactId>plantuml</artifactId>
|
<artifactId>plantuml</artifactId>
|
||||||
<version>1.2021.5-SNAPSHOT</version>
|
<version>1.2021.6-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PlantUML</name>
|
<name>PlantUML</name>
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2020, 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.
|
||||||
|
*
|
||||||
|
* Original Author: Arnaud Roques
|
||||||
|
*
|
||||||
|
*/
|
||||||
package gen.annotation;
|
package gen.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
@ -68,7 +68,7 @@ public class BackSlash {
|
|||||||
if (s == null) {
|
if (s == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
final StringBuilder current = new StringBuilder();
|
final StringBuilder current = new StringBuilder();
|
||||||
for (int i = 0; i < s.length(); i++) {
|
for (int i = 0; i < s.length(); i++) {
|
||||||
final char c = s.charAt(i);
|
final char c = s.charAt(i);
|
||||||
|
@ -65,7 +65,7 @@ public class BlockUml {
|
|||||||
private Diagram system;
|
private Diagram system;
|
||||||
private final Defines localDefines;
|
private final Defines localDefines;
|
||||||
private final ISkinSimple skinParam;
|
private final ISkinSimple skinParam;
|
||||||
private final Set<FileWithSuffix> included = new HashSet<FileWithSuffix>();
|
private final Set<FileWithSuffix> included = new HashSet<>();
|
||||||
|
|
||||||
public Set<FileWithSuffix> getIncluded() {
|
public Set<FileWithSuffix> getIncluded() {
|
||||||
return Collections.unmodifiableSet(included);
|
return Collections.unmodifiableSet(included);
|
||||||
@ -97,7 +97,7 @@ public class BlockUml {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<StringLocated> convert(List<String> strings) {
|
public static List<StringLocated> convert(List<String> strings) {
|
||||||
final List<StringLocated> result = new ArrayList<StringLocated>();
|
final List<StringLocated> result = new ArrayList<>();
|
||||||
LineLocationImpl location = new LineLocationImpl("block", null);
|
LineLocationImpl location = new LineLocationImpl("block", null);
|
||||||
for (String s : strings) {
|
for (String s : strings) {
|
||||||
location = location.oneLineRead();
|
location = location.oneLineRead();
|
||||||
@ -109,7 +109,7 @@ public class BlockUml {
|
|||||||
private boolean preprocessorError;
|
private boolean preprocessorError;
|
||||||
|
|
||||||
public BlockUml(List<StringLocated> strings, Defines defines, ISkinSimple skinParam, PreprocessorModeSet mode) {
|
public BlockUml(List<StringLocated> strings, Defines defines, ISkinSimple skinParam, PreprocessorModeSet mode) {
|
||||||
this.rawSource = new ArrayList<StringLocated>(strings);
|
this.rawSource = new ArrayList<>(strings);
|
||||||
this.localDefines = defines;
|
this.localDefines = defines;
|
||||||
this.skinParam = skinParam;
|
this.skinParam = skinParam;
|
||||||
final String s0 = strings.get(0).getTrimmed().getString();
|
final String s0 = strings.get(0).getTrimmed().getString();
|
||||||
@ -117,7 +117,7 @@ public class BlockUml {
|
|||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
if (mode == null) {
|
if (mode == null) {
|
||||||
this.data = new ArrayList<StringLocated>(strings);
|
this.data = new ArrayList<>(strings);
|
||||||
} else {
|
} else {
|
||||||
final TimLoader timLoader = new TimLoader(mode.getImportedFiles(), defines, mode.getCharset(),
|
final TimLoader timLoader = new TimLoader(mode.getImportedFiles(), defines, mode.getCharset(),
|
||||||
(DefinitionsContainer) mode);
|
(DefinitionsContainer) mode);
|
||||||
@ -199,7 +199,7 @@ public class BlockUml {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getDefinition(boolean withHeader) {
|
public List<String> getDefinition(boolean withHeader) {
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
for (StringLocated s : data) {
|
for (StringLocated s : data) {
|
||||||
result.add(s.getString());
|
result.add(s.getString());
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@ import net.sourceforge.plantuml.utils.StartUtils;
|
|||||||
|
|
||||||
public final class BlockUmlBuilder implements DefinitionsContainer {
|
public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||||
|
|
||||||
private final List<BlockUml> blocks = new ArrayList<BlockUml>();
|
private final List<BlockUml> blocks = new ArrayList<>();
|
||||||
private Set<FileWithSuffix> usedFiles = new HashSet<FileWithSuffix>();
|
private Set<FileWithSuffix> usedFiles = new HashSet<>();
|
||||||
private final UncommentReadLine reader;
|
private final UncommentReadLine reader;
|
||||||
private final Defines defines;
|
private final Defines defines;
|
||||||
private final ImportedFiles importedFiles;
|
private final ImportedFiles importedFiles;
|
||||||
@ -92,7 +92,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
|
|||||||
|
|
||||||
while ((s = includer.readLine()) != null) {
|
while ((s = includer.readLine()) != null) {
|
||||||
if (StartUtils.isArobaseStartDiagram(s.getString())) {
|
if (StartUtils.isArobaseStartDiagram(s.getString())) {
|
||||||
current = new ArrayList<StringLocated>();
|
current = new ArrayList<>();
|
||||||
paused = false;
|
paused = false;
|
||||||
}
|
}
|
||||||
if (StartUtils.isArobasePauseDiagram(s.getString())) {
|
if (StartUtils.isArobasePauseDiagram(s.getString())) {
|
||||||
|
@ -79,7 +79,7 @@ public class CMapData {
|
|||||||
public static CMapData cmapString(Set<Url> allUrlEncountered, double scale) {
|
public static CMapData cmapString(Set<Url> allUrlEncountered, double scale) {
|
||||||
final CMapData cmapdata = new CMapData();
|
final CMapData cmapdata = new CMapData();
|
||||||
|
|
||||||
final List<Url> all = new ArrayList<Url>(allUrlEncountered);
|
final List<Url> all = new ArrayList<>(allUrlEncountered);
|
||||||
Collections.sort(all, Url.SURFACE_COMPARATOR);
|
Collections.sort(all, Url.SURFACE_COMPARATOR);
|
||||||
|
|
||||||
int seq = 1;
|
int seq = 1;
|
||||||
|
@ -64,7 +64,7 @@ public class DirWatcher {
|
|||||||
|
|
||||||
public List<GeneratedImage> buildCreatedFiles() throws IOException, InterruptedException {
|
public List<GeneratedImage> buildCreatedFiles() throws IOException, InterruptedException {
|
||||||
boolean error = false;
|
boolean error = false;
|
||||||
final List<GeneratedImage> result = new ArrayList<GeneratedImage>();
|
final List<GeneratedImage> result = new ArrayList<>();
|
||||||
for (File f : dir.listFiles()) {
|
for (File f : dir.listFiles()) {
|
||||||
if (error) {
|
if (error) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -132,7 +132,7 @@ public class EmptyImageBuilder {
|
|||||||
|
|
||||||
private List<String> withBreaks(String watermark, Font javaFont, FontMetrics fm, int maxWidth) {
|
private List<String> withBreaks(String watermark, Font javaFont, FontMetrics fm, int maxWidth) {
|
||||||
final String[] words = watermark.split("\\s+");
|
final String[] words = watermark.split("\\s+");
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
String pending = "";
|
String pending = "";
|
||||||
for (String word : words) {
|
for (String word : words) {
|
||||||
final String candidate = pending.length() == 0 ? word : pending + " " + word;
|
final String candidate = pending.length() == 0 ? word : pending + " " + word;
|
||||||
|
@ -83,10 +83,9 @@ public final class FileFormatOption implements Serializable {
|
|||||||
this.useRedForError = useRedForError;
|
this.useRedForError = useRedForError;
|
||||||
this.svgLinkTarget = svgLinkTarget;
|
this.svgLinkTarget = svgLinkTarget;
|
||||||
this.debugsvek = debugsvek;
|
this.debugsvek = debugsvek;
|
||||||
this.tikzFontDistortion = tikzFontDistortion;
|
this.tikzFontDistortion = Objects.requireNonNull(tikzFontDistortion);
|
||||||
this.scale = scale;
|
this.scale = scale;
|
||||||
this.preserveAspectRatio = preserveAspectRatio;
|
this.preserveAspectRatio = preserveAspectRatio;
|
||||||
Objects.requireNonNull(tikzFontDistortion);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringBounder getDefaultStringBounder(SvgCharSizeHack charSizeHack) {
|
public StringBounder getDefaultStringBounder(SvgCharSizeHack charSizeHack) {
|
||||||
|
@ -46,7 +46,7 @@ import net.sourceforge.plantuml.command.regex.Pattern2;
|
|||||||
|
|
||||||
public class FileGroup {
|
public class FileGroup {
|
||||||
|
|
||||||
private final List<File> result = new ArrayList<File>();
|
private final List<File> result = new ArrayList<>();
|
||||||
private final String pattern;
|
private final String pattern;
|
||||||
private final List<String> excluded;
|
private final List<String> excluded;
|
||||||
private final Option option;
|
private final Option option;
|
||||||
|
@ -44,7 +44,7 @@ public class FileSystem {
|
|||||||
|
|
||||||
private final static FileSystem singleton = new FileSystem();
|
private final static FileSystem singleton = new FileSystem();
|
||||||
|
|
||||||
private ThreadLocal<String> currentDir = new ThreadLocal<String>();
|
private ThreadLocal<String> currentDir = new ThreadLocal<>();
|
||||||
|
|
||||||
private FileSystem() {
|
private FileSystem() {
|
||||||
reset();
|
reset();
|
||||||
|
@ -53,9 +53,8 @@ public class LineLocationImpl implements LineLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private LineLocationImpl(String desc, LineLocation parent, int position) {
|
private LineLocationImpl(String desc, LineLocation parent, int position) {
|
||||||
Objects.requireNonNull(desc);
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.desc = desc;
|
this.desc = Objects.requireNonNull(desc);
|
||||||
this.position = position;
|
this.position = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public abstract class Log {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// private static final ThreadLocal<String> header2 = new ThreadLocal<String>();
|
// private static final ThreadLocal<String> header2 = new ThreadLocal<>();
|
||||||
//
|
//
|
||||||
public static void header(String s) {
|
public static void header(String s) {
|
||||||
// header2.set(s);
|
// header2.set(s);
|
||||||
|
@ -51,7 +51,7 @@ import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
|||||||
|
|
||||||
public class NewpagedDiagram extends AbstractPSystem {
|
public class NewpagedDiagram extends AbstractPSystem {
|
||||||
|
|
||||||
private final List<Diagram> diagrams = new ArrayList<Diagram>();
|
private final List<Diagram> diagrams = new ArrayList<>();
|
||||||
|
|
||||||
public NewpagedDiagram(AbstractPSystem diag1, AbstractPSystem diag2) {
|
public NewpagedDiagram(AbstractPSystem diag1, AbstractPSystem diag2) {
|
||||||
if (diag1 instanceof NewpagedDiagram) {
|
if (diag1 instanceof NewpagedDiagram) {
|
||||||
|
@ -57,8 +57,8 @@ import net.sourceforge.plantuml.stats.StatsUtils;
|
|||||||
|
|
||||||
public class Option {
|
public class Option {
|
||||||
|
|
||||||
private final List<String> excludes = new ArrayList<String>();
|
private final List<String> excludes = new ArrayList<>();
|
||||||
private final List<String> config = new ArrayList<String>();
|
private final List<String> config = new ArrayList<>();
|
||||||
private final Map<String, String> defines = new LinkedHashMap<String, String>();
|
private final Map<String, String> defines = new LinkedHashMap<String, String>();
|
||||||
private String charset;
|
private String charset;
|
||||||
private boolean computeurl = false;
|
private boolean computeurl = false;
|
||||||
@ -91,7 +91,7 @@ public class Option {
|
|||||||
private File outputFile = null;
|
private File outputFile = null;
|
||||||
private String filename;
|
private String filename;
|
||||||
|
|
||||||
private final List<String> result = new ArrayList<String>();
|
private final List<String> result = new ArrayList<>();
|
||||||
|
|
||||||
public Option() {
|
public Option() {
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.version.Version;
|
|||||||
public class OptionPrint {
|
public class OptionPrint {
|
||||||
|
|
||||||
static public void printTestDot() throws InterruptedException {
|
static public void printTestDot() throws InterruptedException {
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
final int errorCode = GraphvizUtils.addDotStatus(result, false);
|
final int errorCode = GraphvizUtils.addDotStatus(result, false);
|
||||||
for (String s : result) {
|
for (String s : result) {
|
||||||
if (errorCode == 0) {
|
if (errorCode == 0) {
|
||||||
@ -187,7 +187,7 @@ public class OptionPrint {
|
|||||||
System.out.println(v);
|
System.out.println(v);
|
||||||
}
|
}
|
||||||
System.out.println();
|
System.out.println();
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
final int errorCode = GraphvizUtils.addDotStatus(result, false);
|
final int errorCode = GraphvizUtils.addDotStatus(result, false);
|
||||||
for (String s : result) {
|
for (String s : result) {
|
||||||
System.out.println(s);
|
System.out.println(s);
|
||||||
@ -213,7 +213,7 @@ public class OptionPrint {
|
|||||||
all = Arrays.asList("java.runtime.name", "Java Runtime", "java.vm.name", "JVM", "file.encoding",
|
all = Arrays.asList("java.runtime.name", "Java Runtime", "java.vm.name", "JVM", "file.encoding",
|
||||||
"Default Encoding", "user.language", "Language", "user.country", "Country");
|
"Default Encoding", "user.language", "Language", "user.country", "Country");
|
||||||
}
|
}
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
for (int i = 0; i < all.size(); i += 2) {
|
for (int i = 0; i < all.size(); i += 2) {
|
||||||
result.add(all.get(i + 1) + ": " + p.getProperty(all.get(i)));
|
result.add(all.get(i + 1) + ": " + p.getProperty(all.get(i)));
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ public class OptionPrint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<String> interestingValues() {
|
public static Collection<String> interestingValues() {
|
||||||
final List<String> strings = new ArrayList<String>();
|
final List<String> strings = new ArrayList<>();
|
||||||
// if (withIp() == false) {
|
// if (withIp() == false) {
|
||||||
// strings.add("Machine: " + getHostName());
|
// strings.add("Machine: " + getHostName());
|
||||||
// }
|
// }
|
||||||
|
@ -125,7 +125,7 @@ public class PSystemBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final DiagramType diagramType = umlSource.getDiagramType();
|
final DiagramType diagramType = umlSource.getDiagramType();
|
||||||
final List<PSystemError> errors = new ArrayList<PSystemError>();
|
final List<PSystemError> errors = new ArrayList<>();
|
||||||
final List<PSystemFactory> factories = getAllFactories(skinParam);
|
final List<PSystemFactory> factories = getAllFactories(skinParam);
|
||||||
for (PSystemFactory systemFactory : factories) {
|
for (PSystemFactory systemFactory : factories) {
|
||||||
if (diagramType != systemFactory.getDiagramType()) {
|
if (diagramType != systemFactory.getDiagramType()) {
|
||||||
@ -152,7 +152,7 @@ public class PSystemBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static List<PSystemFactory> getAllFactories(ISkinSimple skinParam) {
|
private static List<PSystemFactory> getAllFactories(ISkinSimple skinParam) {
|
||||||
final List<PSystemFactory> factories = new ArrayList<PSystemFactory>();
|
final List<PSystemFactory> factories = new ArrayList<>();
|
||||||
factories.add(new PSystemWelcomeFactory());
|
factories.add(new PSystemWelcomeFactory());
|
||||||
factories.add(new PSystemColorsFactory());
|
factories.add(new PSystemColorsFactory());
|
||||||
factories.add(new SequenceDiagramFactory(skinParam));
|
factories.add(new SequenceDiagramFactory(skinParam));
|
||||||
|
@ -99,7 +99,7 @@ public class PSystemUtils {
|
|||||||
|
|
||||||
private static List<FileImageData> exportDiagramsNewpaged(NewpagedDiagram system, SuggestedFile suggestedFile,
|
private static List<FileImageData> exportDiagramsNewpaged(NewpagedDiagram system, SuggestedFile suggestedFile,
|
||||||
FileFormatOption fileFormat) throws IOException {
|
FileFormatOption fileFormat) throws IOException {
|
||||||
final List<FileImageData> result = new ArrayList<FileImageData>();
|
final List<FileImageData> result = new ArrayList<>();
|
||||||
final int nbImages = system.getNbImages();
|
final int nbImages = system.getNbImages();
|
||||||
for (int i = 0; i < nbImages; i++) {
|
for (int i = 0; i < nbImages; i++) {
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ public class PSystemUtils {
|
|||||||
|
|
||||||
private static List<FileImageData> exportDiagramsSequence(SequenceDiagram system, SuggestedFile suggestedFile,
|
private static List<FileImageData> exportDiagramsSequence(SequenceDiagram system, SuggestedFile suggestedFile,
|
||||||
FileFormatOption fileFormat) throws IOException {
|
FileFormatOption fileFormat) throws IOException {
|
||||||
final List<FileImageData> result = new ArrayList<FileImageData>();
|
final List<FileImageData> result = new ArrayList<>();
|
||||||
final int nbImages = system.getNbImages();
|
final int nbImages = system.getNbImages();
|
||||||
for (int i = 0; i < nbImages; i++) {
|
for (int i = 0; i < nbImages; i++) {
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ public class PSystemUtils {
|
|||||||
system.getMetadata(), dpi, fileFormat.isWithMetadata(), system.getSkinParam().getSplitParam())
|
system.getMetadata(), dpi, fileFormat.isWithMetadata(), system.getSkinParam().getSplitParam())
|
||||||
.getFiles();
|
.getFiles();
|
||||||
}
|
}
|
||||||
final List<FileImageData> result2 = new ArrayList<FileImageData>();
|
final List<FileImageData> result2 = new ArrayList<>();
|
||||||
for (SFile f : result) {
|
for (SFile f : result) {
|
||||||
result2.add(new FileImageData(f, cmap));
|
result2.add(new FileImageData(f, cmap));
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ public class PSystemUtils {
|
|||||||
system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam)
|
system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam)
|
||||||
.getFiles();
|
.getFiles();
|
||||||
}
|
}
|
||||||
final List<FileImageData> result2 = new ArrayList<FileImageData>();
|
final List<FileImageData> result2 = new ArrayList<>();
|
||||||
for (SFile f : result) {
|
for (SFile f : result) {
|
||||||
result2.add(new FileImageData(f, cmap));
|
result2.add(new FileImageData(f, cmap));
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public abstract class PlainStringsDiagram extends PlainDiagram {
|
|||||||
protected BufferedImage image = null;
|
protected BufferedImage image = null;
|
||||||
protected GraphicPosition imagePosition = null;
|
protected GraphicPosition imagePosition = null;
|
||||||
|
|
||||||
protected final List<String> strings = new ArrayList<String>();
|
protected final List<String> strings = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UDrawable getRootDrawable(FileFormatOption fileFormatOption) {
|
public UDrawable getRootDrawable(FileFormatOption fileFormatOption) {
|
||||||
|
@ -410,7 +410,7 @@ public class Run {
|
|||||||
multithread(option, error);
|
multithread(option, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final List<File> files = new ArrayList<File>();
|
final List<File> files = new ArrayList<>();
|
||||||
for (String s : option.getResult()) {
|
for (String s : option.getResult()) {
|
||||||
if (option.isDecodeurl()) {
|
if (option.isDecodeurl()) {
|
||||||
error.goOk();
|
error.goOk();
|
||||||
|
@ -254,7 +254,7 @@ public class SkinParam implements ISkinParam {
|
|||||||
key = key.replaceAll("sequencearrow", "arrow");
|
key = key.replaceAll("sequencearrow", "arrow");
|
||||||
key = key.replaceAll("align$", "alignment");
|
key = key.replaceAll("align$", "alignment");
|
||||||
final Matcher2 mm = stereoPattern.matcher(key);
|
final Matcher2 mm = stereoPattern.matcher(key);
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
while (mm.find()) {
|
while (mm.find()) {
|
||||||
final String s = mm.group(1);
|
final String s = mm.group(1);
|
||||||
result.add(key.replaceAll(stereoPatternString, "") + "<<" + s + ">>");
|
result.add(key.replaceAll(stereoPatternString, "") + "<<" + s + ">>");
|
||||||
@ -357,8 +357,7 @@ public class SkinParam implements ISkinParam {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public char getCircledCharacter(Stereotype stereotype) {
|
public char getCircledCharacter(Stereotype stereotype) {
|
||||||
Objects.requireNonNull(stereotype);
|
final String value2 = getValue("spotchar" + Objects.requireNonNull(stereotype).getLabel(Guillemet.DOUBLE_COMPARATOR));
|
||||||
final String value2 = getValue("spotchar" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
|
|
||||||
if (value2 != null && value2.length() > 0) {
|
if (value2 != null && value2.length() > 0) {
|
||||||
return value2.charAt(0);
|
return value2.charAt(0);
|
||||||
}
|
}
|
||||||
@ -517,7 +516,7 @@ public class SkinParam implements ISkinParam {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<String> getPossibleValues() {
|
public static Collection<String> getPossibleValues() {
|
||||||
final Set<String> result = new TreeSet<String>();
|
final Set<String> result = new TreeSet<>();
|
||||||
result.add("Monochrome");
|
result.add("Monochrome");
|
||||||
// result.add("BackgroundColor");
|
// result.add("BackgroundColor");
|
||||||
result.add("CircledCharacterRadius");
|
result.add("CircledCharacterRadius");
|
||||||
@ -760,8 +759,7 @@ public class SkinParam implements ISkinParam {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
|
public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
|
||||||
Objects.requireNonNull(skinParameter);
|
final String name = Objects.requireNonNull(skinParameter).getUpperCaseName();
|
||||||
final String name = skinParameter.getUpperCaseName();
|
|
||||||
if (stereotype != null) {
|
if (stereotype != null) {
|
||||||
checkStereotype(stereotype);
|
checkStereotype(stereotype);
|
||||||
final String value2 = getValue(name + "shadowing" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
|
final String value2 = getValue(name + "shadowing" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
|
||||||
@ -789,7 +787,7 @@ public class SkinParam implements ISkinParam {
|
|||||||
private final Map<String, Sprite> sprites = new HashMap<String, Sprite>();
|
private final Map<String, Sprite> sprites = new HashMap<String, Sprite>();
|
||||||
|
|
||||||
public Collection<String> getAllSpriteNames() {
|
public Collection<String> getAllSpriteNames() {
|
||||||
return Collections.unmodifiableCollection(new TreeSet<String>(sprites.keySet()));
|
return Collections.unmodifiableCollection(new TreeSet<>(sprites.keySet()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSprite(String name, Sprite sprite) {
|
public void addSprite(String name, Sprite sprite) {
|
||||||
|
@ -139,7 +139,7 @@ public abstract class SourceFileReaderAbstract {
|
|||||||
Log.info("Reading file: " + file);
|
Log.info("Reading file: " + file);
|
||||||
|
|
||||||
cpt = 0;
|
cpt = 0;
|
||||||
final List<GeneratedImage> result = new ArrayList<GeneratedImage>();
|
final List<GeneratedImage> result = new ArrayList<>();
|
||||||
|
|
||||||
for (BlockUml blockUml : builder.getBlockUmls()) {
|
for (BlockUml blockUml : builder.getBlockUmls()) {
|
||||||
final SuggestedFile suggested = getSuggestedFile(blockUml);
|
final SuggestedFile suggested = getSuggestedFile(blockUml);
|
||||||
|
@ -71,8 +71,7 @@ final public class StringLocated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public StringLocated(String s, LineLocation location, String preprocessorError) {
|
public StringLocated(String s, LineLocation location, String preprocessorError) {
|
||||||
Objects.requireNonNull(s);
|
this.s = Objects.requireNonNull(s);
|
||||||
this.s = s;
|
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.preprocessorError = preprocessorError;
|
this.preprocessorError = preprocessorError;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ public class StringUtils {
|
|||||||
if (m.find() == false) {
|
if (m.find() == false) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
for (int i = 1; i <= m.groupCount(); i++) {
|
for (int i = 1; i <= m.groupCount(); i++) {
|
||||||
result.add(m.group(i));
|
result.add(m.group(i));
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ public class StringUtils {
|
|||||||
// == false) {
|
// == false) {
|
||||||
// throw new IllegalArgumentException();
|
// throw new IllegalArgumentException();
|
||||||
// }
|
// }
|
||||||
final List<String> result = new ArrayList<String>();
|
final List<String> result = new ArrayList<>();
|
||||||
final Pattern2 p = MyPattern.cmpile("([\\p{L}0-9_.]+|[%g][^%g]+[%g])");
|
final Pattern2 p = MyPattern.cmpile("([\\p{L}0-9_.]+|[%g][^%g]+[%g])");
|
||||||
final Matcher2 m = p.matcher(s);
|
final Matcher2 m = p.matcher(s);
|
||||||
while (m.find()) {
|
while (m.find()) {
|
||||||
@ -439,7 +439,7 @@ public class StringUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <O> List<O> merge(List<O> l1, List<O> l2) {
|
public static <O> List<O> merge(List<O> l1, List<O> l2) {
|
||||||
final List<O> result = new ArrayList<O>(l1);
|
final List<O> result = new ArrayList<>(l1);
|
||||||
result.addAll(l2);
|
result.addAll(l2);
|
||||||
return Collections.unmodifiableList(result);
|
return Collections.unmodifiableList(result);
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,6 @@ package net.sourceforge.plantuml;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.script.ScriptException;
|
|
||||||
|
|
||||||
import net.sourceforge.plantuml.anim.Animation;
|
import net.sourceforge.plantuml.anim.Animation;
|
||||||
import net.sourceforge.plantuml.anim.AnimationDecoder;
|
import net.sourceforge.plantuml.anim.AnimationDecoder;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
@ -237,13 +235,12 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
|||||||
}
|
}
|
||||||
|
|
||||||
final public void setAnimation(Iterable<CharSequence> animationData) {
|
final public void setAnimation(Iterable<CharSequence> animationData) {
|
||||||
try {
|
// try {
|
||||||
final AnimationDecoder animationDecoder = new AnimationDecoder(animationData);
|
final AnimationDecoder animationDecoder = new AnimationDecoder(animationData);
|
||||||
this.animation = Animation.create(animationDecoder.decode());
|
this.animation = Animation.create(animationDecoder.decode());
|
||||||
} catch (ScriptException e) {
|
// } catch (ScriptException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final public Animation getAnimation() {
|
final public Animation getAnimation() {
|
||||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml;
|
|||||||
|
|
||||||
public class UseStyle {
|
public class UseStyle {
|
||||||
|
|
||||||
private static final ThreadLocal<Boolean> useBeta = new ThreadLocal<Boolean>();
|
private static final ThreadLocal<Boolean> useBeta = new ThreadLocal<>();
|
||||||
|
|
||||||
static public boolean useBetaStyle() {
|
static public boolean useBetaStyle() {
|
||||||
final Boolean result = useBeta.get();
|
final Boolean result = useBeta.get();
|
||||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.command.regex.Pattern2;
|
|||||||
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||||
|
|
||||||
private final Map<String, String> config = new LinkedHashMap<String, String>();
|
private final Map<String, String> config = new LinkedHashMap<String, String>();
|
||||||
private final List<Marker> markers = new ArrayList<Marker>();
|
private final List<Marker> markers = new ArrayList<>();
|
||||||
private int width;
|
private int width;
|
||||||
private int height;
|
private int height;
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.activitydiagram;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.Direction;
|
import net.sourceforge.plantuml.Direction;
|
||||||
import net.sourceforge.plantuml.ISkinSimple;
|
import net.sourceforge.plantuml.ISkinSimple;
|
||||||
@ -66,8 +67,7 @@ public class ActivityDiagram extends CucaDiagram {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ILeaf getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol) {
|
public ILeaf getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol) {
|
||||||
checkNotNull(ident);
|
return getOrCreateLeafDefault(Objects.requireNonNull(ident), code, type, symbol);
|
||||||
return getOrCreateLeafDefault(ident, code, type, symbol);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getAutoBranch() {
|
private String getAutoBranch() {
|
||||||
@ -134,15 +134,13 @@ public class ActivityDiagram extends CucaDiagram {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) {
|
public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) {
|
||||||
checkNotNull(idNewLong);
|
final ILeaf result = super.createLeaf(Objects.requireNonNull(idNewLong), code, display, type, symbol);
|
||||||
final ILeaf result = super.createLeaf(idNewLong, code, display, type, symbol);
|
|
||||||
updateLasts(result);
|
updateLasts(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEntity createNote(Ident idNewLong, Code code, Display display) {
|
public IEntity createNote(Ident idNewLong, Code code, Display display) {
|
||||||
checkNotNull(idNewLong);
|
return super.createLeaf(Objects.requireNonNull(idNewLong), code, display, LeafType.NOTE, null);
|
||||||
return super.createLeaf(idNewLong, code, display, LeafType.NOTE, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final protected List<String> getDotStrings() {
|
final protected List<String> getDotStrings() {
|
||||||
|
@ -70,7 +70,7 @@ public class ActivityDiagramFactory extends PSystemCommandFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Command> createCommands() {
|
protected List<Command> createCommands() {
|
||||||
final List<Command> cmds = new ArrayList<Command>();
|
final List<Command> cmds = new ArrayList<>();
|
||||||
cmds.add(new CommandFootboxIgnored());
|
cmds.add(new CommandFootboxIgnored());
|
||||||
addCommonCommands1(cmds);
|
addCommonCommands1(cmds);
|
||||||
cmds.add(new CommandRankDir());
|
cmds.add(new CommandRankDir());
|
||||||
|
@ -99,7 +99,7 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory {
|
|||||||
@Override
|
@Override
|
||||||
protected List<Command> createCommands() {
|
protected List<Command> createCommands() {
|
||||||
|
|
||||||
final List<Command> cmds = new ArrayList<Command>();
|
final List<Command> cmds = new ArrayList<>();
|
||||||
cmds.add(new CommandFootboxIgnored());
|
cmds.add(new CommandFootboxIgnored());
|
||||||
|
|
||||||
addCommonCommands1(cmds);
|
addCommonCommands1(cmds);
|
||||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType;
|
|||||||
|
|
||||||
public class InstructionFork extends WithNote implements Instruction {
|
public class InstructionFork extends WithNote implements Instruction {
|
||||||
|
|
||||||
private final List<InstructionList> forks = new ArrayList<InstructionList>();
|
private final List<InstructionList> forks = new ArrayList<>();
|
||||||
private final Instruction parent;
|
private final Instruction parent;
|
||||||
private final LinkRendering inlinkRendering;
|
private final LinkRendering inlinkRendering;
|
||||||
private final ISkinParam skinParam;
|
private final ISkinParam skinParam;
|
||||||
@ -90,7 +90,7 @@ public class InstructionFork extends WithNote implements Instruction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createFtile(FtileFactory factory) {
|
public Ftile createFtile(FtileFactory factory) {
|
||||||
final List<Ftile> all = new ArrayList<Ftile>();
|
final List<Ftile> all = new ArrayList<>();
|
||||||
for (InstructionList list : forks) {
|
for (InstructionList list : forks) {
|
||||||
all.add(list.createFtile(factory));
|
all.add(list.createFtile(factory));
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ public class InstructionFork extends WithNote implements Instruction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>(InstructionList.getSwimlanes2(forks));
|
final Set<Swimlane> result = new HashSet<>(InstructionList.getSwimlanes2(forks));
|
||||||
result.add(swimlaneIn);
|
result.add(swimlaneIn);
|
||||||
result.add(swimlaneOut);
|
result.add(swimlaneOut);
|
||||||
return result;
|
return result;
|
||||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor;
|
|||||||
|
|
||||||
public class InstructionIf extends WithNote implements Instruction, InstructionCollection {
|
public class InstructionIf extends WithNote implements Instruction, InstructionCollection {
|
||||||
|
|
||||||
private final List<Branch> thens = new ArrayList<Branch>();
|
private final List<Branch> thens = new ArrayList<>();
|
||||||
private Branch elseBranch;
|
private Branch elseBranch;
|
||||||
private boolean endifCalled = false;
|
private boolean endifCalled = false;
|
||||||
private final ISkinParam skinParam;
|
private final ISkinParam skinParam;
|
||||||
@ -113,7 +113,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
|||||||
if (getPositionedNotes().size() > 0) {
|
if (getPositionedNotes().size() > 0) {
|
||||||
result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, false);
|
result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, false);
|
||||||
}
|
}
|
||||||
final List<WeldingPoint> weldingPoints = new ArrayList<WeldingPoint>();
|
final List<WeldingPoint> weldingPoints = new ArrayList<>();
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
weldingPoints.addAll(branch.getWeldingPoints());
|
weldingPoints.addAll(branch.getWeldingPoints());
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (swimlane != null) {
|
if (swimlane != null) {
|
||||||
result.add(swimlane);
|
result.add(swimlane);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType;
|
|||||||
|
|
||||||
public class InstructionList extends WithNote implements Instruction, InstructionCollection {
|
public class InstructionList extends WithNote implements Instruction, InstructionCollection {
|
||||||
|
|
||||||
private final List<Instruction> all = new ArrayList<Instruction>();
|
private final List<Instruction> all = new ArrayList<>();
|
||||||
private final Swimlane defaultSwimlane;
|
private final Swimlane defaultSwimlane;
|
||||||
|
|
||||||
public boolean containsBreak() {
|
public boolean containsBreak() {
|
||||||
@ -96,7 +96,7 @@ public class InstructionList extends WithNote implements Instruction, Instructio
|
|||||||
if (all.size() == 0) {
|
if (all.size() == 0) {
|
||||||
return new FtileEmpty(factory.skinParam(), defaultSwimlane);
|
return new FtileEmpty(factory.skinParam(), defaultSwimlane);
|
||||||
}
|
}
|
||||||
final List<WeldingPoint> breaks = new ArrayList<WeldingPoint>();
|
final List<WeldingPoint> breaks = new ArrayList<>();
|
||||||
Ftile result = eventuallyAddNote(factory, null, getSwimlaneIn());
|
Ftile result = eventuallyAddNote(factory, null, getSwimlaneIn());
|
||||||
for (Instruction ins : all) {
|
for (Instruction ins : all) {
|
||||||
Ftile cur = ins.createFtile(factory);
|
Ftile cur = ins.createFtile(factory);
|
||||||
@ -169,7 +169,7 @@ public class InstructionList extends WithNote implements Instruction, Instructio
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Set<Swimlane> getSwimlanes2(List<? extends Instruction> list) {
|
public static Set<Swimlane> getSwimlanes2(List<? extends Instruction> list) {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
for (Instruction ins : list) {
|
for (Instruction ins : list) {
|
||||||
result.addAll(ins.getSwimlanes());
|
result.addAll(ins.getSwimlanes());
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public class InstructionRepeat implements Instruction {
|
|||||||
|
|
||||||
private LinkRendering incoming1 = LinkRendering.none();
|
private LinkRendering incoming1 = LinkRendering.none();
|
||||||
private LinkRendering incoming2 = LinkRendering.none();
|
private LinkRendering incoming2 = LinkRendering.none();
|
||||||
private List<PositionedNote> backwardNotes = new ArrayList<PositionedNote>();
|
private List<PositionedNote> backwardNotes = new ArrayList<>();
|
||||||
private Display test = Display.NULL;
|
private Display test = Display.NULL;
|
||||||
private Display yes = Display.NULL;
|
private Display yes = Display.NULL;
|
||||||
private Display out = Display.NULL;
|
private Display out = Display.NULL;
|
||||||
|
@ -50,7 +50,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType;
|
|||||||
|
|
||||||
public class InstructionSplit implements Instruction {
|
public class InstructionSplit implements Instruction {
|
||||||
|
|
||||||
private final List<InstructionList> splits = new ArrayList<InstructionList>();
|
private final List<InstructionList> splits = new ArrayList<>();
|
||||||
private final Instruction parent;
|
private final Instruction parent;
|
||||||
private final LinkRendering inlinkRendering;
|
private final LinkRendering inlinkRendering;
|
||||||
private final Swimlane swimlaneIn;
|
private final Swimlane swimlaneIn;
|
||||||
@ -82,7 +82,7 @@ public class InstructionSplit implements Instruction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createFtile(FtileFactory factory) {
|
public Ftile createFtile(FtileFactory factory) {
|
||||||
final List<Ftile> all = new ArrayList<Ftile>();
|
final List<Ftile> all = new ArrayList<>();
|
||||||
for (InstructionList list : splits) {
|
for (InstructionList list : splits) {
|
||||||
all.add(list.createFtile(factory));
|
all.add(list.createFtile(factory));
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor;
|
|||||||
|
|
||||||
public class InstructionSwitch extends WithNote implements Instruction, InstructionCollection {
|
public class InstructionSwitch extends WithNote implements Instruction, InstructionCollection {
|
||||||
|
|
||||||
private final List<Branch> branches = new ArrayList<Branch>();
|
private final List<Branch> branches = new ArrayList<>();
|
||||||
private final ISkinParam skinParam;
|
private final ISkinParam skinParam;
|
||||||
|
|
||||||
private final Instruction parent;
|
private final Instruction parent;
|
||||||
@ -94,7 +94,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct
|
|||||||
// result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam,
|
// result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam,
|
||||||
// false);
|
// false);
|
||||||
// }
|
// }
|
||||||
// final List<WeldingPoint> weldingPoints = new ArrayList<WeldingPoint>();
|
// final List<WeldingPoint> weldingPoints = new ArrayList<>();
|
||||||
// for (Branch branch : branches) {
|
// for (Branch branch : branches) {
|
||||||
// weldingPoints.addAll(branch.getWeldingPoints());
|
// weldingPoints.addAll(branch.getWeldingPoints());
|
||||||
// }
|
// }
|
||||||
@ -113,7 +113,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (swimlane != null) {
|
if (swimlane != null) {
|
||||||
result.add(swimlane);
|
result.add(swimlane);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType;
|
|||||||
|
|
||||||
public class WithNote {
|
public class WithNote {
|
||||||
|
|
||||||
private final Collection<PositionedNote> notes = new ArrayList<PositionedNote>();
|
private final Collection<PositionedNote> notes = new ArrayList<>();
|
||||||
|
|
||||||
public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) {
|
public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) {
|
||||||
this.notes.add(new PositionedNote(note, position, type, colors, swimlaneNote));
|
this.notes.add(new PositionedNote(note, position, type, colors, swimlaneNote));
|
||||||
|
@ -77,8 +77,8 @@ public class CollisionDetector extends UGraphicNo implements UGraphic {
|
|||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
static class Context {
|
static class Context {
|
||||||
private final List<MinMax> rectangles = new ArrayList<MinMax>();
|
private final List<MinMax> rectangles = new ArrayList<>();
|
||||||
private final List<Snake> snakes = new ArrayList<Snake>();
|
private final List<Snake> snakes = new ArrayList<>();
|
||||||
private boolean manageSnakes;
|
private boolean manageSnakes;
|
||||||
|
|
||||||
public void drawDebug(UGraphic ug) {
|
public void drawDebug(UGraphic ug) {
|
||||||
|
@ -147,7 +147,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
result.addAll(tile1.getSwimlanes());
|
result.addAll(tile1.getSwimlanes());
|
||||||
result.addAll(tile2.getSwimlanes());
|
result.addAll(tile2.getSwimlanes());
|
||||||
return Collections.unmodifiableSet(result);
|
return Collections.unmodifiableSet(result);
|
||||||
@ -162,7 +162,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<WeldingPoint> getWeldingPoints() {
|
public List<WeldingPoint> getWeldingPoints() {
|
||||||
final List<WeldingPoint> result = new ArrayList<WeldingPoint>(tile1.getWeldingPoints());
|
final List<WeldingPoint> result = new ArrayList<>(tile1.getWeldingPoints());
|
||||||
result.addAll(tile2.getWeldingPoints());
|
result.addAll(tile2.getWeldingPoints());
|
||||||
return Collections.unmodifiableList(result);
|
return Collections.unmodifiableList(result);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class FtileDecorateWelding extends FtileDecorate {
|
|||||||
|
|
||||||
public FtileDecorateWelding(final Ftile ftile, final List<WeldingPoint> breaks) {
|
public FtileDecorateWelding(final Ftile ftile, final List<WeldingPoint> breaks) {
|
||||||
super(ftile);
|
super(ftile);
|
||||||
this.breaks = new ArrayList<WeldingPoint>(breaks);
|
this.breaks = new ArrayList<>(breaks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +103,7 @@ public class FtileEmpty extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (swimlaneIn != null) {
|
if (swimlaneIn != null) {
|
||||||
result.add(swimlaneIn);
|
result.add(swimlaneIn);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
|
|||||||
|
|
||||||
class FtileWithConnection extends FtileDecorate {
|
class FtileWithConnection extends FtileDecorate {
|
||||||
|
|
||||||
private final List<Connection> connections = new ArrayList<Connection>();
|
private final List<Connection> connections = new ArrayList<>();
|
||||||
|
|
||||||
FtileWithConnection(Ftile ftile, Collection<Connection> connections) {
|
FtileWithConnection(Ftile ftile, Collection<Connection> connections) {
|
||||||
super(ftile);
|
super(ftile);
|
||||||
@ -74,7 +74,7 @@ class FtileWithConnection extends FtileDecorate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Collection<Connection> getInnerConnections() {
|
public Collection<Connection> getInnerConnections() {
|
||||||
final List<Connection> result = new ArrayList<Connection>(super.getInnerConnections());
|
final List<Connection> result = new ArrayList<>(super.getInnerConnections());
|
||||||
result.addAll(connections);
|
result.addAll(connections);
|
||||||
return Collections.unmodifiableList(connections);
|
return Collections.unmodifiableList(connections);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ public class Snake implements UShape {
|
|||||||
final double move = 2 + colorArrowSeparationSpace;
|
final double move = 2 + colorArrowSeparationSpace;
|
||||||
final WormMutation mutation = WormMutation.create(worm, move);
|
final WormMutation mutation = WormMutation.create(worm, move);
|
||||||
if (mutation.isDxNegative()) {
|
if (mutation.isDxNegative()) {
|
||||||
colors = new ArrayList<HtmlColorAndStyle>(colors);
|
colors = new ArrayList<>(colors);
|
||||||
Collections.reverse(colors);
|
Collections.reverse(colors);
|
||||||
}
|
}
|
||||||
final double globalMove = -1.0 * (colors.size() - 1) / 2.0;
|
final double globalMove = -1.0 * (colors.size() - 1) / 2.0;
|
||||||
@ -270,7 +270,7 @@ public class Snake implements UShape {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Line2D> getHorizontalLines() {
|
public List<Line2D> getHorizontalLines() {
|
||||||
final List<Line2D> result = new ArrayList<Line2D>();
|
final List<Line2D> result = new ArrayList<>();
|
||||||
for (int i = 0; i < worm.size() - 1; i++) {
|
for (int i = 0; i < worm.size() - 1; i++) {
|
||||||
final Point2D pt1 = worm.get(i);
|
final Point2D pt1 = worm.get(i);
|
||||||
final Point2D pt2 = worm.get(i + 1);
|
final Point2D pt2 = worm.get(i + 1);
|
||||||
|
@ -93,9 +93,9 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
|||||||
private final ISkinParam skinParam;;
|
private final ISkinParam skinParam;;
|
||||||
private final Pragma pragma;
|
private final Pragma pragma;
|
||||||
|
|
||||||
private final List<Swimlane> swimlanesRaw = new ArrayList<Swimlane>();
|
private final List<Swimlane> swimlanesRaw = new ArrayList<>();
|
||||||
private final List<Swimlane> swimlanesSpecial = new ArrayList<Swimlane>();
|
private final List<Swimlane> swimlanesSpecial = new ArrayList<>();
|
||||||
private final List<LaneDivider> dividers = new ArrayList<LaneDivider>();
|
private final List<LaneDivider> dividers = new ArrayList<>();
|
||||||
private Swimlane currentSwimlane = null;
|
private Swimlane currentSwimlane = null;
|
||||||
|
|
||||||
private final Instruction root = new InstructionList();
|
private final Instruction root = new InstructionList();
|
||||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
|
|||||||
|
|
||||||
public class WormMutation {
|
public class WormMutation {
|
||||||
|
|
||||||
private final List<UTranslate> translations = new ArrayList<UTranslate>();
|
private final List<UTranslate> translations = new ArrayList<>();
|
||||||
|
|
||||||
private WormMutation() {
|
private WormMutation() {
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
|||||||
|
|
||||||
public class Zad {
|
public class Zad {
|
||||||
|
|
||||||
private final List<MinMax> rectangles = new ArrayList<MinMax>();
|
private final List<MinMax> rectangles = new ArrayList<>();
|
||||||
|
|
||||||
public void add(MinMax rect) {
|
public void add(MinMax rect) {
|
||||||
// System.err.println("add " + rect);
|
// System.err.println("add " + rect);
|
||||||
|
@ -65,7 +65,7 @@ public abstract class AbstractParallelFtilesBuilder {
|
|||||||
|
|
||||||
private final ISkinParam skinParam;
|
private final ISkinParam skinParam;
|
||||||
private final StringBounder stringBounder;
|
private final StringBounder stringBounder;
|
||||||
protected final List<Ftile> list99 = new ArrayList<Ftile>();
|
protected final List<Ftile> list99 = new ArrayList<>();
|
||||||
|
|
||||||
public StyleSignature getDefaultStyleDefinition() {
|
public StyleSignature getDefaultStyleDefinition() {
|
||||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||||
@ -83,7 +83,7 @@ public abstract class AbstractParallelFtilesBuilder {
|
|||||||
|
|
||||||
protected List<Ftile> getFoo2(List<Ftile> all) {
|
protected List<Ftile> getFoo2(List<Ftile> all) {
|
||||||
final double maxHeight = computeMaxHeight(all);
|
final double maxHeight = computeMaxHeight(all);
|
||||||
final List<Ftile> result = new ArrayList<Ftile>();
|
final List<Ftile> result = new ArrayList<>();
|
||||||
for (Ftile ftile : all) {
|
for (Ftile ftile : all) {
|
||||||
final Ftile newFtile = computeNewFtile(ftile, maxHeight);
|
final Ftile newFtile = computeNewFtile(ftile, maxHeight);
|
||||||
result.add(newFtile);
|
result.add(newFtile);
|
||||||
|
@ -75,7 +75,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Ftile createNude(Swimlane swimlane, List<Branch> branches) {
|
private Ftile createNude(Swimlane swimlane, List<Branch> branches) {
|
||||||
final List<Ftile> ftiles = new ArrayList<Ftile>();
|
final List<Ftile> ftiles = new ArrayList<>();
|
||||||
for (Branch branch : branches) {
|
for (Branch branch : branches) {
|
||||||
ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Ftile createWithDiamonds(Swimlane swimlane, List<Branch> branches, Display labelTest) {
|
private Ftile createWithDiamonds(Swimlane swimlane, List<Branch> branches, Display labelTest) {
|
||||||
final List<Ftile> ftiles = new ArrayList<Ftile>();
|
final List<Ftile> ftiles = new ArrayList<>();
|
||||||
for (Branch branch : branches) {
|
for (Branch branch : branches) {
|
||||||
ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Ftile createWithLinks(Swimlane swimlane, List<Branch> branches, Display labelTest) {
|
private Ftile createWithLinks(Swimlane swimlane, List<Branch> branches, Display labelTest) {
|
||||||
final List<Ftile> ftiles = new ArrayList<Ftile>();
|
final List<Ftile> ftiles = new ArrayList<>();
|
||||||
final Ftile diamond1 = getDiamond1(swimlane, branches.get(0), labelTest);
|
final Ftile diamond1 = getDiamond1(swimlane, branches.get(0), labelTest);
|
||||||
final Ftile diamond2 = getDiamond2(swimlane, branches.get(0));
|
final Ftile diamond2 = getDiamond2(swimlane, branches.get(0));
|
||||||
for (Branch branch : branches) {
|
for (Branch branch : branches) {
|
||||||
@ -104,7 +104,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||||||
if (ftiles.size() == 1) {
|
if (ftiles.size() == 1) {
|
||||||
final FtileSwitchWithOneLink result = new FtileSwitchWithOneLink(ftiles, branches, swimlane, diamond1,
|
final FtileSwitchWithOneLink result = new FtileSwitchWithOneLink(ftiles, branches, swimlane, diamond1,
|
||||||
diamond2, getStringBounder(), arrowColor);
|
diamond2, getStringBounder(), arrowColor);
|
||||||
return result.addLinks();
|
return result.addLinks(getStringBounder());
|
||||||
}
|
}
|
||||||
final FtileSwitchWithManyLinks result = new FtileSwitchWithManyLinks(ftiles, branches, swimlane, diamond1,
|
final FtileSwitchWithManyLinks result = new FtileSwitchWithManyLinks(ftiles, branches, swimlane, diamond1,
|
||||||
diamond2, getStringBounder(), arrowColor);
|
diamond2, getStringBounder(), arrowColor);
|
||||||
@ -114,23 +114,27 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||||||
|
|
||||||
private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) {
|
private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) {
|
||||||
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||||
final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
|
final HColor backColor = branch0.getColor() == null
|
||||||
ColorParam.activityDiamondBackground) : branch0.getColor();
|
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||||
|
: branch0.getColor();
|
||||||
|
|
||||||
final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||||
|
|
||||||
final TextBlock tbTest = (Display.isNull(test) || test.isWhite()) ? TextBlockUtils.empty(0, 0) : test.create(
|
final TextBlock tbTest = (Display.isNull(test) || test.isWhite()) ? TextBlockUtils.empty(0, 0)
|
||||||
fcDiamond, branch0.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), branch0.skinParam());
|
: test.create(fcDiamond, branch0.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
|
||||||
|
branch0.skinParam());
|
||||||
|
|
||||||
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, tbTest);
|
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, tbTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Ftile getDiamond2(Swimlane swimlane, Branch branch0) {
|
private Ftile getDiamond2(Swimlane swimlane, Branch branch0) {
|
||||||
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||||
final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
|
final HColor backColor = branch0.getColor() == null
|
||||||
ColorParam.activityDiamondBackground) : branch0.getColor();
|
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||||
|
: branch0.getColor();
|
||||||
|
|
||||||
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, TextBlockUtils.empty(0, 0));
|
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane,
|
||||||
|
TextBlockUtils.empty(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private HColor fontColor(FontParam param) {
|
private HColor fontColor(FontParam param) {
|
||||||
|
@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
|
|||||||
|
|
||||||
class FtileForkInner extends AbstractFtile {
|
class FtileForkInner extends AbstractFtile {
|
||||||
|
|
||||||
private final List<Ftile> forks = new ArrayList<Ftile>();
|
private final List<Ftile> forks = new ArrayList<>();
|
||||||
|
|
||||||
public FtileForkInner(List<Ftile> forks) {
|
public FtileForkInner(List<Ftile> forks) {
|
||||||
super(forks.get(0).skinParam());
|
super(forks.get(0).skinParam());
|
||||||
@ -82,7 +82,7 @@ class FtileForkInner extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
for (Ftile tile : tiles) {
|
for (Ftile tile : tiles) {
|
||||||
result.addAll(tile.getSwimlanes());
|
result.addAll(tile.getSwimlanes());
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
|
|||||||
|
|
||||||
class FtileForkInnerOverlapped extends AbstractFtile {
|
class FtileForkInnerOverlapped extends AbstractFtile {
|
||||||
|
|
||||||
private final List<Ftile> forks = new ArrayList<Ftile>();
|
private final List<Ftile> forks = new ArrayList<>();
|
||||||
|
|
||||||
public FtileForkInnerOverlapped(List<Ftile> forks) {
|
public FtileForkInnerOverlapped(List<Ftile> forks) {
|
||||||
super(forks.get(0).skinParam());
|
super(forks.get(0).skinParam());
|
||||||
@ -75,7 +75,7 @@ class FtileForkInnerOverlapped extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
for (Ftile tile : tiles) {
|
for (Ftile tile : tiles) {
|
||||||
result.addAll(tile.getSwimlanes());
|
result.addAll(tile.getSwimlanes());
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class FtileIfAndStop extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ class FtileIfAndStop extends AbstractFtile {
|
|||||||
// }
|
// }
|
||||||
final FtileIfAndStop result = new FtileIfAndStop(diamond1, tileNonStop, arrowColor, stopFtile);
|
final FtileIfAndStop result = new FtileIfAndStop(diamond1, tileNonStop, arrowColor, stopFtile);
|
||||||
|
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
conns.add(result.new ConnectionHorizontal(arrowColor));
|
conns.add(result.new ConnectionHorizontal(arrowColor));
|
||||||
// conns.add(result.new ConnectionHorizontalThenVertical(tile2));
|
// conns.add(result.new ConnectionHorizontalThenVertical(tile2));
|
||||||
// if (tile1.calculateDimension(stringBounder).hasPointOut()
|
// if (tile1.calculateDimension(stringBounder).hasPointOut()
|
||||||
|
@ -85,7 +85,7 @@ public class FtileIfDown extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>(thenBlock.getSwimlanes());
|
final Set<Swimlane> result = new HashSet<>(thenBlock.getSwimlanes());
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ public class FtileIfDown extends AbstractFtile {
|
|||||||
optionalStop == null ? diamond2 : new FtileEmpty(ftileFactory.skinParam()), optionalStop,
|
optionalStop == null ? diamond2 : new FtileEmpty(ftileFactory.skinParam()), optionalStop,
|
||||||
conditionEndStyle);
|
conditionEndStyle);
|
||||||
|
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
conns.add(result.new ConnectionIn(thenBlock.getInLinkRendering().getRainbow(arrowColor)));
|
conns.add(result.new ConnectionIn(thenBlock.getInLinkRendering().getRainbow(arrowColor)));
|
||||||
final boolean hasPointOut1 = thenBlock.calculateDimension(ftileFactory.getStringBounder()).hasPointOut();
|
final boolean hasPointOut1 = thenBlock.calculateDimension(ftileFactory.getStringBounder()).hasPointOut();
|
||||||
if (optionalStop == null) {
|
if (optionalStop == null) {
|
||||||
|
@ -81,7 +81,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
private final List<Ftile> tiles;
|
private final List<Ftile> tiles;
|
||||||
private final Ftile tile2;
|
private final Ftile tile2;
|
||||||
private final List<Ftile> diamonds;
|
private final List<Ftile> diamonds;
|
||||||
private final List<Ftile> couples = new ArrayList<Ftile>();
|
private final List<Ftile> couples = new ArrayList<>();
|
||||||
|
|
||||||
private final Rainbow arrowColor;
|
private final Rainbow arrowColor;
|
||||||
|
|
||||||
@ -97,8 +97,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
couples.add(FtileUtils.addHorizontalMargin(tmp, inlabelSizes.get(i), 0));
|
couples.add(FtileUtils.addHorizontalMargin(tmp, inlabelSizes.get(i), 0));
|
||||||
}
|
}
|
||||||
this.tile2 = tile2;
|
this.tile2 = tile2;
|
||||||
this.diamonds = new ArrayList<Ftile>(diamonds);
|
this.diamonds = new ArrayList<>(diamonds);
|
||||||
this.tiles = new ArrayList<Ftile>(tiles);
|
this.tiles = new ArrayList<>(tiles);
|
||||||
|
|
||||||
this.arrowColor = arrowColor;
|
this.arrowColor = arrowColor;
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
for (Ftile diamond : diamonds) {
|
for (Ftile diamond : diamonds) {
|
||||||
maxOutY = Math.max(maxOutY, diamond.calculateDimension(stringBounder).getOutY());
|
maxOutY = Math.max(maxOutY, diamond.calculateDimension(stringBounder).getOutY());
|
||||||
}
|
}
|
||||||
final List<Ftile> result = new ArrayList<Ftile>();
|
final List<Ftile> result = new ArrayList<>();
|
||||||
for (int i = 0; i < diamonds.size(); i++) {
|
for (int i = 0; i < diamonds.size(); i++) {
|
||||||
Ftile diamond = diamonds.get(i);
|
Ftile diamond = diamonds.get(i);
|
||||||
final double missing = maxOutY - diamond.calculateDimension(stringBounder).getOutY();
|
final double missing = maxOutY - diamond.calculateDimension(stringBounder).getOutY();
|
||||||
@ -121,7 +121,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
|
FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
|
||||||
FontConfiguration fcTest) {
|
FontConfiguration fcTest) {
|
||||||
Objects.requireNonNull(afterEndwhile);
|
Objects.requireNonNull(afterEndwhile);
|
||||||
final List<Ftile> tiles = new ArrayList<Ftile>();
|
final List<Ftile> tiles = new ArrayList<>();
|
||||||
|
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
||||||
@ -153,8 +153,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30);
|
final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30);
|
||||||
|
|
||||||
List<Ftile> diamonds = new ArrayList<Ftile>();
|
List<Ftile> diamonds = new ArrayList<>();
|
||||||
List<Double> inlabelSizes = new ArrayList<Double>();
|
List<Double> inlabelSizes = new ArrayList<>();
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
|
final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
|
||||||
ftileFactory.skinParam());
|
ftileFactory.skinParam());
|
||||||
@ -186,7 +186,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2,
|
final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2,
|
||||||
arrowColor);
|
arrowColor);
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
|
|
||||||
int nbOut = 0;
|
int nbOut = 0;
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D totalDim = calculateDimensionInternal(stringBounder);
|
final Dimension2D totalDim = calculateDimensionInternal(stringBounder);
|
||||||
|
|
||||||
final List<Ftile> allTiles = new ArrayList<Ftile>(couples);
|
final List<Ftile> allTiles = new ArrayList<>(couples);
|
||||||
allTiles.add(tile2);
|
allTiles.add(tile2);
|
||||||
|
|
||||||
final double[] minmax;
|
final double[] minmax;
|
||||||
@ -589,7 +589,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
final List<Ftile> result = new ArrayList<Ftile>(tiles);
|
final List<Ftile> result = new ArrayList<>(tiles);
|
||||||
result.add(tile2);
|
result.add(tile2);
|
||||||
return Collections.unmodifiableList(result);
|
return Collections.unmodifiableList(result);
|
||||||
}
|
}
|
||||||
@ -689,7 +689,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
||||||
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
||||||
|
|
||||||
final List<Ftile> all = new ArrayList<Ftile>(tiles);
|
final List<Ftile> all = new ArrayList<>(tiles);
|
||||||
all.add(tile2);
|
all.add(tile2);
|
||||||
for (Ftile tmp : all) {
|
for (Ftile tmp : all) {
|
||||||
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
||||||
|
@ -85,7 +85,7 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
final List<Ftile> result = new ArrayList<Ftile>(tiles);
|
final List<Ftile> result = new ArrayList<>(tiles);
|
||||||
result.add(tile2);
|
result.add(tile2);
|
||||||
return Collections.unmodifiableList(result);
|
return Collections.unmodifiableList(result);
|
||||||
}
|
}
|
||||||
@ -98,15 +98,15 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
this.lastDiamond = lastDiamond;
|
this.lastDiamond = lastDiamond;
|
||||||
this.tile2 = tile2;
|
this.tile2 = tile2;
|
||||||
this.diamonds = new ArrayList<Ftile>(diamonds);
|
this.diamonds = new ArrayList<>(diamonds);
|
||||||
this.tiles = new ArrayList<Ftile>(tiles);
|
this.tiles = new ArrayList<>(tiles);
|
||||||
|
|
||||||
this.arrowColor = arrowColor;
|
this.arrowColor = arrowColor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
|
static Ftile create(Swimlane swimlane, HColor borderColor, HColor 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 fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) {
|
||||||
final List<Ftile> tiles = new ArrayList<Ftile>();
|
final List<Ftile> tiles = new ArrayList<>();
|
||||||
|
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
||||||
@ -136,7 +136,7 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
|
|
||||||
final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30);
|
final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30);
|
||||||
|
|
||||||
List<Ftile> diamonds = new ArrayList<Ftile>();
|
List<Ftile> diamonds = new ArrayList<>();
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT,
|
final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT,
|
||||||
ftileFactory.skinParam());
|
ftileFactory.skinParam());
|
||||||
@ -159,7 +159,7 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
|
|
||||||
final FtileIfLongVertical result = new FtileIfLongVertical(diamonds, tiles, tile2, arrowColor, lastDiamond);
|
final FtileIfLongVertical result = new FtileIfLongVertical(diamonds, tiles, tile2, arrowColor, lastDiamond);
|
||||||
|
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
for (int i = 0; i < thens.size(); i++) {
|
for (int i = 0; i < thens.size(); i++) {
|
||||||
final Ftile ftile = tiles.get(i);
|
final Ftile ftile = tiles.get(i);
|
||||||
final Ftile diam = diamonds.get(i);
|
final Ftile diam = diamonds.get(i);
|
||||||
@ -518,7 +518,7 @@ class FtileIfLongVertical extends AbstractFtile {
|
|||||||
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
||||||
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
||||||
|
|
||||||
final List<Ftile> all = new ArrayList<Ftile>(tiles);
|
final List<Ftile> all = new ArrayList<>(tiles);
|
||||||
all.add(tile2);
|
all.add(tile2);
|
||||||
for (Ftile tmp : all) {
|
for (Ftile tmp : all) {
|
||||||
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
||||||
|
@ -109,7 +109,7 @@ class FtileRepeat extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>(repeat.getSwimlanes());
|
final Set<Swimlane> result = new HashSet<>(repeat.getSwimlanes());
|
||||||
result.addAll(diamond1.getSwimlanes());
|
result.addAll(diamond1.getSwimlanes());
|
||||||
result.addAll(diamond2.getSwimlanes());
|
result.addAll(diamond2.getSwimlanes());
|
||||||
return Collections.unmodifiableSet(result);
|
return Collections.unmodifiableSet(result);
|
||||||
@ -158,7 +158,7 @@ class FtileRepeat extends AbstractFtile {
|
|||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
final Display in1 = repeat.getInLinkRendering().getDisplay();
|
final Display in1 = repeat.getInLinkRendering().getDisplay();
|
||||||
final TextBlock tbin1 = in1 == null ? null
|
final TextBlock tbin1 = in1 == null ? null
|
||||||
: in1.create7(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE);
|
: in1.create7(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE);
|
||||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
|
|||||||
|
|
||||||
class FtileSplit1 extends AbstractFtile {
|
class FtileSplit1 extends AbstractFtile {
|
||||||
|
|
||||||
private final List<Ftile> forks = new ArrayList<Ftile>();
|
private final List<Ftile> forks = new ArrayList<>();
|
||||||
|
|
||||||
public FtileSplit1(List<Ftile> forks) {
|
public FtileSplit1(List<Ftile> forks) {
|
||||||
super(forks.get(0).skinParam());
|
super(forks.get(0).skinParam());
|
||||||
@ -76,7 +76,7 @@ class FtileSplit1 extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
for (Ftile tile : tiles) {
|
for (Ftile tile : tiles) {
|
||||||
result.addAll(tile.getSwimlanes());
|
result.addAll(tile.getSwimlanes());
|
||||||
}
|
}
|
||||||
|
@ -75,13 +75,13 @@ class FtileSwitch extends AbstractFtile {
|
|||||||
|
|
||||||
private FtileSwitch(List<Double> inlabelSizes, List<Ftile> tiles, Rainbow arrowColor) {
|
private FtileSwitch(List<Double> inlabelSizes, List<Ftile> tiles, Rainbow arrowColor) {
|
||||||
super(tiles.get(0).skinParam());
|
super(tiles.get(0).skinParam());
|
||||||
this.tiles = new ArrayList<Ftile>(tiles);
|
this.tiles = new ArrayList<>(tiles);
|
||||||
this.arrowColor = arrowColor;
|
this.arrowColor = arrowColor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
@ -100,13 +100,13 @@ class FtileSwitch extends AbstractFtile {
|
|||||||
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, FontConfiguration fcArrow,
|
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, FontConfiguration fcArrow,
|
||||||
LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) {
|
LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) {
|
||||||
Objects.requireNonNull(afterEndwhile);
|
Objects.requireNonNull(afterEndwhile);
|
||||||
final List<Ftile> tiles = new ArrayList<Ftile>();
|
final List<Ftile> tiles = new ArrayList<>();
|
||||||
|
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Double> inlabelSizes = new ArrayList<Double>();
|
List<Double> inlabelSizes = new ArrayList<>();
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
|
final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
|
||||||
ftileFactory.skinParam());
|
ftileFactory.skinParam());
|
||||||
@ -134,7 +134,7 @@ class FtileSwitch extends AbstractFtile {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
final List<Ftile> result = new ArrayList<Ftile>(tiles);
|
final List<Ftile> result = new ArrayList<>(tiles);
|
||||||
return Collections.unmodifiableList(result);
|
return Collections.unmodifiableList(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ class FtileSwitch extends AbstractFtile {
|
|||||||
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
||||||
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
||||||
|
|
||||||
final List<Ftile> all = new ArrayList<Ftile>(tiles);
|
final List<Ftile> all = new ArrayList<>(tiles);
|
||||||
for (Ftile tmp : all) {
|
for (Ftile tmp : all) {
|
||||||
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
if (tmp.calculateDimension(stringBounder).hasPointOut()) {
|
||||||
return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight());
|
return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight());
|
||||||
|
@ -92,7 +92,7 @@ class FtileWhile extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>(whileBlock.getSwimlanes());
|
final Set<Swimlane> result = new HashSet<>(whileBlock.getSwimlanes());
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ class FtileWhile extends AbstractFtile {
|
|||||||
final TextBlock back1 = incoming1.getDisplay().create(fontArrow, HorizontalAlignment.LEFT,
|
final TextBlock back1 = incoming1.getDisplay().create(fontArrow, HorizontalAlignment.LEFT,
|
||||||
ftileFactory.skinParam());
|
ftileFactory.skinParam());
|
||||||
|
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
if (dim.getWidth() == 0 || dim.getHeight() == 0) {
|
if (dim.getWidth() == 0 || dim.getHeight() == 0) {
|
||||||
conns.add(result.new ConnectionBackEmpty(incoming1.getRainbow()));
|
conns.add(result.new ConnectionBackEmpty(incoming1.getRainbow()));
|
||||||
} else {
|
} else {
|
||||||
|
@ -95,7 +95,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
|||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
if (swimlaneNote != null) {
|
if (swimlaneNote != null) {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>(tile.getSwimlanes());
|
final Set<Swimlane> result = new HashSet<>(tile.getSwimlanes());
|
||||||
result.add(swimlaneNote);
|
result.add(swimlaneNote);
|
||||||
return Collections.unmodifiableSet(result);
|
return Collections.unmodifiableSet(result);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
|
|||||||
final double maxHeight = computeMaxHeight(all);
|
final double maxHeight = computeMaxHeight(all);
|
||||||
final double ymargin1 = getSuppSpace1(all, getStringBounder());
|
final double ymargin1 = getSuppSpace1(all, getStringBounder());
|
||||||
final double ymargin2 = getSuppSpace2(all, getStringBounder());
|
final double ymargin2 = getSuppSpace2(all, getStringBounder());
|
||||||
final List<Ftile> result = new ArrayList<Ftile>();
|
final List<Ftile> result = new ArrayList<>();
|
||||||
for (Ftile ftile : all) {
|
for (Ftile ftile : all) {
|
||||||
final Ftile newFtile = computeNewFtile(ftile, maxHeight, ymargin1, ymargin2);
|
final Ftile newFtile = computeNewFtile(ftile, maxHeight, ymargin1, ymargin2);
|
||||||
result.add(newFtile);
|
result.add(newFtile);
|
||||||
@ -128,7 +128,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
|
|||||||
@Override
|
@Override
|
||||||
protected Ftile doStep1(Ftile middle) {
|
protected Ftile doStep1(Ftile middle) {
|
||||||
Ftile result = middle;
|
Ftile result = middle;
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
final Swimlane swimlaneBlack = in;
|
final Swimlane swimlaneBlack = in;
|
||||||
final Ftile black = new FtileBlackBlock(skinParam(),
|
final Ftile black = new FtileBlackBlock(skinParam(),
|
||||||
getRose().getHtmlColor(skinParam(), ColorParam.activityBar), swimlaneBlack);
|
getRose().getHtmlColor(skinParam(), ColorParam.activityBar), swimlaneBlack);
|
||||||
@ -196,7 +196,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
|
|||||||
((FtileBlackBlock) out).setLabel(getTextBlock(Display.getWithNewlines(label)));
|
((FtileBlackBlock) out).setLabel(getTextBlock(Display.getWithNewlines(label)));
|
||||||
}
|
}
|
||||||
result = new FtileAssemblySimple(result, out);
|
result = new FtileAssemblySimple(result, out);
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
double x = 0;
|
double x = 0;
|
||||||
for (Ftile tmp : list99) {
|
for (Ftile tmp : list99) {
|
||||||
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
||||||
|
@ -72,7 +72,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
|
|||||||
@Override
|
@Override
|
||||||
protected Ftile doStep1(Ftile inner) {
|
protected Ftile doStep1(Ftile inner) {
|
||||||
Ftile result = inner;
|
Ftile result = inner;
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
final HColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar);
|
final HColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar);
|
||||||
|
|
||||||
final Ftile black = new FtileBlackBlock(skinParam(), colorBar, list99.get(0).getSwimlaneIn());
|
final Ftile black = new FtileBlackBlock(skinParam(), colorBar, list99.get(0).getSwimlaneIn());
|
||||||
@ -104,7 +104,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
|
|||||||
final HColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
|
final HColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
|
||||||
final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2());
|
final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2());
|
||||||
result = new FtileAssemblySimple(result, out);
|
result = new FtileAssemblySimple(result, out);
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
final UTranslate diamondTranslate = result.getTranslateFor(out, getStringBounder());
|
final UTranslate diamondTranslate = result.getTranslateFor(out, getStringBounder());
|
||||||
int i = 0;
|
int i = 0;
|
||||||
double x = 0;
|
double x = 0;
|
||||||
|
@ -77,7 +77,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||||||
@Override
|
@Override
|
||||||
protected Ftile doStep1(Ftile inner) {
|
protected Ftile doStep1(Ftile inner) {
|
||||||
Ftile result = inner;
|
Ftile result = inner;
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
final Rainbow thinColor;
|
final Rainbow thinColor;
|
||||||
if (UseStyle.useBetaStyle()) {
|
if (UseStyle.useBetaStyle()) {
|
||||||
Style style = getDefaultStyleDefinition().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
Style style = getDefaultStyleDefinition().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||||
@ -171,7 +171,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||||||
|
|
||||||
final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlaneOutForStep2());
|
final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlaneOutForStep2());
|
||||||
result = new FtileAssemblySimple(result, out);
|
result = new FtileAssemblySimple(result, out);
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
double x = 0;
|
double x = 0;
|
||||||
double first = 0;
|
double first = 0;
|
||||||
double last = 0;
|
double last = 0;
|
||||||
|
@ -181,7 +181,7 @@ public class VCompactFactory implements FtileFactory {
|
|||||||
|
|
||||||
public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
|
public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
|
||||||
LinkRendering topInlinkRendering, Url url) {
|
LinkRendering topInlinkRendering, Url url) {
|
||||||
final List<Ftile> ftiles = new ArrayList<Ftile>();
|
final List<Ftile> ftiles = new ArrayList<>();
|
||||||
for (Branch branch : thens) {
|
for (Branch branch : thens) {
|
||||||
ftiles.add(branch.getFtile());
|
ftiles.add(branch.getFtile());
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ public class VCompactFactory implements FtileFactory {
|
|||||||
|
|
||||||
public Ftile createSwitch(Swimlane swimlane, List<Branch> branches, LinkRendering afterEndwhile,
|
public Ftile createSwitch(Swimlane swimlane, List<Branch> branches, LinkRendering afterEndwhile,
|
||||||
LinkRendering topInlinkRendering, Display labelTest) {
|
LinkRendering topInlinkRendering, Display labelTest) {
|
||||||
final List<Ftile> ftiles = new ArrayList<Ftile>();
|
final List<Ftile> ftiles = new ArrayList<>();
|
||||||
for (Branch branch : branches) {
|
for (Branch branch : branches) {
|
||||||
ftiles.add(branch.getFtile());
|
ftiles.add(branch.getFtile());
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public class FtileIfNude extends FtileDimensionMemoize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
|
@ -421,7 +421,7 @@ public class FtileIfWithLinks extends FtileIfWithDiamonds {
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D totalDim = calculateDimensionInternal(stringBounder);
|
final Dimension2D totalDim = calculateDimensionInternal(stringBounder);
|
||||||
|
|
||||||
final List<Ftile> allTiles = new ArrayList<Ftile>();
|
final List<Ftile> allTiles = new ArrayList<>();
|
||||||
allTiles.add(tile1);
|
allTiles.add(tile1);
|
||||||
allTiles.add(tile2);
|
allTiles.add(tile2);
|
||||||
|
|
||||||
@ -533,7 +533,7 @@ public class FtileIfWithLinks extends FtileIfWithDiamonds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile addLinks(Branch branch1, Branch branch2, StringBounder stringBounder) {
|
public Ftile addLinks(Branch branch1, Branch branch2, StringBounder stringBounder) {
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
conns.add(new ConnectionHorizontalThenVertical(tile1, branch1));
|
conns.add(new ConnectionHorizontalThenVertical(tile1, branch1));
|
||||||
conns.add(new ConnectionHorizontalThenVertical(tile2, branch2));
|
conns.add(new ConnectionHorizontalThenVertical(tile2, branch2));
|
||||||
final boolean hasPointOut1 = tile1.calculateDimension(stringBounder).hasPointOut();
|
final boolean hasPointOut1 = tile1.calculateDimension(stringBounder).hasPointOut();
|
||||||
|
@ -69,7 +69,7 @@ public class FtileSwitchNude extends FtileDimensionMemoize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
final Set<Swimlane> result = new HashSet<Swimlane>();
|
final Set<Swimlane> result = new HashSet<>();
|
||||||
if (getSwimlaneIn() != null) {
|
if (getSwimlaneIn() != null) {
|
||||||
result.add(getSwimlaneIn());
|
result.add(getSwimlaneIn());
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ public class FtileSwitchNude extends FtileDimensionMemoize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
final protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
||||||
final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder);
|
final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder);
|
||||||
for (Ftile tile : tiles)
|
for (Ftile tile : tiles)
|
||||||
if (tile.calculateDimension(stringBounder).hasPointOut()) {
|
if (tile.calculateDimension(stringBounder).hasPointOut()) {
|
||||||
|
@ -96,7 +96,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
final Collection<Ftile> result = new ArrayList<Ftile>(super.getMyChildren());
|
final Collection<Ftile> result = new ArrayList<>(super.getMyChildren());
|
||||||
result.add(diamond1);
|
result.add(diamond1);
|
||||||
result.add(diamond2);
|
result.add(diamond2);
|
||||||
return Collections.unmodifiableCollection(result);
|
return Collections.unmodifiableCollection(result);
|
||||||
@ -111,7 +111,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) {
|
final protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) {
|
||||||
final FtileGeometry dim1 = diamond1.calculateDimension(stringBounder);
|
final FtileGeometry dim1 = diamond1.calculateDimension(stringBounder);
|
||||||
final FtileGeometry dim2 = diamond2.calculateDimension(stringBounder);
|
final FtileGeometry dim2 = diamond2.calculateDimension(stringBounder);
|
||||||
|
|
||||||
@ -145,7 +145,10 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
|
|||||||
} else {
|
} else {
|
||||||
super.drawU(ug.apply(getTranslateMain(stringBounder)));
|
super.drawU(ug.apply(getTranslateMain(stringBounder)));
|
||||||
}
|
}
|
||||||
ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2);
|
|
||||||
|
if (calculateDimension(stringBounder).hasPointOut()) {
|
||||||
|
ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected UTranslate getTranslateOf(Ftile tile, StringBounder stringBounder) {
|
protected UTranslate getTranslateOf(Ftile tile, StringBounder stringBounder) {
|
||||||
@ -194,7 +197,8 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
|
|||||||
|
|
||||||
protected TextBlock getLabelPositive(Branch branch) {
|
protected TextBlock getLabelPositive(Branch branch) {
|
||||||
final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||||
return branch.getLabelPositive().create7(fcArrow, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
return branch.getLabelPositive().create7(fcArrow, HorizontalAlignment.LEFT, skinParam(),
|
||||||
|
CreoleMode.SIMPLE_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile addLinks() {
|
public Ftile addLinks() {
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
conns.add(new ConnectionHorizontalThenVertical(tiles.get(0), branches.get(0)));
|
conns.add(new ConnectionHorizontalThenVertical(tiles.get(0), branches.get(0)));
|
||||||
conns.add(new ConnectionHorizontalThenVertical(tiles.get(tiles.size() - 1), branches.get(tiles.size() - 1)));
|
conns.add(new ConnectionHorizontalThenVertical(tiles.get(tiles.size() - 1), branches.get(tiles.size() - 1)));
|
||||||
conns.add(new ConnectionVerticalThenHorizontal(tiles.get(0)));
|
conns.add(new ConnectionVerticalThenHorizontal(tiles.get(0)));
|
||||||
|
@ -80,8 +80,8 @@ public class FtileSwitchWithOneLink extends FtileSwitchWithDiamonds {
|
|||||||
final double x2 = p2.getX();
|
final double x2 = p2.getX();
|
||||||
final double y2 = p2.getY();
|
final double y2 = p2.getY();
|
||||||
|
|
||||||
final Snake snake = Snake.create(null, arrowColor, Arrows.asToDown())
|
final Snake snake = Snake.create(null, arrowColor, Arrows.asToDown()).withLabel(getLabelPositive(branch),
|
||||||
.withLabel(getLabelPositive(branch), arrowHorizontalAlignment());
|
arrowHorizontalAlignment());
|
||||||
// snake.addPoint(x1, y1);
|
// snake.addPoint(x1, y1);
|
||||||
snake.addPoint(x2, y1);
|
snake.addPoint(x2, y1);
|
||||||
snake.addPoint(x2, y2);
|
snake.addPoint(x2, y2);
|
||||||
@ -134,10 +134,14 @@ public class FtileSwitchWithOneLink extends FtileSwitchWithDiamonds {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ftile addLinks() {
|
public Ftile addLinks(StringBounder stringBounder) {
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<>();
|
||||||
conns.add(new ConnectionVerticalTop(tiles.get(0), branches.get(0)));
|
final Ftile single = tiles.get(0);
|
||||||
conns.add(new ConnectionVerticalBottom(tiles.get(0)));
|
conns.add(new ConnectionVerticalTop(single, branches.get(0)));
|
||||||
|
|
||||||
|
if (single.calculateDimension(stringBounder).hasPointOut()) {
|
||||||
|
conns.add(new ConnectionVerticalBottom(single));
|
||||||
|
}
|
||||||
|
|
||||||
return FtileUtils.addConnection(this, conns);
|
return FtileUtils.addConnection(this, conns);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class Animation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Animation create(List<String> descriptions) {
|
public static Animation create(List<String> descriptions) {
|
||||||
final List<AffineTransformation> all = new ArrayList<AffineTransformation>();
|
final List<AffineTransformation> all = new ArrayList<>();
|
||||||
for (String s : descriptions) {
|
for (String s : descriptions) {
|
||||||
final AffineTransformation tmp = AffineTransformation.create(s);
|
final AffineTransformation tmp = AffineTransformation.create(s);
|
||||||
if (tmp != null) {
|
if (tmp != null) {
|
||||||
|
@ -41,14 +41,12 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import javax.script.ScriptException;
|
|
||||||
|
|
||||||
public class AnimationDecoder {
|
public class AnimationDecoder {
|
||||||
|
|
||||||
private final List<String> result = new ArrayList<String>();
|
private final List<String> result = new ArrayList<>();
|
||||||
|
|
||||||
|
public AnimationDecoder(Iterable<CharSequence> data) {
|
||||||
|
|
||||||
public AnimationDecoder(Iterable<CharSequence> data) throws ScriptException {
|
|
||||||
|
|
||||||
for (final Iterator<CharSequence> it = data.iterator(); it.hasNext();) {
|
for (final Iterator<CharSequence> it = data.iterator(); it.hasNext();) {
|
||||||
String line = it.next().toString();
|
String line = it.next().toString();
|
||||||
if (line.matches("^\\s*\\[script\\]\\s*$")) {
|
if (line.matches("^\\s*\\[script\\]\\s*$")) {
|
||||||
|
@ -35,22 +35,14 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.plantuml.anim;
|
package net.sourceforge.plantuml.anim;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.StringWriter;
|
|
||||||
|
|
||||||
import javax.script.ScriptContext;
|
|
||||||
import javax.script.ScriptEngine;
|
|
||||||
import javax.script.ScriptEngineManager;
|
|
||||||
import javax.script.ScriptException;
|
|
||||||
|
|
||||||
public class AnimationScript {
|
public class AnimationScript {
|
||||||
|
|
||||||
private final ScriptEngine engine;
|
// private final ScriptEngine engine;
|
||||||
|
|
||||||
public AnimationScript() {
|
public AnimationScript() {
|
||||||
|
|
||||||
final ScriptEngineManager manager = new ScriptEngineManager();
|
// final ScriptEngineManager manager = new ScriptEngineManager();
|
||||||
engine = manager.getEngineByName("js");
|
// engine = manager.getEngineByName("js");
|
||||||
|
|
||||||
// ScriptEngineManager manager = new ScriptEngineManager();
|
// ScriptEngineManager manager = new ScriptEngineManager();
|
||||||
// List<ScriptEngineFactory> factories = manager.getEngineFactories();
|
// List<ScriptEngineFactory> factories = manager.getEngineFactories();
|
||||||
@ -67,12 +59,13 @@ public class AnimationScript {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String eval(String line) throws ScriptException {
|
public String eval(String line) {
|
||||||
final ScriptContext context = engine.getContext();
|
throw new UnsupportedOperationException();
|
||||||
final StringWriter sw = new StringWriter();
|
// final ScriptContext context = engine.getContext();
|
||||||
context.setWriter(new PrintWriter(sw));
|
// final StringWriter sw = new StringWriter();
|
||||||
engine.eval(line, context);
|
// context.setWriter(new PrintWriter(sw));
|
||||||
final String result = sw.toString();
|
// engine.eval(line, context);
|
||||||
return result;
|
// final String result = sw.toString();
|
||||||
|
// return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@ import net.sourceforge.plantuml.security.SecurityUtils;
|
|||||||
public class CheckZipTask extends Task {
|
public class CheckZipTask extends Task {
|
||||||
|
|
||||||
private String zipfile = null;
|
private String zipfile = null;
|
||||||
private List<FileSet> filesets = new ArrayList<FileSet>();
|
private List<FileSet> filesets = new ArrayList<>();
|
||||||
private List<FileList> filelists = new ArrayList<FileList>();
|
private List<FileList> filelists = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a set of files to touch
|
* Add a set of files to touch
|
||||||
@ -107,7 +107,7 @@ public class CheckZipTask extends Task {
|
|||||||
return entries.contains(s);
|
return entries.contains(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final List<String> entries = new ArrayList<String>();
|
private final List<String> entries = new ArrayList<>();
|
||||||
|
|
||||||
private void loadZipFile(SFile file) throws IOException {
|
private void loadZipFile(SFile file) throws IOException {
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ public class PlantUmlTask extends Task {
|
|||||||
|
|
||||||
private String dir = null;
|
private String dir = null;
|
||||||
private final Option option = new Option();
|
private final Option option = new Option();
|
||||||
private List<FileSet> filesets = new ArrayList<FileSet>();
|
private List<FileSet> filesets = new ArrayList<>();
|
||||||
private List<FileList> filelists = new ArrayList<FileList>();
|
private List<FileList> filelists = new ArrayList<>();
|
||||||
private AtomicInteger nbFiles = new AtomicInteger(0);
|
private AtomicInteger nbFiles = new AtomicInteger(0);
|
||||||
private ExecutorService executorService;
|
private ExecutorService executorService;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public class BasicCharAreaImpl implements BasicCharArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getLines() {
|
public List<String> getLines() {
|
||||||
final List<String> result = new ArrayList<String>(height);
|
final List<String> result = new ArrayList<>(height);
|
||||||
for (int y = 0; y < height; y++) {
|
for (int y = 0; y < height; y++) {
|
||||||
result.add(getLine(y));
|
result.add(getLine(y));
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ public class BNode {
|
|||||||
private final int stage;
|
private final int stage;
|
||||||
private int x = -1;
|
private int x = -1;
|
||||||
private BNode parent;
|
private BNode parent;
|
||||||
private final List<BNode> children = new ArrayList<BNode>();
|
private final List<BNode> children = new ArrayList<>();
|
||||||
|
|
||||||
public BNode(int stage, String name) {
|
public BNode(int stage, String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -62,7 +62,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
|||||||
|
|
||||||
public class BoardDiagram extends UmlDiagram {
|
public class BoardDiagram extends UmlDiagram {
|
||||||
|
|
||||||
private final List<Activity> activities = new ArrayList<Activity>();
|
private final List<Activity> activities = new ArrayList<>();
|
||||||
|
|
||||||
public DiagramDescription getDescription() {
|
public DiagramDescription getDescription() {
|
||||||
return new DiagramDescription("Board");
|
return new DiagramDescription("Board");
|
||||||
|
@ -51,7 +51,7 @@ public class BoardDiagramFactory extends PSystemCommandFactory {
|
|||||||
@Override
|
@Override
|
||||||
protected List<Command> createCommands() {
|
protected List<Command> createCommands() {
|
||||||
|
|
||||||
final List<Command> cmds = new ArrayList<Command>();
|
final List<Command> cmds = new ArrayList<>();
|
||||||
addCommonCommands1(cmds);
|
addCommonCommands1(cmds);
|
||||||
cmds.add(new CommandBoardPlus());
|
cmds.add(new CommandBoardPlus());
|
||||||
// cmds.add(new CommandMindMapTabulation());
|
// cmds.add(new CommandMindMapTabulation());
|
||||||
|
@ -66,8 +66,8 @@ public class BpmDiagram extends UmlDiagram {
|
|||||||
|
|
||||||
private final BpmElement start = new BpmElement(null, BpmElementType.START);
|
private final BpmElement start = new BpmElement(null, BpmElementType.START);
|
||||||
|
|
||||||
private List<BpmEvent> events = new ArrayList<BpmEvent>();
|
private List<BpmEvent> events = new ArrayList<>();
|
||||||
private Deque<BpmBranch> branches = new ArrayDeque<BpmBranch>();
|
private Deque<BpmBranch> branches = new ArrayDeque<>();
|
||||||
|
|
||||||
public DiagramDescription getDescription() {
|
public DiagramDescription getDescription() {
|
||||||
return new DiagramDescription("(Bpm Diagram)");
|
return new DiagramDescription("(Bpm Diagram)");
|
||||||
|
@ -51,7 +51,7 @@ public class BpmDiagramFactory extends PSystemCommandFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Command> createCommands() {
|
protected List<Command> createCommands() {
|
||||||
final List<Command> result = new ArrayList<Command>();
|
final List<Command> result = new ArrayList<>();
|
||||||
result.add(new CommandDockedEvent());
|
result.add(new CommandDockedEvent());
|
||||||
result.add(new CommandMerge());
|
result.add(new CommandMerge());
|
||||||
result.add(new CommandResume());
|
result.add(new CommandResume());
|
||||||
|
@ -42,7 +42,7 @@ import java.util.List;
|
|||||||
public class Cell {
|
public class Cell {
|
||||||
|
|
||||||
private Placeable data;
|
private Placeable data;
|
||||||
private final List<Placeable> destinations = new ArrayList<Placeable>();
|
private final List<Placeable> destinations = new ArrayList<>();
|
||||||
|
|
||||||
public final Placeable getData() {
|
public final Placeable getData() {
|
||||||
return data;
|
return data;
|
||||||
|
@ -43,8 +43,8 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class ChainImpl<O> implements Chain<O> {
|
public class ChainImpl<O> implements Chain<O> {
|
||||||
|
|
||||||
private final List<O> positive = new ArrayList<O>();
|
private final List<O> positive = new ArrayList<>();
|
||||||
private final List<O> negative = new ArrayList<O>();
|
private final List<O> negative = new ArrayList<>();
|
||||||
private int currentVersion;
|
private int currentVersion;
|
||||||
|
|
||||||
public boolean remove(O data) {
|
public boolean remove(O data) {
|
||||||
@ -57,7 +57,7 @@ public class ChainImpl<O> implements Chain<O> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ChainImpl<O> cloneMe() {
|
public ChainImpl<O> cloneMe() {
|
||||||
final ChainImpl<O> result = new ChainImpl<O>();
|
final ChainImpl<O> result = new ChainImpl<>();
|
||||||
result.currentVersion = this.currentVersion;
|
result.currentVersion = this.currentVersion;
|
||||||
result.positive.addAll(this.positive);
|
result.positive.addAll(this.positive);
|
||||||
result.negative.addAll(this.negative);
|
result.negative.addAll(this.negative);
|
||||||
@ -88,7 +88,7 @@ public class ChainImpl<O> implements Chain<O> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<O> toList() {
|
public List<O> toList() {
|
||||||
final List<O> result = new ArrayList<O>();
|
final List<O> result = new ArrayList<>();
|
||||||
for (O element : negative) {
|
for (O element : negative) {
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
result.add(0, element);
|
result.add(0, element);
|
||||||
|
@ -40,6 +40,6 @@ import java.util.Set;
|
|||||||
|
|
||||||
public class FootPrint {
|
public class FootPrint {
|
||||||
|
|
||||||
private final Set<Coord> cells = new HashSet<Coord>();
|
private final Set<Coord> cells = new HashSet<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@ public class Grid {
|
|||||||
|
|
||||||
public Grid() {
|
public Grid() {
|
||||||
this.root = new Coord(new Line(), new Col());
|
this.root = new Coord(new Line(), new Col());
|
||||||
this.lines = new ChainImpl<Line>(root.getLine());
|
this.lines = new ChainImpl<>(root.getLine());
|
||||||
this.cols = new ChainImpl<Col>(root.getCol());
|
this.cols = new ChainImpl<>(root.getCol());
|
||||||
this.cells.put(root, new Cell());
|
this.cells.put(root, new Cell());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ public class Grid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// private Set<GridEdge> edgeWith(Cell someCell) {
|
// private Set<GridEdge> edgeWith(Cell someCell) {
|
||||||
// // final Set<GridEdge> result = new HashSet<GridEdge>();
|
// // final Set<GridEdge> result = new HashSet<>();
|
||||||
// // for (GridEdge edge : edges) {
|
// // for (GridEdge edge : edges) {
|
||||||
// // if (edge.match(someCell)) {
|
// // if (edge.match(someCell)) {
|
||||||
// // result.add(edge);
|
// // result.add(edge);
|
||||||
@ -104,7 +104,7 @@ public class Grid {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// private Collection<Cell> getCellsConnectedTo(Cell someCell) {
|
// private Collection<Cell> getCellsConnectedTo(Cell someCell) {
|
||||||
// final Set<Cell> result = new HashSet<Cell>();
|
// final Set<Cell> result = new HashSet<>();
|
||||||
// final Set<GridEdge> myEdges = edgeWith(someCell);
|
// final Set<GridEdge> myEdges = edgeWith(someCell);
|
||||||
// for (Cell cell : cells.values()) {
|
// for (Cell cell : cells.values()) {
|
||||||
// for (GridEdge edge : myEdges) {
|
// for (GridEdge edge : myEdges) {
|
||||||
@ -118,7 +118,7 @@ public class Grid {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// private SortedSet<Col> getColsConnectedTo(Cell someCell) {
|
// private SortedSet<Col> getColsConnectedTo(Cell someCell) {
|
||||||
// final SortedSet<Col> result = new TreeSet<Col>(cols);
|
// final SortedSet<Col> result = new TreeSet<>(cols);
|
||||||
// final Set<GridEdge> myEdges = edgeWith(someCell);
|
// final Set<GridEdge> myEdges = edgeWith(someCell);
|
||||||
// for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
// for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
||||||
// for (GridEdge edge : myEdges) {
|
// for (GridEdge edge : myEdges) {
|
||||||
@ -132,7 +132,7 @@ public class Grid {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// public SortedSet<Col> colsConnectedTo(Line line) {
|
// public SortedSet<Col> colsConnectedTo(Line line) {
|
||||||
// final SortedSet<Col> result = new TreeSet<Col>(cols);
|
// final SortedSet<Col> result = new TreeSet<>(cols);
|
||||||
// for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
// for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
||||||
// final Cell cell = ent.getValue();
|
// final Cell cell = ent.getValue();
|
||||||
// if (cell == null || cell.getData() == null) {
|
// if (cell == null || cell.getData() == null) {
|
||||||
@ -254,7 +254,7 @@ public class Grid {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
public Set<Col> usedColsOf(Line line) {
|
public Set<Col> usedColsOf(Line line) {
|
||||||
final Set<Col> result = new HashSet<Col>();
|
final Set<Col> result = new HashSet<>();
|
||||||
for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
for (Map.Entry<Coord, Cell> ent : cells.entrySet()) {
|
||||||
final Cell cell = ent.getValue();
|
final Cell cell = ent.getValue();
|
||||||
if (cell == null || cell.getData() == null) {
|
if (cell == null || cell.getData() == null) {
|
||||||
|
@ -53,7 +53,7 @@ public class GridArray implements UDrawable {
|
|||||||
private final Placeable data[][];
|
private final Placeable data[][];
|
||||||
private final ISkinParam skinParam;
|
private final ISkinParam skinParam;
|
||||||
|
|
||||||
// private final List<GridEdge> edges = new ArrayList<GridEdge>();
|
// private final List<GridEdge> edges = new ArrayList<>();
|
||||||
|
|
||||||
public GridArray(ISkinParam skinParam, int lines, int cols) {
|
public GridArray(ISkinParam skinParam, int lines, int cols) {
|
||||||
this.skinParam = skinParam;
|
this.skinParam = skinParam;
|
||||||
|
@ -42,7 +42,7 @@ import java.util.List;
|
|||||||
public class BrailleCharFactory {
|
public class BrailleCharFactory {
|
||||||
|
|
||||||
public static List<BrailleChar> build(String s) {
|
public static List<BrailleChar> build(String s) {
|
||||||
final List<BrailleChar> result = new ArrayList<BrailleChar>();
|
final List<BrailleChar> result = new ArrayList<>();
|
||||||
for (int i = 0; i < s.length(); i++) {
|
for (int i = 0; i < s.length(); i++) {
|
||||||
result.add(BrailleChar.fromChar(s.charAt(i)));
|
result.add(BrailleChar.fromChar(s.charAt(i)));
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class BrailleGrid {
|
|||||||
private int maxY;
|
private int maxY;
|
||||||
|
|
||||||
private final double quanta;
|
private final double quanta;
|
||||||
private final Set<Coords> on = new HashSet<Coords>();
|
private final Set<Coords> on = new HashSet<>();
|
||||||
|
|
||||||
public BrailleGrid(double quanta) {
|
public BrailleGrid(double quanta) {
|
||||||
this.quanta = quanta;
|
this.quanta = quanta;
|
||||||
|
@ -58,7 +58,7 @@ public class DriverPolygonBraille implements UDriver<BrailleGrid> {
|
|||||||
public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) {
|
public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) {
|
||||||
final UPolygon shape = (UPolygon) ushape;
|
final UPolygon shape = (UPolygon) ushape;
|
||||||
|
|
||||||
final List<Point2D> points = new ArrayList<Point2D>();
|
final List<Point2D> points = new ArrayList<>();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (Point2D pt : shape.getPoints()) {
|
for (Point2D pt : shape.getPoints()) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
https://github.com/google/brotli/blob/master/LICENSE
|
||||||
|
|
||||||
Distributed under MIT license.
|
Distributed under MIT license.
|
||||||
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
https://github.com/google/brotli/blob/master/LICENSE
|
||||||
|
|
||||||
Distributed under MIT license.
|
Distributed under MIT license.
|
||||||
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
https://github.com/google/brotli/blob/master/LICENSE
|
||||||
|
|
||||||
Distributed under MIT license.
|
Distributed under MIT license.
|
||||||
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
https://github.com/google/brotli/blob/master/LICENSE
|
||||||
|
|
||||||
Distributed under MIT license.
|
Distributed under MIT license.
|
||||||
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user