1
0
mirror of https://github.com/octoleo/plantuml.git synced 2025-01-02 22:50:20 +00:00
This commit is contained in:
Arnaud Roques 2022-02-17 19:27:32 +01:00
parent db67c75919
commit 5d0d2bb8da
482 changed files with 1617 additions and 1016 deletions

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend;
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
@ -125,7 +125,7 @@ public class AnnotatedWorker {
final double width = x1 + Math.max(originalMinMax.getWidth(), dimTitle.getWidth()) + x2; final double width = x1 + Math.max(originalMinMax.getWidth(), dimTitle.getWidth()) + x2;
final double height = dimTitle.getHeight() + y1 + originalMinMax.getHeight() + y2; final double height = dimTitle.getHeight() + y1 + originalMinMax.getHeight() + y2;
final TextBlock frame = USymbol.FRAME.asBig(title, HorizontalAlignment.LEFT, TextBlockUtils.empty(0, 0), width, final TextBlock frame = USymbols.FRAME.asBig(title, HorizontalAlignment.LEFT, TextBlockUtils.empty(0, 0), width,
height, symbolContext, skinParam.getStereotypeAlignment()); height, symbolContext, skinParam.getStereotypeAlignment());
return new TextBlockBackcolored() { return new TextBlockBackcolored() {

View File

@ -36,6 +36,7 @@
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.USymbols;
public enum ComponentStyle { public enum ComponentStyle {
@ -44,11 +45,11 @@ public enum ComponentStyle {
public USymbol toUSymbol() { public USymbol toUSymbol() {
switch (this) { switch (this) {
case UML1: case UML1:
return USymbol.COMPONENT1; return USymbols.COMPONENT1;
case UML2: case UML2:
return USymbol.COMPONENT2; return USymbols.COMPONENT2;
case RECTANGLE: case RECTANGLE:
return USymbol.RECTANGLE; return USymbols.RECTANGLE;
} }
throw new AssertionError(); throw new AssertionError();
} }

View File

@ -35,7 +35,8 @@
*/ */
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import java.awt.geom.Dimension2D; import java.awt.Dimension;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.utils.MathUtils; import net.sourceforge.plantuml.utils.MathUtils;
@ -135,4 +136,8 @@ public class Dimension2DDouble extends Dimension2D {
return new Dimension2DDouble(w, h); return new Dimension2DDouble(w, h);
} }
public static Dimension2D fromDimension(Dimension dimension) {
return new Dimension2D(dimension.getWidth(), dimension.getHeight());
}
} }

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -39,7 +39,7 @@ import java.awt.Font;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints; import java.awt.RenderingHints;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;

View File

@ -81,41 +81,40 @@ public class StringUtils {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = 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);
if (c >= '0' && c <= '9') { if (c >= '0' && c <= '9')
sb.append(Character.toChars('\uE100' + c - '0')); sb.append(Character.toChars('\uE100' + c - '0'));
} else { else
sb.append(c); sb.append(c);
}
} }
return sb.toString(); return sb.toString();
} }
public static void appendInternalToRealBoldNumber(StringBuilder sb, char c) { public static void appendInternalToRealBoldNumber(StringBuilder sb, char c) {
if (c >= '\uE100' && c <= ('\uE100' + 9)) { if (c >= '\uE100' && c <= ('\uE100' + 9))
sb.append(Character.toChars(0x1d7ce + c - '\uE100')); sb.append(Character.toChars(0x1d7ce + c - '\uE100'));
} else { else
sb.append(c); sb.append(c);
}
} }
public static void appendInternalToPlainNumber(StringBuilder sb, char c) { public static void appendInternalToPlainNumber(StringBuilder sb, char c) {
if (c >= '\uE100' && c <= ('\uE100' + 9)) { if (c >= '\uE100' && c <= ('\uE100' + 9))
sb.append(Character.toChars('0' + c - '\uE100')); sb.append(Character.toChars('0' + c - '\uE100'));
} else { else
sb.append(c); sb.append(c);
}
} }
final static public List<String> getSplit(Pattern2 pattern, String line) { final static public List<String> getSplit(Pattern2 pattern, String line) {
final Matcher2 m = pattern.matcher(line); final Matcher2 m = pattern.matcher(line);
if (m.find() == false) { if (m.find() == false)
return null; return null;
}
final List<String> result = new ArrayList<>(); 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));
}
return result; return result;
} }
@ -128,11 +127,14 @@ public class StringUtils {
} }
public static boolean isEmpty(CharSequence s) { public static boolean isEmpty(CharSequence s) {
if (s == null) return true; if (s == null)
return true;
final int length = s.length(); final int length = s.length();
if (length == 0) return true; if (length == 0)
return true;
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
if (!isSpaceOrTabOrNull(s.charAt(i))) return false; if (!isSpaceOrTabOrNull(s.charAt(i)))
return false;
} }
return true; return true;
} }
@ -145,27 +147,27 @@ public class StringUtils {
public static String unicode(String s) { public static String unicode(String s) {
final StringBuilder result = new StringBuilder(); final StringBuilder result = new StringBuilder();
for (char c : s.toCharArray()) { for (char c : s.toCharArray())
if (c > 127 || c == '&' || c == '|') { if (c > 127 || c == '&' || c == '|') {
final int i = c; final int i = c;
result.append("&#" + i + ";"); result.append("&#" + i + ";");
} else { } else {
result.append(c); result.append(c);
} }
}
return result.toString(); return result.toString();
} }
public static String unicodeForHtml(String s) { public static String unicodeForHtml(String s) {
final StringBuilder result = new StringBuilder(); final StringBuilder result = new StringBuilder();
for (char c : s.toCharArray()) { for (char c : s.toCharArray())
if (c > 127 || c == '&' || c == '|' || c == '<' || c == '>') { if (c > 127 || c == '&' || c == '|' || c == '<' || c == '>') {
final int i = c; final int i = c;
result.append("&#" + i + ";"); result.append("&#" + i + ";");
} else { } else {
result.append(c); result.append(c);
} }
}
return result.toString(); return result.toString();
} }
@ -173,9 +175,9 @@ public class StringUtils {
final StringBuilder result = new StringBuilder(); final StringBuilder result = new StringBuilder();
for (int i = 0; i < display.size(); i++) { for (int i = 0; i < display.size(); i++) {
result.append(unicodeForHtml(display.get(i).toString())); result.append(unicodeForHtml(display.get(i).toString()));
if (i < display.size() - 1) { if (i < display.size() - 1)
result.append("<br>"); result.append("<br>");
}
} }
return result.toString(); return result.toString();
} }
@ -209,12 +211,12 @@ public class StringUtils {
final Direction dir = getArrowDirection(s); final Direction dir = getArrowDirection(s);
s = s.replace('=', '-'); s = s.replace('=', '-');
s = s.replaceAll("\\w*", ""); s = s.replaceAll("\\w*", "");
if (dir == Direction.LEFT || dir == Direction.RIGHT) { if (dir == Direction.LEFT || dir == Direction.RIGHT)
s = s.replaceAll("-+", "-"); s = s.replaceAll("-+", "-");
}
if (s.length() == 2 && (dir == Direction.UP || dir == Direction.DOWN)) { if (s.length() == 2 && (dir == Direction.UP || dir == Direction.DOWN))
s = s.replaceFirst("-", "--"); s = s.replaceFirst("-", "--");
}
return s; return s;
} }
@ -222,60 +224,60 @@ public class StringUtils {
final Direction dir = getQueueDirection(s); final Direction dir = getQueueDirection(s);
s = s.replace('=', '-'); s = s.replace('=', '-');
s = s.replaceAll("\\w*", ""); s = s.replaceAll("\\w*", "");
if (dir == Direction.LEFT || dir == Direction.RIGHT) { if (dir == Direction.LEFT || dir == Direction.RIGHT)
s = s.replaceAll("-+", "-"); s = s.replaceAll("-+", "-");
}
if (s.length() == 1 && (dir == Direction.UP || dir == Direction.DOWN)) { if (s.length() == 1 && (dir == Direction.UP || dir == Direction.DOWN))
s = s.replaceFirst("-", "--"); s = s.replaceFirst("-", "--");
}
return s; return s;
} }
public static Direction getArrowDirection(String s) { public static Direction getArrowDirection(String s) {
if (s.endsWith(">")) { if (s.endsWith(">"))
return getQueueDirection(s.substring(0, s.length() - 1)); return getQueueDirection(s.substring(0, s.length() - 1));
}
if (s.startsWith("<")) { if (s.startsWith("<")) {
if (s.length() == 2) { if (s.length() == 2)
return Direction.LEFT; return Direction.LEFT;
}
return Direction.UP; return Direction.UP;
} }
throw new IllegalArgumentException(s); throw new IllegalArgumentException(s);
} }
public static Direction getQueueDirection(String s) { public static Direction getQueueDirection(String s) {
if (s.indexOf('<') != -1 || s.indexOf('>') != -1) { if (s.indexOf('<') != -1 || s.indexOf('>') != -1)
throw new IllegalArgumentException(s); throw new IllegalArgumentException(s);
}
s = s.toLowerCase(); s = s.toLowerCase();
if (s.contains("left")) { if (s.contains("left"))
return Direction.LEFT; return Direction.LEFT;
}
if (s.contains("right")) { if (s.contains("right"))
return Direction.RIGHT; return Direction.RIGHT;
}
if (s.contains("up")) { if (s.contains("up"))
return Direction.UP; return Direction.UP;
}
if (s.contains("down")) { if (s.contains("down")) {
return Direction.DOWN; return Direction.DOWN;
} }
if (s.contains("l")) { if (s.contains("l"))
return Direction.LEFT; return Direction.LEFT;
}
if (s.contains("r")) { if (s.contains("r"))
return Direction.RIGHT; return Direction.RIGHT;
}
if (s.contains("u")) { if (s.contains("u"))
return Direction.UP; return Direction.UP;
}
if (s.contains("d")) { if (s.contains("d"))
return Direction.DOWN; return Direction.DOWN;
}
if (s.length() == 1) { if (s.length() == 1)
return Direction.RIGHT; return Direction.RIGHT;
}
return Direction.DOWN; return Direction.DOWN;
} }
@ -284,29 +286,29 @@ public class StringUtils {
// } // }
public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s, String format) { public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s, String format) {
if (s == null) { if (s == null)
return null; return null;
}
if (format.contains("\"") && s.length() > 1 && isDoubleQuote(s.charAt(0)) if (format.contains("\"") && s.length() > 1 && isDoubleQuote(s.charAt(0))
&& isDoubleQuote(s.charAt(s.length() - 1))) { && isDoubleQuote(s.charAt(s.length() - 1)))
return s.substring(1, s.length() - 1); return s.substring(1, s.length() - 1);
}
if (format.contains("(") && s.startsWith("(") && s.endsWith(")")) { if (format.contains("(") && s.startsWith("(") && s.endsWith(")"))
return s.substring(1, s.length() - 1); return s.substring(1, s.length() - 1);
}
if (format.contains("[") && s.startsWith("[") && s.endsWith("]")) { if (format.contains("[") && s.startsWith("[") && s.endsWith("]"))
return s.substring(1, s.length() - 1); return s.substring(1, s.length() - 1);
}
if (format.contains(":") && s.startsWith(":") && s.endsWith(":")) { if (format.contains(":") && s.startsWith(":") && s.endsWith(":"))
return s.substring(1, s.length() - 1); return s.substring(1, s.length() - 1);
}
return s; return s;
} }
public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s) { public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s) {
if (s == null) { if (s == null)
return s; return s;
}
return eventuallyRemoveStartingAndEndingDoubleQuote(s, "\"([:"); return eventuallyRemoveStartingAndEndingDoubleQuote(s, "\"([:");
} }
@ -342,24 +344,23 @@ public class StringUtils {
private static int getWidth(Display stringsToDisplay) { private static int getWidth(Display stringsToDisplay) {
int result = 1; int result = 1;
for (CharSequence s : stringsToDisplay) { for (CharSequence s : stringsToDisplay)
if (s != null && result < s.length()) { if (s != null && result < s.length())
result = s.length(); result = s.length();
}
}
return result; return result;
} }
public static int getWcWidth(Display stringsToDisplay) { public static int getWcWidth(Display stringsToDisplay) {
int result = 1; int result = 1;
for (CharSequence s : stringsToDisplay) { for (CharSequence s : stringsToDisplay) {
if (s == null) { if (s == null)
continue; continue;
}
final int length = Wcwidth.length(s); final int length = Wcwidth.length(s);
if (result < length) { if (result < length)
result = length; result = length;
}
} }
return result; return result;
} }
@ -373,9 +374,9 @@ public class StringUtils {
} }
public static boolean isDiagramCacheable(String uml) { public static boolean isDiagramCacheable(String uml) {
if (uml.length() < 35) { if (uml.length() < 35)
return false; return false;
}
// uml = uml.toLowerCase(); // uml = uml.toLowerCase();
// if (uml.startsWith("@startuml\nversion\n")) { // if (uml.startsWith("@startuml\nversion\n")) {
// return false; // return false;
@ -410,17 +411,17 @@ public class StringUtils {
public static int getPragmaRevision(String uml) { public static int getPragmaRevision(String uml) {
uml = uml.toLowerCase(); uml = uml.toLowerCase();
final String header = "@startuml\n!pragma revision "; final String header = "@startuml\n!pragma revision ";
if (uml.startsWith(header) == false) { if (uml.startsWith(header) == false)
return -1; return -1;
}
int x1 = header.length(); int x1 = header.length();
int x2 = x1; int x2 = x1;
while (x2 < uml.length() && Character.isDigit(uml.charAt(x2))) { while (x2 < uml.length() && Character.isDigit(uml.charAt(x2)))
x2++; x2++;
}
if (x1 == x2) { if (x1 == x2)
return -1; return -1;
}
return Integer.parseInt(uml.substring(x1, x2)); return Integer.parseInt(uml.substring(x1, x2));
} }
@ -429,9 +430,9 @@ public class StringUtils {
final List<String> result = new ArrayList<>(); final List<String> result = new ArrayList<>();
final Pattern2 p = MyPattern.cmpile("([%pLN_.]+|[%g][^%g]+[%g])"); final Pattern2 p = MyPattern.cmpile("([%pLN_.]+|[%g][^%g]+[%g])");
final Matcher2 m = p.matcher(s); final Matcher2 m = p.matcher(s);
while (m.find()) { while (m.find())
result.add(eventuallyRemoveStartingAndEndingDoubleQuote(m.group(0))); result.add(eventuallyRemoveStartingAndEndingDoubleQuote(m.group(0)));
}
return Collections.unmodifiableList(result); return Collections.unmodifiableList(result);
} }
@ -453,13 +454,13 @@ public class StringUtils {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) { for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i); char c = s.charAt(i);
if ((c >= 'a' && c <= 'm') || (c >= 'A' && c <= 'M')) { if ((c >= 'a' && c <= 'm') || (c >= 'A' && c <= 'M'))
c += 13; c += 13;
} else if ((c >= 'n' && c <= 'z') || (c >= 'N' && c <= 'Z')) { else if ((c >= 'n' && c <= 'z') || (c >= 'N' && c <= 'Z'))
c -= 13; c -= 13;
} else if (c > 126) { else if (c > 126)
throw new IllegalArgumentException(s); throw new IllegalArgumentException(s);
}
sb.append(c); sb.append(c);
} }
return sb.toString(); return sb.toString();
@ -502,35 +503,35 @@ public class StringUtils {
} }
public static String trin(String arg) { public static String trin(String arg) {
if (arg.length() == 0) { if (arg.length() == 0)
return arg; return arg;
}
return trinEndingInternal(arg, getPositionStartNonSpace(arg)); return trinEndingInternal(arg, getPositionStartNonSpace(arg));
} }
private static int getPositionStartNonSpace(String arg) { private static int getPositionStartNonSpace(String arg) {
int i = 0; int i = 0;
while (i < arg.length() && isSpaceOrTabOrNull(arg.charAt(i))) { while (i < arg.length() && isSpaceOrTabOrNull(arg.charAt(i)))
i++; i++;
}
return i; return i;
} }
private static String trinEnding(String arg) { private static String trinEnding(String arg) {
if (arg.length() == 0) { if (arg.length() == 0)
return arg; return arg;
}
return trinEndingInternal(arg, 0); return trinEndingInternal(arg, 0);
} }
private static String trinEndingInternal(String arg, int from) { private static String trinEndingInternal(String arg, int from) {
int j = arg.length() - 1; int j = arg.length() - 1;
while (j >= from && isSpaceOrTabOrNull(arg.charAt(j))) { while (j >= from && isSpaceOrTabOrNull(arg.charAt(j)))
j--; j--;
}
if (from == 0 && j == arg.length() - 1) { if (from == 0 && j == arg.length() - 1)
return arg; return arg;
}
return arg.substring(from, j + 1); return arg.substring(from, j + 1);
} }
@ -546,11 +547,18 @@ public class StringUtils {
long h = 1125899906842597L; // prime long h = 1125899906842597L; // prime
final int len = string.length(); final int len = string.length();
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++)
h = 31 * h + string.charAt(i); h = 31 * h + string.charAt(i);
}
return h; return h;
} }
public static String sharp000000(int color) {
final int v = 0xFFFFFF & color;
String s = "000000" + Integer.toHexString(v).toUpperCase();
s = s.substring(s.length() - 6);
return "#" + s;
}
// http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html // http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html
} }

View File

@ -39,7 +39,7 @@ import static net.sourceforge.plantuml.ugraphic.ImageBuilder.plainImageBuilder;
import java.awt.Color; import java.awt.Color;
import java.awt.geom.AffineTransform; import java.awt.geom.AffineTransform;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;

View File

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

View File

@ -50,6 +50,7 @@ import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
@ -89,26 +90,26 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
private USymbol getUSymbol(String type) { private USymbol getUSymbol(String type) {
if ("card".equalsIgnoreCase(type)) { if ("card".equalsIgnoreCase(type)) {
return USymbol.CARD; return USymbols.CARD;
} }
if ("package".equalsIgnoreCase(type)) { if ("package".equalsIgnoreCase(type)) {
return USymbol.PACKAGE; return USymbols.PACKAGE;
} }
if ("rectangle".equalsIgnoreCase(type)) { if ("rectangle".equalsIgnoreCase(type)) {
return USymbol.RECTANGLE; return USymbols.RECTANGLE;
} }
return USymbol.FRAME; return USymbols.FRAME;
} }
private ColorParam getColorParamBorder(final USymbol symbol) { private ColorParam getColorParamBorder(final USymbol symbol) {
if (symbol == USymbol.FRAME) { if (symbol == USymbols.FRAME) {
return ColorParam.partitionBorder; return ColorParam.partitionBorder;
} }
return symbol.getColorParamBorder(); return symbol.getColorParamBorder();
} }
private ColorParam getColorParamBack(final USymbol symbol) { private ColorParam getColorParamBack(final USymbol symbol) {
if (symbol == USymbol.FRAME) { if (symbol == USymbols.FRAME) {
return ColorParam.partitionBackground; return ColorParam.partitionBackground;
} }
return symbol.getColorParamBack(); return symbol.getColorParamBack();
@ -119,7 +120,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
} }
private StyleSignature getDefaultStyleDefinitionPartition(USymbol symbol) { private StyleSignature getDefaultStyleDefinitionPartition(USymbol symbol) {
if (symbol == USymbol.RECTANGLE) if (symbol == USymbols.RECTANGLE)
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.rectangle); return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.rectangle);
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition); return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
} }

View File

@ -72,37 +72,29 @@ public class CollisionDetector extends UGraphicNo {
private CollisionDetector(CollisionDetector other, UChange change) { private CollisionDetector(CollisionDetector other, UChange change) {
super(other, change); super(other, change);
if (!instanceOfAny(change, if (!instanceOfAny(change, UBackground.class, HColor.class, UStroke.class, UTranslate.class)) {
UBackground.class,
HColor.class,
UStroke.class,
UTranslate.class
)) {
throw new UnsupportedOperationException(change.getClass().toString()); throw new UnsupportedOperationException(change.getClass().toString());
} }
this.context = other.context; this.context = other.context;
} }
static class Context { static class Context {
private final List<MinMax> rectangles = new ArrayList<>(); private final List<MinMax> rectangles = new ArrayList<>();
private final List<Snake> snakes = new ArrayList<>(); private final List<Snake> snakes = new ArrayList<>();
private boolean manageSnakes; private boolean manageSnakes;
public void drawDebug(UGraphic ug) { public void drawDebug(UGraphic ug) {
for (MinMax minmax : rectangles) { for (MinMax minmax : rectangles)
if (collision(minmax)) { if (collision(minmax))
minmax.drawGray(ug); minmax.drawGray(ug);
}
}
final HColor color = HColorUtils.BLACK; final HColor color = HColorUtils.BLACK;
ug = ug.apply(color).apply(new UStroke(5)); ug = ug.apply(color).apply(new UStroke(5));
for (Snake snake : snakes) { for (Snake snake : snakes)
for (Line2D line : snake.getHorizontalLines()) { for (Line2D line : snake.getHorizontalLines())
if (collision(line)) { if (collision(line))
drawLine(ug, line); drawLine(ug, line);
}
}
}
} }
private void drawLine(UGraphic ug, Line2D line) { private void drawLine(UGraphic ug, Line2D line) {
@ -111,11 +103,10 @@ public class CollisionDetector extends UGraphicNo {
} }
private boolean collision(Line2D hline) { private boolean collision(Line2D hline) {
for (MinMax r : rectangles) { for (MinMax r : rectangles)
if (collisionCheck(r, hline)) { if (collisionCheck(r, hline))
return true; return true;
}
}
return false; return false;
} }
@ -133,42 +124,41 @@ public class CollisionDetector extends UGraphicNo {
} }
private static boolean collisionCheck(MinMax rect, Line2D hline) { private static boolean collisionCheck(MinMax rect, Line2D hline) {
if (hline.getY1() != hline.getY2()) { if (hline.getY1() != hline.getY2())
throw new IllegalArgumentException(); throw new IllegalArgumentException();
}
if (hline.getY1() < rect.getMinY()) { if (hline.getY1() < rect.getMinY())
return false; return false;
}
if (hline.getY1() > rect.getMaxY()) { if (hline.getY1() > rect.getMaxY())
return false; return false;
}
final double x1 = Math.min(hline.getX1(), hline.getX2()); final double x1 = Math.min(hline.getX1(), hline.getX2());
final double x2 = Math.max(hline.getX1(), hline.getX2()); final double x2 = Math.max(hline.getX1(), hline.getX2());
if (x2 < rect.getMinX()) { if (x2 < rect.getMinX())
return false; return false;
}
if (x1 > rect.getMaxX()) { if (x1 > rect.getMaxX())
return false; return false;
}
return true; return true;
} }
public void draw(UShape shape) { public void draw(UShape shape) {
if (shape instanceof UPolygon) { if (shape instanceof UPolygon)
drawPolygone((UPolygon) shape); drawPolygone((UPolygon) shape);
} else if (shape instanceof URectangle) { else if (shape instanceof URectangle)
drawRectangle((URectangle) shape); drawRectangle((URectangle) shape);
} else if (shape instanceof Snake) { else if (shape instanceof Snake)
drawSnake((Snake) shape); drawSnake((Snake) shape);
} /* /*
* else { System.err.println("shape=" + shape.getClass() + " " + shape); } * else { System.err.println("shape=" + shape.getClass() + " " + shape); }
*/ */
} }
private void drawSnake(Snake shape) { private void drawSnake(Snake shape) {
if (context.manageSnakes) { if (context.manageSnakes)
context.snakes.add(shape.translate(getTranslate())); context.snakes.add(shape.translate(getTranslate()));
}
} }

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorGoto; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorGoto;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Line2D; import java.awt.geom.Line2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.HashMap; import java.util.HashMap;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile; package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.Iterator; import java.util.Iterator;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.LineBreakStrategy;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Objects; import java.util.Objects;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Set; import java.util.Set;
import net.sourceforge.plantuml.AlignmentParam; import net.sourceforge.plantuml.AlignmentParam;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.activitydiagram3.gtile; package net.sourceforge.plantuml.activitydiagram3.gtile;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;

View File

@ -36,7 +36,7 @@
package net.sourceforge.plantuml.anim; package net.sourceforge.plantuml.anim;
import java.awt.geom.AffineTransform; import java.awt.geom.AffineTransform;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.Objects; import java.util.Objects;
import java.util.StringTokenizer; import java.util.StringTokenizer;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.anim; package net.sourceforge.plantuml.anim;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.api; package net.sourceforge.plantuml.api;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.api; package net.sourceforge.plantuml.api;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.CMapData; import net.sourceforge.plantuml.CMapData;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.api; package net.sourceforge.plantuml.api;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;

View File

@ -35,7 +35,7 @@
*/ */
package net.sourceforge.plantuml.asciiart; package net.sourceforge.plantuml.asciiart;
import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.StringBounderRaw; import net.sourceforge.plantuml.graphic.StringBounderRaw;

View File

@ -0,0 +1,5 @@
package net.sourceforge.plantuml.awt;
public class Color {
}

View File

@ -0,0 +1,5 @@
package net.sourceforge.plantuml.awt;
public class Font {
}

View File

@ -0,0 +1,14 @@
package net.sourceforge.plantuml.awt;
import java.awt.Graphics2D;
import net.sourceforge.plantuml.awt.geom.Rectangle2D;
public class FontMetrics {
public Rectangle2D getStringBounds(String s, Graphics2D g2d) {
// TODO Auto-generated method stub
return null;
}
}

Some files were not shown because too many files have changed in this diff Show More