mirror of
https://github.com/octoleo/plantuml.git
synced 2025-04-07 18:51:50 +00:00
version 1.2020.7
This commit is contained in:
parent
f03afa2f96
commit
9077d971d7
@ -20,7 +20,7 @@
|
|||||||
<target name="compile">
|
<target name="compile">
|
||||||
<delete dir="build" />
|
<delete dir="build" />
|
||||||
<mkdir dir="build" />
|
<mkdir dir="build" />
|
||||||
<javac target="1.6" srcdir="src" destdir="build" debug="on" />
|
<javac target="1.7" srcdir="src" destdir="build" debug="on" />
|
||||||
<copy file="src/net/sourceforge/plantuml/version/logo.png"
|
<copy file="src/net/sourceforge/plantuml/version/logo.png"
|
||||||
todir="build/net/sourceforge/plantuml/version" />
|
todir="build/net/sourceforge/plantuml/version" />
|
||||||
<copy file="src/net/sourceforge/plantuml/version/favicon.png"
|
<copy file="src/net/sourceforge/plantuml/version/favicon.png"
|
||||||
|
6
pom.xml
6
pom.xml
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<groupId>net.sourceforge.plantuml</groupId>
|
<groupId>net.sourceforge.plantuml</groupId>
|
||||||
<artifactId>plantuml</artifactId>
|
<artifactId>plantuml</artifactId>
|
||||||
<version>1.2020.5-SNAPSHOT</version>
|
<version>1.2020.8-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PlantUML</name>
|
<name>PlantUML</name>
|
||||||
@ -133,8 +133,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.7</source>
|
||||||
<target>1.6</target>
|
<target>1.7</target>
|
||||||
<debug>false</debug>
|
<debug>false</debug>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -154,26 +154,26 @@ public class FileUtils {
|
|||||||
|
|
||||||
// http://forum.plantuml.net/9048/img-tag-for-sequence-diagram-participants-does-always-render
|
// http://forum.plantuml.net/9048/img-tag-for-sequence-diagram-participants-does-always-render
|
||||||
|
|
||||||
public synchronized static BufferedImage ImageIO_read(File f) {
|
public synchronized static BufferedImage readRasterImageFromFile(File f) {
|
||||||
// https://www.experts-exchange.com/questions/26171948/Why-are-ImageIO-read-images-losing-their-transparency.html
|
// https://www.experts-exchange.com/questions/26171948/Why-are-ImageIO-read-images-losing-their-transparency.html
|
||||||
// https://stackoverflow.com/questions/18743790/can-java-load-images-with-transparency
|
// https://stackoverflow.com/questions/18743790/can-java-load-images-with-transparency
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return readImage(new ImageIcon(f.getAbsolutePath()));
|
return readRasterImage(new ImageIcon(f.getAbsolutePath()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static BufferedImage ImageIO_read(URL url) {
|
public synchronized static BufferedImage readRasterImageFromURL(URL url) {
|
||||||
try {
|
try {
|
||||||
return readImage(new ImageIcon(url));
|
return readRasterImage(new ImageIcon(url));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized static BufferedImage readImage(final ImageIcon imageIcon) {
|
private synchronized static BufferedImage readRasterImage(final ImageIcon imageIcon) {
|
||||||
final Image tmpImage = imageIcon.getImage();
|
final Image tmpImage = imageIcon.getImage();
|
||||||
final BufferedImage image = new BufferedImage(imageIcon.getIconWidth(), imageIcon.getIconHeight(),
|
final BufferedImage image = new BufferedImage(imageIcon.getIconWidth(), imageIcon.getIconHeight(),
|
||||||
BufferedImage.TYPE_INT_ARGB);
|
BufferedImage.TYPE_INT_ARGB);
|
||||||
|
@ -456,7 +456,7 @@ public class Option {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final static String getPattern() {
|
public final static String getPattern() {
|
||||||
return "(?i)^.*\\.(txt|tex|java|htm|html|c|h|cpp|apt|pu|pump|hpp|hh)$";
|
return "(?i)^.*\\.(txt|tex|java|htm|html|c|h|cpp|apt|pu|puml|hpp|hh)$";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOutputDir(File f) {
|
public void setOutputDir(File f) {
|
||||||
|
@ -47,14 +47,14 @@ import java.util.Locale;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import ext.plantuml.com.ctreber.acearth.ACearth;
|
||||||
|
import ext.plantuml.com.ctreber.acearth.ConfigurationACearth;
|
||||||
|
import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker;
|
||||||
import net.sourceforge.plantuml.AbstractPSystem;
|
import net.sourceforge.plantuml.AbstractPSystem;
|
||||||
import net.sourceforge.plantuml.FileFormatOption;
|
import net.sourceforge.plantuml.FileFormatOption;
|
||||||
import net.sourceforge.plantuml.api.ImageDataSimple;
|
import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||||
import net.sourceforge.plantuml.core.ImageData;
|
import net.sourceforge.plantuml.core.ImageData;
|
||||||
import ext.plantuml.com.ctreber.acearth.ACearth;
|
|
||||||
import ext.plantuml.com.ctreber.acearth.ConfigurationACearth;
|
|
||||||
import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker;
|
|
||||||
|
|
||||||
public class PSystemXearth extends AbstractPSystem {
|
public class PSystemXearth extends AbstractPSystem {
|
||||||
|
|
||||||
|
@ -40,11 +40,11 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker;
|
||||||
import net.sourceforge.plantuml.command.PSystemBasicFactory;
|
import net.sourceforge.plantuml.command.PSystemBasicFactory;
|
||||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||||
import net.sourceforge.plantuml.command.regex.MyPattern;
|
import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||||
import net.sourceforge.plantuml.command.regex.Pattern2;
|
import net.sourceforge.plantuml.command.regex.Pattern2;
|
||||||
import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker;
|
|
||||||
|
|
||||||
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.Direction;
|
import net.sourceforge.plantuml.Direction;
|
||||||
import net.sourceforge.plantuml.ISkinSimple;
|
import net.sourceforge.plantuml.ISkinSimple;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.UmlDiagramType;
|
import net.sourceforge.plantuml.UmlDiagramType;
|
||||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||||
|
@ -436,11 +436,12 @@ public class ActivityDiagram3 extends UmlDiagram {
|
|||||||
manageSwimlaneStrategy();
|
manageSwimlaneStrategy();
|
||||||
if (current() instanceof InstructionRepeat) {
|
if (current() instanceof InstructionRepeat) {
|
||||||
final InstructionRepeat instructionRepeat = (InstructionRepeat) current();
|
final InstructionRepeat instructionRepeat = (InstructionRepeat) current();
|
||||||
// final LinkRendering back = new
|
|
||||||
// LinkRendering(linkColor).withDisplay(linkLabel);
|
|
||||||
instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle);
|
instructionRepeat.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle);
|
||||||
// setCurrent(instructionRepeat.getParent());
|
return CommandExecutionResult.ok();
|
||||||
// this.setNextLinkRendererInternal(LinkRendering.none());
|
}
|
||||||
|
if (current() instanceof InstructionWhile) {
|
||||||
|
final InstructionWhile instructionWhile = (InstructionWhile) current();
|
||||||
|
instructionWhile.setBackward(label, swinlanes.getCurrentSwimlane(), boxStyle);
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
}
|
}
|
||||||
return CommandExecutionResult.error("Cannot find repeat");
|
return CommandExecutionResult.error("Cannot find repeat");
|
||||||
|
@ -56,7 +56,6 @@ public class InstructionRepeat implements Instruction {
|
|||||||
private final Swimlane swimlane;
|
private final Swimlane swimlane;
|
||||||
private Swimlane swimlaneOut;
|
private Swimlane swimlaneOut;
|
||||||
private BoxStyle boxStyle;
|
private BoxStyle boxStyle;
|
||||||
// private final HtmlColor color;
|
|
||||||
private boolean killed = false;
|
private boolean killed = false;
|
||||||
private final BoxStyle boxStyleIn;
|
private final BoxStyle boxStyleIn;
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.activitydiagram3;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.ISkinParam;
|
import net.sourceforge.plantuml.ISkinParam;
|
||||||
|
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
|
||||||
@ -97,8 +98,10 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createFtile(FtileFactory factory) {
|
public Ftile createFtile(FtileFactory factory) {
|
||||||
|
final Ftile back = Display.isNull(backward) ? null
|
||||||
|
: factory.activity(backward, swimlane, boxStyle, Colors.empty());
|
||||||
Ftile tmp = factory.decorateOut(repeatList.createFtile(factory), endInlinkRendering);
|
Ftile tmp = factory.decorateOut(repeatList.createFtile(factory), endInlinkRendering);
|
||||||
tmp = factory.createWhile(swimlane, tmp, test, yes, out, afterEndwhile, color, specialOut);
|
tmp = factory.createWhile(swimlane, tmp, test, yes, out, afterEndwhile, color, specialOut, back);
|
||||||
if (getPositionedNotes().size() > 0) {
|
if (getPositionedNotes().size() > 0) {
|
||||||
tmp = FtileWithNoteOpale.create(tmp, getPositionedNotes(), skinParam, false);
|
tmp = FtileWithNoteOpale.create(tmp, getPositionedNotes(), skinParam, false);
|
||||||
}
|
}
|
||||||
@ -170,4 +173,14 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi
|
|||||||
return repeatList.containsBreak();
|
return repeatList.containsBreak();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private BoxStyle boxStyle;
|
||||||
|
private Swimlane swimlaneOut;
|
||||||
|
private Display backward = Display.NULL;
|
||||||
|
|
||||||
|
public void setBackward(Display label, Swimlane swimlaneOut, BoxStyle boxStyle) {
|
||||||
|
this.backward = label;
|
||||||
|
this.swimlaneOut = swimlaneOut;
|
||||||
|
this.boxStyle = boxStyle;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,7 @@ import net.sourceforge.plantuml.Url;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
import net.sourceforge.plantuml.ugraphic.UBackground;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UParam;
|
import net.sourceforge.plantuml.ugraphic.UParam;
|
||||||
@ -65,9 +64,9 @@ public class CollisionDetector implements UGraphic {
|
|||||||
return new CollisionDetector(stringBounder, translate.compose((UTranslate) change), this.context);
|
return new CollisionDetector(stringBounder, translate.compose((UTranslate) change), this.context);
|
||||||
} else if (change instanceof UStroke) {
|
} else if (change instanceof UStroke) {
|
||||||
return new CollisionDetector(this);
|
return new CollisionDetector(this);
|
||||||
} else if (change instanceof UChangeBackColor) {
|
} else if (change instanceof UBackground) {
|
||||||
return new CollisionDetector(this);
|
return new CollisionDetector(this);
|
||||||
} else if (change instanceof UChangeColor) {
|
} else if (change instanceof HColor) {
|
||||||
return new CollisionDetector(this);
|
return new CollisionDetector(this);
|
||||||
}
|
}
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
@ -89,7 +88,7 @@ public class CollisionDetector implements UGraphic {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final HColor color = HColorUtils.BLACK;
|
final HColor color = HColorUtils.BLACK;
|
||||||
ug = ug.apply(new UChangeColor(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)) {
|
||||||
|
@ -82,7 +82,7 @@ public interface FtileFactory {
|
|||||||
Ftile backward, boolean noOut);
|
Ftile backward, boolean noOut);
|
||||||
|
|
||||||
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
||||||
LinkRendering afterEndwhile, HColor color, Instruction specialOut);
|
LinkRendering afterEndwhile, HColor color, Instruction specialOut, Ftile backward);
|
||||||
|
|
||||||
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);
|
||||||
|
@ -180,15 +180,15 @@ public class FtileFactoryDelegator implements FtileFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat,
|
public Ftile repeat(BoxStyle boxStyleIn, Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat,
|
||||||
Display test, Display yes, Display out, Colors colors, LinkRendering backRepeatLinkRendering, Ftile backward,
|
Display test, Display yes, Display out, Colors colors, LinkRendering backRepeatLinkRendering,
|
||||||
boolean noOut) {
|
Ftile backward, boolean noOut) {
|
||||||
return factory.repeat(boxStyleIn, swimlane, swimlaneOut, startLabel, repeat, test, yes, out, colors,
|
return factory.repeat(boxStyleIn, swimlane, swimlaneOut, startLabel, repeat, test, yes, out, colors,
|
||||||
backRepeatLinkRendering, backward, noOut);
|
backRepeatLinkRendering, backward, noOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
||||||
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
|
LinkRendering afterEndwhile, HColor color, Instruction specialOut, Ftile back) {
|
||||||
return factory.createWhile(swimlane, whileBlock, test, yes, out, afterEndwhile, color, specialOut);
|
return factory.createWhile(swimlane, whileBlock, test, yes, out, afterEndwhile, color, specialOut, back);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
|
public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
|
||||||
|
@ -49,7 +49,6 @@ 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;
|
||||||
import net.sourceforge.plantuml.style.StyleSignature;
|
import net.sourceforge.plantuml.style.StyleSignature;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -91,7 +90,7 @@ public class LaneDivider extends AbstractTextBlock {
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
// final UShape back = new URectangle(x1 + x2, height).ignoreForCompressionOnY();
|
// final UShape back = new URectangle(x1 + x2, height).ignoreForCompressionOnY();
|
||||||
// ug.apply(new UChangeColor(HColorUtils.BLUE)).draw(back);
|
// ug.apply(UChangeColor.nnn(HColorUtils.BLUE)).draw(back);
|
||||||
final UShape back = new UEmpty(x1 + x2, 1);
|
final UShape back = new UEmpty(x1 + x2, 1);
|
||||||
ug.draw(back);
|
ug.draw(back);
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ public class LaneDivider extends AbstractTextBlock {
|
|||||||
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
thickness = getStyle().getStroke();
|
thickness = getStyle().getStroke();
|
||||||
}
|
}
|
||||||
ug.apply(UTranslate.dx(x1)).apply(thickness).apply(new UChangeColor(color)).draw(ULine.vline(height));
|
ug.apply(UTranslate.dx(x1)).apply(thickness).apply(color).draw(ULine.vline(height));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,8 +70,6 @@ import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
|||||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UShape;
|
import net.sourceforge.plantuml.ugraphic.UShape;
|
||||||
@ -211,8 +209,7 @@ public class SwimlanesA extends AbstractTextBlock implements ISwimlanesA, TextBl
|
|||||||
}
|
}
|
||||||
|
|
||||||
static private void printDebug(UGraphic ug, SlotSet slot, HColor col, TextBlock full) {
|
static private void printDebug(UGraphic ug, SlotSet slot, HColor col, TextBlock full) {
|
||||||
slot.drawDebugX(ug.apply(new UChangeColor(col)).apply(new UChangeBackColor(col)),
|
slot.drawDebugX(ug.apply(col).apply(col.bg()), full.calculateDimension(ug.getStringBounder()).getHeight());
|
||||||
full.calculateDimension(ug.getStringBounder()).getHeight());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,12 +221,12 @@ public class SwimlanesA extends AbstractTextBlock implements ISwimlanesA, TextBl
|
|||||||
for (Swimlane swimlane : swimlanes) {
|
for (Swimlane swimlane : swimlanes) {
|
||||||
final HColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
|
final HColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
|
||||||
if (back != null) {
|
if (back != null) {
|
||||||
UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back));
|
UGraphic background = ug.apply(back.bg()).apply(back);
|
||||||
background = background.apply(UTranslate.dx(x2));
|
background = background.apply(UTranslate.dx(x2));
|
||||||
drawBackColor(background, swimlane, dimensionFull);
|
drawBackColor(background, swimlane, dimensionFull);
|
||||||
}
|
}
|
||||||
|
|
||||||
full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane).apply(swimlane.getTranslate())
|
full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane, swimlanes).apply(swimlane.getTranslate())
|
||||||
.apply(getTitleHeightTranslate(stringBounder)));
|
.apply(getTitleHeightTranslate(stringBounder)));
|
||||||
x2 += swimlane.getActualWidth();
|
x2 += swimlane.getActualWidth();
|
||||||
|
|
||||||
@ -242,7 +239,8 @@ public class SwimlanesA extends AbstractTextBlock implements ISwimlanesA, TextBl
|
|||||||
protected void drawBackColor(UGraphic ug, Swimlane swimlane, Dimension2D dimensionFull) {
|
protected void drawBackColor(UGraphic ug, Swimlane swimlane, Dimension2D dimensionFull) {
|
||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final double height = dimensionFull.getHeight() + getTitleHeightTranslate(stringBounder).getDy();
|
final double height = dimensionFull.getHeight() + getTitleHeightTranslate(stringBounder).getDy();
|
||||||
final URectangle rectangle = new URectangle(swimlane.getActualWidth(), height).ignoreForCompressionOnX().ignoreForCompressionOnY();
|
final URectangle rectangle = new URectangle(swimlane.getActualWidth(), height).ignoreForCompressionOnX()
|
||||||
|
.ignoreForCompressionOnY();
|
||||||
ug.draw(rectangle);
|
ug.draw(rectangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +253,7 @@ public class SwimlanesA extends AbstractTextBlock implements ISwimlanesA, TextBl
|
|||||||
for (Swimlane swimlane : swimlanes) {
|
for (Swimlane swimlane : swimlanes) {
|
||||||
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
||||||
final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(
|
final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(
|
||||||
new UGraphicForSnake(limitFinder), swimlane);
|
new UGraphicForSnake(limitFinder), swimlane, swimlanes);
|
||||||
full.drawU(interceptor);
|
full.drawU(interceptor);
|
||||||
interceptor.flushUg();
|
interceptor.flushUg();
|
||||||
final MinMax minMax = limitFinder.getMinMax();
|
final MinMax minMax = limitFinder.getMinMax();
|
||||||
|
@ -78,8 +78,6 @@ import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
|||||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UShape;
|
import net.sourceforge.plantuml.ugraphic.UShape;
|
||||||
@ -279,14 +277,14 @@ public class SwimlanesAAA extends AbstractTextBlock implements ISwimlanesA, Text
|
|||||||
final HColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
|
final HColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
|
||||||
if (back != null) {
|
if (back != null) {
|
||||||
final LaneDivider divider2 = dividers.get(i + 1);
|
final LaneDivider divider2 = dividers.get(i + 1);
|
||||||
final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back))
|
final UGraphic background = ug.apply(back.bg()).apply(back)
|
||||||
.apply(UTranslate.dx(xpos - divider1.getX2()));
|
.apply(UTranslate.dx(xpos - divider1.getX2()));
|
||||||
final double width = swimlane.getActualWidth() + divider1.getX2() + divider2.getX1();
|
final double width = swimlane.getActualWidth() + divider1.getX2() + divider2.getX1();
|
||||||
final double height = dimensionFull.getHeight() + titleHeightTranslate.getDy();
|
final double height = dimensionFull.getHeight() + titleHeightTranslate.getDy();
|
||||||
background.draw(new URectangle(width, height).ignoreForCompressionOnX().ignoreForCompressionOnY());
|
background.draw(new URectangle(width, height).ignoreForCompressionOnX().ignoreForCompressionOnY());
|
||||||
}
|
}
|
||||||
|
|
||||||
full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane).apply(swimlane.getTranslate())
|
full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane, swimlanes()).apply(swimlane.getTranslate())
|
||||||
.apply(getTitleHeightTranslate(stringBounder)));
|
.apply(getTitleHeightTranslate(stringBounder)));
|
||||||
|
|
||||||
final double dividerWith = divider1.calculateDimension(stringBounder).getWidth();
|
final double dividerWith = divider1.calculateDimension(stringBounder).getWidth();
|
||||||
@ -312,7 +310,7 @@ public class SwimlanesAAA extends AbstractTextBlock implements ISwimlanesA, Text
|
|||||||
double fullWidth = swimlanesSpecial().get(swimlanesSpecial().size() - 1).getTranslate().getDx() - 2 * 5 - 1;
|
double fullWidth = swimlanesSpecial().get(swimlanesSpecial().size() - 1).getTranslate().getDx() - 2 * 5 - 1;
|
||||||
final URectangle back = new URectangle(fullWidth, titleHeight).ignoreForCompressionOnX()
|
final URectangle back = new URectangle(fullWidth, titleHeight).ignoreForCompressionOnX()
|
||||||
.ignoreForCompressionOnY();
|
.ignoreForCompressionOnY();
|
||||||
ug.apply(UTranslate.dx(5)).apply(new UChangeBackColor(color)).apply(new UChangeColor(color)).draw(back);
|
ug.apply(UTranslate.dx(5)).apply(color.bg()).apply(color).draw(back);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +328,7 @@ public class SwimlanesAAA extends AbstractTextBlock implements ISwimlanesA, Text
|
|||||||
for (Swimlane swimlane : swimlanes()) {
|
for (Swimlane swimlane : swimlanes()) {
|
||||||
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
||||||
final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(
|
final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(
|
||||||
new UGraphicForSnake(limitFinder), swimlane);
|
new UGraphicForSnake(limitFinder), swimlane, swimlanes());
|
||||||
full.drawU(interceptor);
|
full.drawU(interceptor);
|
||||||
interceptor.flushUg();
|
interceptor.flushUg();
|
||||||
final MinMax minMax = limitFinder.getMinMax();
|
final MinMax minMax = limitFinder.getMinMax();
|
||||||
|
@ -46,8 +46,6 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -74,7 +72,7 @@ public class SwimlanesB extends SwimlanesA {
|
|||||||
if (color != null) {
|
if (color != null) {
|
||||||
final double titleHeight = getTitlesHeight(stringBounder);
|
final double titleHeight = getTitlesHeight(stringBounder);
|
||||||
final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight).ignoreForCompressionOnX().ignoreForCompressionOnY();
|
final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight).ignoreForCompressionOnX().ignoreForCompressionOnY();
|
||||||
ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color)).draw(back);
|
ug.apply(color.bg()).apply(color).draw(back);
|
||||||
}
|
}
|
||||||
for (Swimlane swimlane : swimlanes) {
|
for (Swimlane swimlane : swimlanes) {
|
||||||
final TextBlock swTitle = getTitle(swimlane);
|
final TextBlock swTitle = getTitle(swimlane);
|
||||||
|
@ -46,7 +46,6 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
|||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||||
@ -89,6 +88,6 @@ public class SwimlanesC extends SwimlanesB {
|
|||||||
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
thickness = getStyle().getStroke();
|
thickness = getStyle().getStroke();
|
||||||
}
|
}
|
||||||
ug.apply(thickness).apply(new UChangeColor(color)).draw(ULine.vline(height));
|
ug.apply(thickness).apply(color).draw(ULine.vline(height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,6 @@ import net.sourceforge.plantuml.graphic.UDrawable;
|
|||||||
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
|
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
|
||||||
import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -89,8 +87,8 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
|
|||||||
private void drawGoto(FtileGoto ftile) {
|
private void drawGoto(FtileGoto ftile) {
|
||||||
final FtileGeometry geom = ftile.calculateDimension(getStringBounder());
|
final FtileGeometry geom = ftile.calculateDimension(getStringBounder());
|
||||||
final Point2D pt = geom.getPointIn();
|
final Point2D pt = geom.getPointIn();
|
||||||
UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
|
UGraphic ugGoto = getUg().apply(HColorUtils.GREEN).apply(
|
||||||
new UChangeBackColor(HColorUtils.GREEN));
|
HColorUtils.GREEN.bg());
|
||||||
ugGoto = ugGoto.apply(new UTranslate(pt));
|
ugGoto = ugGoto.apply(new UTranslate(pt));
|
||||||
final UTranslate posNow = getPosition();
|
final UTranslate posNow = getPosition();
|
||||||
final UTranslate dest = positions.get(ftile.getName());
|
final UTranslate dest = positions.get(ftile.getName());
|
||||||
|
@ -47,8 +47,6 @@ import net.sourceforge.plantuml.Direction;
|
|||||||
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
|
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
|
||||||
import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
|
import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
||||||
@ -81,8 +79,8 @@ public class Worm implements Iterable<Point2D.Double> {
|
|||||||
if (style.isInvisible()) {
|
if (style.isInvisible()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(color2));
|
ug = ug.apply(color2);
|
||||||
ug = ug.apply(new UChangeBackColor(color2));
|
ug = ug.apply(color2.bg());
|
||||||
if (style.isNormal()) {
|
if (style.isNormal()) {
|
||||||
ug = ug.apply(new UStroke(stroke));
|
ug = ug.apply(new UStroke(stroke));
|
||||||
} else {
|
} else {
|
||||||
|
@ -39,8 +39,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||||
|
|
||||||
@ -55,7 +53,7 @@ public class Zad {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawDebug(UGraphic ug) {
|
public void drawDebug(UGraphic ug) {
|
||||||
ug = ug.apply(new UChangeBackColor(HColorUtils.BLUE)).apply(new UChangeColor(HColorUtils.RED_LIGHT));
|
ug = ug.apply(HColorUtils.BLUE.bg()).apply(HColorUtils.RED_LIGHT);
|
||||||
for (MinMax minMax : rectangles) {
|
for (MinMax minMax : rectangles) {
|
||||||
System.err.println("minmax=" + minMax);
|
System.err.println("minmax=" + minMax);
|
||||||
minMax.drawGrey(ug);
|
minMax.drawGrey(ug);
|
||||||
|
@ -39,8 +39,7 @@ import net.sourceforge.plantuml.Url;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
import net.sourceforge.plantuml.ugraphic.UBackground;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UParam;
|
import net.sourceforge.plantuml.ugraphic.UParam;
|
||||||
import net.sourceforge.plantuml.ugraphic.UParamNull;
|
import net.sourceforge.plantuml.ugraphic.UParamNull;
|
||||||
@ -49,6 +48,7 @@ import net.sourceforge.plantuml.ugraphic.UShape;
|
|||||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
|
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
|
||||||
public class ZadBuilder implements UGraphic {
|
public class ZadBuilder implements UGraphic {
|
||||||
|
|
||||||
@ -57,9 +57,9 @@ public class ZadBuilder implements UGraphic {
|
|||||||
return new ZadBuilder(stringBounder, translate.compose((UTranslate) change), this.context);
|
return new ZadBuilder(stringBounder, translate.compose((UTranslate) change), this.context);
|
||||||
} else if (change instanceof UStroke) {
|
} else if (change instanceof UStroke) {
|
||||||
return new ZadBuilder(this);
|
return new ZadBuilder(this);
|
||||||
} else if (change instanceof UChangeBackColor) {
|
} else if (change instanceof UBackground) {
|
||||||
return new ZadBuilder(this);
|
return new ZadBuilder(this);
|
||||||
} else if (change instanceof UChangeColor) {
|
} else if (change instanceof HColor) {
|
||||||
return new ZadBuilder(this);
|
return new ZadBuilder(this);
|
||||||
}
|
}
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
@ -72,7 +72,7 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
||||||
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
|
LinkRendering afterEndwhile, HColor color, Instruction specialOut, Ftile backward) {
|
||||||
|
|
||||||
final HColor borderColor;
|
final HColor borderColor;
|
||||||
final HColor backColor;
|
final HColor backColor;
|
||||||
@ -83,10 +83,10 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
|||||||
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
|
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
|
||||||
: FontParam.ARROW;
|
: FontParam.ARROW;
|
||||||
if (SkinParam.USE_STYLES()) {
|
if (SkinParam.USE_STYLES()) {
|
||||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(
|
final Style styleArrow = getDefaultStyleDefinitionArrow()
|
||||||
skinParam().getCurrentStyleBuilder());
|
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond().getMergedStyle(
|
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||||
skinParam().getCurrentStyleBuilder());
|
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||||
borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet());
|
borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet());
|
||||||
backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet());
|
backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet());
|
||||||
arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet());
|
arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet());
|
||||||
@ -102,11 +102,12 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final LinkRendering endInlinkRendering = whileBlock.getOutLinkRendering();
|
final LinkRendering endInlinkRendering = whileBlock.getOutLinkRendering();
|
||||||
final Rainbow endInlinkColor = endInlinkRendering == null || endInlinkRendering.getRainbow().size() == 0 ? arrowColor
|
final Rainbow endInlinkColor = endInlinkRendering == null || endInlinkRendering.getRainbow().size() == 0
|
||||||
|
? arrowColor
|
||||||
: endInlinkRendering.getRainbow();
|
: endInlinkRendering.getRainbow();
|
||||||
|
|
||||||
Ftile result = FtileWhile.create(swimlane, whileBlock, test, borderColor, backColor, arrowColor, yes, out,
|
Ftile result = FtileWhile.create(swimlane, whileBlock, test, borderColor, backColor, arrowColor, yes, out,
|
||||||
endInlinkColor, afterEndwhile, fontArrow, getFactory(), conditionStyle, fcTest, specialOut);
|
endInlinkColor, afterEndwhile, fontArrow, getFactory(), conditionStyle, fcTest, specialOut, backward);
|
||||||
|
|
||||||
final List<WeldingPoint> weldingPoints = whileBlock.getWeldingPoints();
|
final List<WeldingPoint> weldingPoints = whileBlock.getWeldingPoints();
|
||||||
if (weldingPoints.size() > 0) {
|
if (weldingPoints.size() > 0) {
|
||||||
@ -120,8 +121,8 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
|||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UTranslate tr1 = genealogy.getTranslate(ftileBreak, ug.getStringBounder());
|
final UTranslate tr1 = genealogy.getTranslate(ftileBreak, ug.getStringBounder());
|
||||||
|
|
||||||
final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor, Arrows
|
final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor,
|
||||||
.asToLeft());
|
Arrows.asToLeft());
|
||||||
snake.addPoint(tr1.getDx(), tr1.getDy());
|
snake.addPoint(tr1.getDx(), tr1.getDy());
|
||||||
snake.addPoint(Diamond.diamondHalfSize, tr1.getDy());
|
snake.addPoint(Diamond.diamondHalfSize, tr1.getDy());
|
||||||
ug.draw(snake);
|
ug.draw(snake);
|
||||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
|||||||
|
|
||||||
import java.awt.geom.Dimension2D;
|
import java.awt.geom.Dimension2D;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
|
import java.nio.channels.IllegalSelectorException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -187,7 +188,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
diamonds = alignDiamonds(diamonds, ftileFactory.getStringBounder());
|
diamonds = alignDiamonds(diamonds, ftileFactory.getStringBounder());
|
||||||
|
|
||||||
final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2, arrowColor);
|
final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2,
|
||||||
|
arrowColor);
|
||||||
final List<Connection> conns = new ArrayList<Connection>();
|
final List<Connection> conns = new ArrayList<Connection>();
|
||||||
|
|
||||||
int nbOut = 0;
|
int nbOut = 0;
|
||||||
@ -205,8 +207,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
final Rainbow rainbowOut = branch.getInlinkRenderingColorAndStyle();
|
final Rainbow rainbowOut = branch.getInlinkRenderingColorAndStyle();
|
||||||
TextBlock out2 = null;
|
TextBlock out2 = null;
|
||||||
if (branch.getSpecial() != null) {
|
if (branch.getSpecial() != null) {
|
||||||
out2 = branch.getSpecial().getDisplay()
|
out2 = branch.getSpecial().getDisplay().create(fcTest, HorizontalAlignment.LEFT,
|
||||||
.create(fcTest, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
ftileFactory.skinParam());
|
||||||
}
|
}
|
||||||
conns.add(result.new ConnectionVerticalIn(diam, ftile, rainbowIn.size() == 0 ? arrowColor : rainbowIn));
|
conns.add(result.new ConnectionVerticalIn(diam, ftile, rainbowIn.size() == 0 ? arrowColor : rainbowIn));
|
||||||
conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut, out2));
|
conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut, out2));
|
||||||
@ -264,8 +266,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
private Point2D getP1(StringBounder stringBounder) {
|
private Point2D getP1(StringBounder stringBounder) {
|
||||||
final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder);
|
final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder);
|
||||||
final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2, getYdiamontOutToLeft(dimDiamond1,
|
final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2,
|
||||||
stringBounder));
|
getYdiamontOutToLeft(dimDiamond1, stringBounder));
|
||||||
|
|
||||||
return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p);
|
return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p);
|
||||||
}
|
}
|
||||||
@ -327,8 +329,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
|||||||
|
|
||||||
private Point2D getP1(StringBounder stringBounder) {
|
private Point2D getP1(StringBounder stringBounder) {
|
||||||
final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder);
|
final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder);
|
||||||
final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2, getYdiamontOutToLeft(dimDiamond1,
|
final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2,
|
||||||
stringBounder));
|
getYdiamontOutToLeft(dimDiamond1, stringBounder));
|
||||||
return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p);
|
return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,45 +472,103 @@ 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 Swimlane intoSw;
|
final List<Ftile> allTiles = new ArrayList<Ftile>(couples);
|
||||||
|
allTiles.add(tile2);
|
||||||
|
|
||||||
|
final double[] minmax;
|
||||||
if (ug instanceof UGraphicInterceptorOneSwimlane) {
|
if (ug instanceof UGraphicInterceptorOneSwimlane) {
|
||||||
intoSw = ((UGraphicInterceptorOneSwimlane) ug).getSwimlane();
|
final UGraphicInterceptorOneSwimlane interceptor = (UGraphicInterceptorOneSwimlane) ug;
|
||||||
|
final List<Swimlane> allSwimlanes = interceptor.getOrderedListOfAllSwimlanes();
|
||||||
|
minmax = getMinmax(stringBounder, totalDim.getWidth(), allTiles, interceptor.getSwimlane(),
|
||||||
|
allSwimlanes);
|
||||||
} else {
|
} else {
|
||||||
intoSw = null;
|
minmax = getMinmaxSimple(stringBounder, totalDim.getWidth(), allTiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Ftile> all = new ArrayList<Ftile>(couples);
|
final double minX = minmax[0];
|
||||||
all.add(tile2);
|
final double maxX = minmax[1];
|
||||||
double minX = totalDim.getWidth() / 2;
|
if (minX == Double.NaN || maxX == Double.NaN) {
|
||||||
double maxX = totalDim.getWidth() / 2;
|
|
||||||
boolean atLeastOne = false;
|
|
||||||
for (Ftile tmp : all) {
|
|
||||||
if (tmp.calculateDimension(stringBounder).hasPointOut() == false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (intoSw != null && tmp.getSwimlanes().contains(intoSw) == false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (intoSw != null && tmp.getSwimlaneOut() != intoSw) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
atLeastOne = true;
|
|
||||||
final UTranslate ut = getTranslateFor(tmp, stringBounder);
|
|
||||||
final double out = tmp.calculateDimension(stringBounder).translate(ut).getLeft();
|
|
||||||
minX = Math.min(minX, out);
|
|
||||||
maxX = Math.max(maxX, out);
|
|
||||||
}
|
|
||||||
if (atLeastOne == false) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor);
|
final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor);
|
||||||
s.goUnmergeable(MergeStrategy.NONE);
|
s.goUnmergeable(MergeStrategy.NONE);
|
||||||
final double height = totalDim.getHeight();
|
s.addPoint(minX, totalDim.getHeight());
|
||||||
s.addPoint(minX, height);
|
s.addPoint(maxX, totalDim.getHeight());
|
||||||
s.addPoint(maxX, height);
|
|
||||||
ug.draw(s);
|
ug.draw(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private double[] getMinmax(StringBounder stringBounder, double width, List<Ftile> allTiles, Swimlane intoSw,
|
||||||
|
List<Swimlane> allSwimlanes) {
|
||||||
|
final int current = allSwimlanes.indexOf(intoSw);
|
||||||
|
if (current == -1) {
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
final int first = getFirstSwimlane(stringBounder, allTiles, allSwimlanes);
|
||||||
|
final int last = getLastSwimlane(stringBounder, allTiles, allSwimlanes);
|
||||||
|
if (current < first || current > last)
|
||||||
|
return new double[] { Double.NaN, Double.NaN };
|
||||||
|
double minX = current != first ? 0 : width;
|
||||||
|
double maxX = current != last ? width : 0;
|
||||||
|
for (Ftile tmp : allTiles) {
|
||||||
|
if (tmp.calculateDimension(stringBounder).hasPointOut() == false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ftileDoesOutcomeInThatSwimlane(tmp, intoSw) == false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final UTranslate ut = getTranslateFor(tmp, stringBounder);
|
||||||
|
final double out = tmp.calculateDimension(stringBounder).translate(ut).getLeft();
|
||||||
|
minX = Math.min(minX, out);
|
||||||
|
maxX = Math.max(maxX, out);
|
||||||
|
}
|
||||||
|
return new double[] { minX, maxX };
|
||||||
|
}
|
||||||
|
|
||||||
|
private double[] getMinmaxSimple(StringBounder stringBounder, double width, List<Ftile> allTiles) {
|
||||||
|
double minX = width / 2;
|
||||||
|
double maxX = width / 2;
|
||||||
|
for (Ftile tmp : allTiles) {
|
||||||
|
if (tmp.calculateDimension(stringBounder).hasPointOut() == false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final UTranslate ut = getTranslateFor(tmp, stringBounder);
|
||||||
|
final double out = tmp.calculateDimension(stringBounder).translate(ut).getLeft();
|
||||||
|
minX = Math.min(minX, out);
|
||||||
|
maxX = Math.max(maxX, out);
|
||||||
|
}
|
||||||
|
return new double[] { minX, maxX };
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getFirstSwimlane(StringBounder stringBounder, List<Ftile> allTiles, List<Swimlane> allSwimlanes) {
|
||||||
|
for (int i = 0; i < allSwimlanes.size(); i++) {
|
||||||
|
if (atLeastOne(stringBounder, allSwimlanes.get(i), allTiles)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getLastSwimlane(StringBounder stringBounder, List<Ftile> allTiles, List<Swimlane> allSwimlanes) {
|
||||||
|
for (int i = allSwimlanes.size() - 1; i >= 0; i--) {
|
||||||
|
if (atLeastOne(stringBounder, allSwimlanes.get(i), allTiles)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean atLeastOne(StringBounder stringBounder, Swimlane intoSw, List<Ftile> allTiles) {
|
||||||
|
for (Ftile tmp : allTiles)
|
||||||
|
if (tmp.calculateDimension(stringBounder).hasPointOut() && ftileDoesOutcomeInThatSwimlane(tmp, intoSw))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean ftileDoesOutcomeInThatSwimlane(Ftile ftile, Swimlane swimlane) {
|
||||||
|
return ftile.getSwimlaneOut() == swimlane && ftile.getSwimlanes().contains(swimlane);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -71,8 +71,6 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
|||||||
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.svek.ConditionStyle;
|
import net.sourceforge.plantuml.svek.ConditionStyle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -83,6 +81,7 @@ class FtileWhile extends AbstractFtile {
|
|||||||
private final Ftile whileBlock;
|
private final Ftile whileBlock;
|
||||||
private final Ftile diamond1;
|
private final Ftile diamond1;
|
||||||
private final Ftile specialOut;
|
private final Ftile specialOut;
|
||||||
|
private final Ftile backward;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
@ -106,21 +105,23 @@ class FtileWhile extends AbstractFtile {
|
|||||||
return getSwimlaneIn();
|
return getSwimlaneIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
private FtileWhile(Ftile whileBlock, Ftile diamond1, Ftile specialOut) {
|
private FtileWhile(Ftile whileBlock, Ftile diamond1, Ftile specialOut, Ftile backward) {
|
||||||
super(whileBlock.skinParam());
|
super(whileBlock.skinParam());
|
||||||
this.whileBlock = whileBlock;
|
this.whileBlock = whileBlock;
|
||||||
this.diamond1 = diamond1;
|
this.diamond1 = diamond1;
|
||||||
this.specialOut = specialOut;
|
this.specialOut = specialOut;
|
||||||
|
this.backward = backward;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HColor borderColor,
|
public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HColor borderColor, HColor backColor,
|
||||||
HColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor,
|
Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor, LinkRendering afterEndwhile,
|
||||||
LinkRendering afterEndwhile, FontConfiguration fontArrow, FtileFactory ftileFactory,
|
FontConfiguration fontArrow, FtileFactory ftileFactory, ConditionStyle conditionStyle,
|
||||||
ConditionStyle conditionStyle, FontConfiguration fcTest, Instruction specialOut) {
|
FontConfiguration fcTest, Instruction specialOut, Ftile backward) {
|
||||||
|
|
||||||
final TextBlock yesTb = yes.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
final TextBlock yesTb = yes.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
||||||
final TextBlock testTb = test.isWhite() ? TextBlockUtils.empty(0, 0) : test.create(fcTest, whileBlock
|
final TextBlock testTb = test.isWhite() ? TextBlockUtils.empty(0, 0)
|
||||||
.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), ftileFactory.skinParam());
|
: test.create(fcTest, whileBlock.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
|
||||||
|
ftileFactory.skinParam());
|
||||||
final TextBlock out = out2.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
final TextBlock out = out2.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
||||||
|
|
||||||
final Ftile diamond1;
|
final Ftile diamond1;
|
||||||
@ -139,7 +140,7 @@ class FtileWhile extends AbstractFtile {
|
|||||||
|
|
||||||
final Ftile special = specialOut == null ? null : specialOut.createFtile(ftileFactory);
|
final Ftile special = specialOut == null ? null : specialOut.createFtile(ftileFactory);
|
||||||
|
|
||||||
final FtileWhile result = new FtileWhile(whileBlock, diamond1, special);
|
final FtileWhile result = new FtileWhile(whileBlock, diamond1, special, backward);
|
||||||
Rainbow afterEndwhileColor = arrowColor;
|
Rainbow afterEndwhileColor = arrowColor;
|
||||||
if (afterEndwhile != null && afterEndwhile.getRainbow() != null && afterEndwhile.getRainbow().size() != 0) {
|
if (afterEndwhile != null && afterEndwhile.getRainbow() != null && afterEndwhile.getRainbow().size() != 0) {
|
||||||
afterEndwhileColor = afterEndwhile.getRainbow();
|
afterEndwhileColor = afterEndwhile.getRainbow();
|
||||||
@ -154,7 +155,12 @@ class FtileWhile extends AbstractFtile {
|
|||||||
conns.add(result.new ConnectionBackEmpty(endInlinkColor));
|
conns.add(result.new ConnectionBackEmpty(endInlinkColor));
|
||||||
} else {
|
} else {
|
||||||
conns.add(result.new ConnectionIn(whileBlock.getInLinkRendering().getRainbow(arrowColor)));
|
conns.add(result.new ConnectionIn(whileBlock.getInLinkRendering().getRainbow(arrowColor)));
|
||||||
conns.add(result.new ConnectionBack(endInlinkColor, back));
|
if (backward == null) {
|
||||||
|
conns.add(result.new ConnectionBackSimple(endInlinkColor, back));
|
||||||
|
} else {
|
||||||
|
conns.add(result.new ConnectionBackBackward1(endInlinkColor, back));
|
||||||
|
conns.add(result.new ConnectionBackBackward2(endInlinkColor));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (specialOut == null) {
|
if (specialOut == null) {
|
||||||
conns.add(result.new ConnectionOut(afterEndwhileColor));
|
conns.add(result.new ConnectionOut(afterEndwhileColor));
|
||||||
@ -173,13 +179,13 @@ class FtileWhile extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Point2D getP1(final StringBounder stringBounder) {
|
private Point2D getP1(final StringBounder stringBounder) {
|
||||||
return getTranslateDiamond1(stringBounder).getTranslated(
|
return getTranslateDiamond1(stringBounder)
|
||||||
getFtile1().calculateDimension(stringBounder).getPointOut());
|
.getTranslated(getFtile1().calculateDimension(stringBounder).getPointOut());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Point2D getP2(final StringBounder stringBounder) {
|
private Point2D getP2(final StringBounder stringBounder) {
|
||||||
return getTranslateForWhile(stringBounder).getTranslated(
|
return getTranslateForWhile(stringBounder)
|
||||||
getFtile2().calculateDimension(stringBounder).getPointIn());
|
.getTranslated(getFtile2().calculateDimension(stringBounder).getPointIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
@ -209,11 +215,11 @@ class FtileWhile extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConnectionBack extends AbstractConnection implements ConnectionTranslatable {
|
class ConnectionBackSimple extends AbstractConnection implements ConnectionTranslatable {
|
||||||
private final Rainbow endInlinkColor;
|
private final Rainbow endInlinkColor;
|
||||||
private final TextBlock back;
|
private final TextBlock back;
|
||||||
|
|
||||||
public ConnectionBack(Rainbow endInlinkColor, TextBlock back) {
|
public ConnectionBackSimple(Rainbow endInlinkColor, TextBlock back) {
|
||||||
super(whileBlock, diamond1);
|
super(whileBlock, diamond1);
|
||||||
this.endInlinkColor = endInlinkColor;
|
this.endInlinkColor = endInlinkColor;
|
||||||
this.back = back;
|
this.back = back;
|
||||||
@ -299,14 +305,105 @@ class FtileWhile extends AbstractFtile {
|
|||||||
|
|
||||||
ug.apply(new UTranslate(x1, y1 + Diamond.diamondHalfSize)).draw(new UEmpty(5, Diamond.diamondHalfSize));
|
ug.apply(new UTranslate(x1, y1 + Diamond.diamondHalfSize)).draw(new UEmpty(5, Diamond.diamondHalfSize));
|
||||||
|
|
||||||
ug = ug.apply(new UChangeColor(endInlinkColor.getColor())).apply(
|
ug = ug.apply(endInlinkColor.getColor()).apply(endInlinkColor.getColor().bg());
|
||||||
new UChangeBackColor(endInlinkColor.getColor()));
|
|
||||||
ug.apply(new UTranslate(xx, (y1 + y2) / 2)).draw(Arrows.asToUp());
|
ug.apply(new UTranslate(xx, (y1 + y2) / 2)).draw(Arrows.asToUp());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ConnectionBackBackward1 extends AbstractConnection {
|
||||||
|
private final Rainbow endInlinkColor;
|
||||||
|
private final TextBlock back;
|
||||||
|
|
||||||
|
public ConnectionBackBackward1(Rainbow endInlinkColor, TextBlock back) {
|
||||||
|
super(whileBlock, backward);
|
||||||
|
this.endInlinkColor = endInlinkColor;
|
||||||
|
this.back = back;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Point2D getP1(final StringBounder stringBounder) {
|
||||||
|
final FtileGeometry geo = whileBlock.calculateDimension(stringBounder);
|
||||||
|
if (geo.hasPointOut() == false) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return getTranslateForWhile(stringBounder).getTranslated(geo.getPointOut());
|
||||||
|
}
|
||||||
|
|
||||||
|
private double getBottom(final StringBounder stringBounder) {
|
||||||
|
final FtileGeometry geo = whileBlock.calculateDimension(stringBounder);
|
||||||
|
return getTranslateForWhile(stringBounder).getDy() + geo.getHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Point2D getP2(final StringBounder stringBounder) {
|
||||||
|
final FtileGeometry dim = backward.calculateDimension(stringBounder);
|
||||||
|
return getTranslateBackward(stringBounder).getTranslated(new Point2D.Double(dim.getLeft(), dim.getOutY()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawU(UGraphic ug) {
|
||||||
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
|
|
||||||
|
final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToUp());
|
||||||
|
final Point2D p1 = getP1(stringBounder);
|
||||||
|
if (p1 == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final Point2D p2 = getP2(stringBounder);
|
||||||
|
final double x1 = p1.getX();
|
||||||
|
final double y1 = p1.getY();
|
||||||
|
final double x2 = p2.getX();
|
||||||
|
final double y2 = p2.getY();
|
||||||
|
|
||||||
|
snake.setLabel(back);
|
||||||
|
snake.addPoint(x1, y1);
|
||||||
|
final double y1bis = Math.max(y1, getBottom(stringBounder)) + Diamond.diamondHalfSize;
|
||||||
|
snake.addPoint(x1, y1bis);
|
||||||
|
snake.addPoint(x2, y1bis);
|
||||||
|
snake.addPoint(x2, y2);
|
||||||
|
|
||||||
|
ug.draw(snake);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ConnectionBackBackward2 extends AbstractConnection {
|
||||||
|
private final Rainbow endInlinkColor;
|
||||||
|
|
||||||
|
public ConnectionBackBackward2(Rainbow endInlinkColor) {
|
||||||
|
super(backward, diamond1);
|
||||||
|
this.endInlinkColor = endInlinkColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Point2D getP1(final StringBounder stringBounder) {
|
||||||
|
final FtileGeometry dim = backward.calculateDimension(stringBounder);
|
||||||
|
return getTranslateBackward(stringBounder).getTranslated(new Point2D.Double(dim.getLeft(), dim.getInY()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Point2D getP2(final StringBounder stringBounder) {
|
||||||
|
return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawU(UGraphic ug) {
|
||||||
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
|
|
||||||
|
final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToLeft());
|
||||||
|
final Point2D p1 = getP1(stringBounder);
|
||||||
|
final Point2D p2 = getP2(stringBounder);
|
||||||
|
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
|
||||||
|
|
||||||
|
final double x1 = p1.getX();
|
||||||
|
final double y1 = p1.getY();
|
||||||
|
final double x2 = p2.getX() + dimDiamond1.getWidth();
|
||||||
|
final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2;
|
||||||
|
final double y2 = p2.getY() + dimDiamond1.getInY() + half;
|
||||||
|
|
||||||
|
snake.addPoint(x1, y1);
|
||||||
|
snake.addPoint(x1, y2);
|
||||||
|
snake.addPoint(x2, y2);
|
||||||
|
|
||||||
|
ug.draw(snake);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class ConnectionBackEmpty extends AbstractConnection {
|
class ConnectionBackEmpty extends AbstractConnection {
|
||||||
private final Rainbow endInlinkColor;
|
private final Rainbow endInlinkColor;
|
||||||
|
|
||||||
@ -316,8 +413,8 @@ class FtileWhile extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Point2D getP1(final StringBounder stringBounder) {
|
private Point2D getP1(final StringBounder stringBounder) {
|
||||||
return getTranslateDiamond1(stringBounder).getTranslated(
|
return getTranslateDiamond1(stringBounder)
|
||||||
diamond1.calculateDimension(stringBounder).getPointOut());
|
.getTranslated(diamond1.calculateDimension(stringBounder).getPointOut());
|
||||||
}
|
}
|
||||||
|
|
||||||
private double getBottom(final StringBounder stringBounder) {
|
private double getBottom(final StringBounder stringBounder) {
|
||||||
@ -424,8 +521,8 @@ class FtileWhile extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Point2D getP2(final StringBounder stringBounder) {
|
private Point2D getP2(final StringBounder stringBounder) {
|
||||||
return getTranslateForSpecial(stringBounder).getTranslated(
|
return getTranslateForSpecial(stringBounder)
|
||||||
specialOut.calculateDimension(stringBounder).getPointIn());
|
.getTranslated(specialOut.calculateDimension(stringBounder).getPointIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
@ -459,6 +556,18 @@ class FtileWhile extends AbstractFtile {
|
|||||||
if (specialOut != null) {
|
if (specialOut != null) {
|
||||||
ug.apply(getTranslateForSpecial(stringBounder)).draw(specialOut);
|
ug.apply(getTranslateForSpecial(stringBounder)).draw(specialOut);
|
||||||
}
|
}
|
||||||
|
if (backward != null) {
|
||||||
|
ug.apply(getTranslateBackward(stringBounder)).draw(backward);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private UTranslate getTranslateBackward(StringBounder stringBounder) {
|
||||||
|
final Dimension2D dimTotal = calculateDimensionFtile(stringBounder);
|
||||||
|
final Dimension2D dimBackward = backward.calculateDimension(stringBounder);
|
||||||
|
final double x = dimTotal.getWidth() - dimBackward.getWidth();
|
||||||
|
final double y = (dimTotal.getHeight() - dimBackward.getHeight()) / 2;
|
||||||
|
|
||||||
|
return new UTranslate(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -473,7 +582,12 @@ class FtileWhile extends AbstractFtile {
|
|||||||
final FtileGeometry geo = geoDiamond1.appendBottom(geoWhile);
|
final FtileGeometry geo = geoDiamond1.appendBottom(geoWhile);
|
||||||
final double height = geo.getHeight() + 4 * Diamond.diamondHalfSize;
|
final double height = geo.getHeight() + 4 * Diamond.diamondHalfSize;
|
||||||
final double dx = 2 * Diamond.diamondHalfSize;
|
final double dx = 2 * Diamond.diamondHalfSize;
|
||||||
return new FtileGeometry(xDeltaBecauseSpecial(stringBounder) + geo.getWidth() + dx + Diamond.diamondHalfSize,
|
double backwardWidth = 0;
|
||||||
|
if (backward != null) {
|
||||||
|
backwardWidth += backward.calculateDimension(stringBounder).getWidth();
|
||||||
|
}
|
||||||
|
return new FtileGeometry(
|
||||||
|
xDeltaBecauseSpecial(stringBounder) + geo.getWidth() + dx + Diamond.diamondHalfSize + backwardWidth,
|
||||||
height, xDeltaBecauseSpecial(stringBounder) + geo.getLeft() + dx, geoDiamond1.getInY(), height);
|
height, xDeltaBecauseSpecial(stringBounder) + geo.getLeft() + dx, geoDiamond1.getInY(), height);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -527,7 +641,8 @@ class FtileWhile extends AbstractFtile {
|
|||||||
final double xDiamond = getTranslateDiamond1(stringBounder).getDx();
|
final double xDiamond = getTranslateDiamond1(stringBounder).getDx();
|
||||||
// final double x1 = xWhile - xDeltaBecauseSpecial(stringBounder);
|
// final double x1 = xWhile - xDeltaBecauseSpecial(stringBounder);
|
||||||
final double x1 = Math.min(xWhile, xDiamond) - xDeltaBecauseSpecial(stringBounder);
|
final double x1 = Math.min(xWhile, xDiamond) - xDeltaBecauseSpecial(stringBounder);
|
||||||
// final double x1 = getTranslateForWhile(stringBounder).getDx() - dimDiamond1.getWidth()
|
// final double x1 = getTranslateForWhile(stringBounder).getDx() -
|
||||||
|
// dimDiamond1.getWidth()
|
||||||
// - xDeltaBecauseSpecial(stringBounder);
|
// - xDeltaBecauseSpecial(stringBounder);
|
||||||
return new UTranslate(x1, y1);
|
return new UTranslate(x1, y1);
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
||||||
@ -42,8 +44,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
|||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||||
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
|
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChange;
|
import net.sourceforge.plantuml.ugraphic.UChange;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UShape;
|
import net.sourceforge.plantuml.ugraphic.UShape;
|
||||||
@ -52,10 +52,12 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
|||||||
public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
|
public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
|
||||||
|
|
||||||
private final Swimlane swimlane;
|
private final Swimlane swimlane;
|
||||||
|
private final List<Swimlane> orderedList;
|
||||||
|
|
||||||
public UGraphicInterceptorOneSwimlane(UGraphic ug, Swimlane swimlane) {
|
public UGraphicInterceptorOneSwimlane(UGraphic ug, Swimlane swimlane, List<Swimlane> orderedList) {
|
||||||
super(ug);
|
super(ug);
|
||||||
this.swimlane = swimlane;
|
this.swimlane = swimlane;
|
||||||
|
this.orderedList = orderedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(UShape shape) {
|
public void draw(UShape shape) {
|
||||||
@ -88,17 +90,20 @@ public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void drawGoto() {
|
private void drawGoto() {
|
||||||
final UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
|
final UGraphic ugGoto = getUg().apply(HColorUtils.GREEN).apply(HColorUtils.GREEN.bg());
|
||||||
new UChangeBackColor(HColorUtils.GREEN));
|
|
||||||
ugGoto.draw(new ULine(100, 100));
|
ugGoto.draw(new ULine(100, 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
public UGraphic apply(UChange change) {
|
public UGraphic apply(UChange change) {
|
||||||
return new UGraphicInterceptorOneSwimlane(getUg().apply(change), swimlane);
|
return new UGraphicInterceptorOneSwimlane(getUg().apply(change), swimlane, orderedList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Swimlane getSwimlane() {
|
public final Swimlane getSwimlane() {
|
||||||
return swimlane;
|
return swimlane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final List<Swimlane> getOrderedListOfAllSwimlanes() {
|
||||||
|
return Collections.unmodifiableList(orderedList);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -169,7 +169,7 @@ public class VCompactFactory implements FtileFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
|
||||||
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
|
LinkRendering afterEndwhile, HColor color, Instruction specialOut, Ftile back) {
|
||||||
return whileBlock;
|
return whileBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -95,7 +93,7 @@ public class FtileBlackBlock extends AbstractFtile {
|
|||||||
if (skinParam().shadowing(null)) {
|
if (skinParam().shadowing(null)) {
|
||||||
rect.setDeltaShadow(3);
|
rect.setDeltaShadow(3);
|
||||||
}
|
}
|
||||||
ug.apply(new UChangeColor(colorBar)).apply(new UChangeBackColor(colorBar)).draw(rect);
|
ug.apply(colorBar).apply(colorBar.bg()).draw(rect);
|
||||||
final Dimension2D dimLabel = label.calculateDimension(ug.getStringBounder());
|
final Dimension2D dimLabel = label.calculateDimension(ug.getStringBounder());
|
||||||
label.drawU(ug.apply(new UTranslate(width + labelMargin, -dimLabel.getHeight() / 2)));
|
label.drawU(ug.apply(new UTranslate(width + labelMargin, -dimLabel.getHeight() / 2)));
|
||||||
}
|
}
|
||||||
|
@ -73,12 +73,11 @@ import net.sourceforge.plantuml.style.SName;
|
|||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||||
import net.sourceforge.plantuml.style.StyleSignature;
|
import net.sourceforge.plantuml.style.StyleSignature;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
|
|
||||||
public class FtileBox extends AbstractFtile {
|
public class FtileBox extends AbstractFtile {
|
||||||
|
|
||||||
@ -243,7 +242,12 @@ public class FtileBox extends AbstractFtile {
|
|||||||
thickness = getThickness();
|
thickness = getThickness();
|
||||||
}
|
}
|
||||||
|
|
||||||
ug = ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(thickness);
|
if (borderColor == null) {
|
||||||
|
ug = ug.apply(new HColorNone());
|
||||||
|
} else {
|
||||||
|
ug = ug.apply(borderColor);
|
||||||
|
}
|
||||||
|
ug = ug.apply(backColor.bg()).apply(thickness);
|
||||||
rect.drawU(ug);
|
rect.drawU(ug);
|
||||||
|
|
||||||
if (horizontalAlignment == HorizontalAlignment.LEFT) {
|
if (horizontalAlignment == HorizontalAlignment.LEFT) {
|
||||||
|
@ -48,8 +48,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -107,9 +105,9 @@ public class FtileCircleEnd extends AbstractFtile {
|
|||||||
|
|
||||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||||
circle.setDeltaShadow(shadowing);
|
circle.setDeltaShadow(shadowing);
|
||||||
ug = ug.apply(new UChangeColor(backColor));
|
ug = ug.apply(backColor);
|
||||||
final double thickness = 2.5;
|
final double thickness = 2.5;
|
||||||
ug.apply(new UChangeBackColor(HColorUtils.WHITE)).apply(new UStroke(1.5))
|
ug.apply(HColorUtils.WHITE.bg()).apply(new UStroke(1.5))
|
||||||
.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle);
|
.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle);
|
||||||
|
|
||||||
final double size2 = (SIZE - thickness) / Math.sqrt(2);
|
final double size2 = (SIZE - thickness) / Math.sqrt(2);
|
||||||
|
@ -50,8 +50,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
|
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
@ -105,10 +103,10 @@ public class FtileCircleSpot extends AbstractFtile {
|
|||||||
if (skinParam().shadowing(null)) {
|
if (skinParam().shadowing(null)) {
|
||||||
circle.setDeltaShadow(3);
|
circle.setDeltaShadow(3);
|
||||||
}
|
}
|
||||||
ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness())
|
ug.apply(borderColor).apply(backColor.bg()).apply(getThickness())
|
||||||
.draw(circle);
|
.draw(circle);
|
||||||
|
|
||||||
ug.apply(new UChangeColor(fc.getColor())).apply(new UTranslate(SIZE / 2, SIZE / 2))
|
ug.apply(fc.getColor()).apply(new UTranslate(SIZE / 2, SIZE / 2))
|
||||||
.draw(new UCenteredCharacter(spot.charAt(0), fc.getFont()));
|
.draw(new UCenteredCharacter(spot.charAt(0), fc.getFont()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,11 +48,10 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
|
|
||||||
public class FtileCircleStart extends AbstractFtile {
|
public class FtileCircleStart extends AbstractFtile {
|
||||||
|
|
||||||
@ -99,7 +98,7 @@ public class FtileCircleStart extends AbstractFtile {
|
|||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||||
circle.setDeltaShadow(shadowing);
|
circle.setDeltaShadow(shadowing);
|
||||||
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)).draw(circle);
|
ug.apply(new HColorNone()).apply(backColor.bg()).draw(circle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,8 +48,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -101,15 +99,15 @@ public class FtileCircleStop extends AbstractFtile {
|
|||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||||
circle.setDeltaShadow(shadowing);
|
circle.setDeltaShadow(shadowing);
|
||||||
ug.apply(new UChangeColor(backColor)).apply(new UChangeBackColor(HColorUtils.WHITE)).draw(circle);
|
ug.apply(backColor).apply(HColorUtils.WHITE.bg()).draw(circle);
|
||||||
|
|
||||||
final double delta = 5;
|
final double delta = 5;
|
||||||
final UEllipse circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2);
|
final UEllipse circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2);
|
||||||
// if (skinParam().shadowing(null)) {
|
// if (skinParam().shadowing(null)) {
|
||||||
// circleSmall.setDeltaShadow(3);
|
// circleSmall.setDeltaShadow(3);
|
||||||
// }
|
// }
|
||||||
ug.apply(new UChangeColor(new HColorMiddle(backColor, HColorUtils.WHITE)))
|
ug.apply(new HColorMiddle(backColor, HColorUtils.WHITE))
|
||||||
.apply(new UChangeBackColor(backColor)).apply(new UTranslate(delta, delta)).draw(circleSmall);
|
.apply(backColor.bg()).apply(new UTranslate(delta, delta)).draw(circleSmall);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,8 +55,6 @@ 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;
|
||||||
import net.sourceforge.plantuml.style.StyleSignature;
|
import net.sourceforge.plantuml.style.StyleSignature;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -146,7 +144,7 @@ public class FtileDiamond extends AbstractFtile {
|
|||||||
|
|
||||||
final double suppY1 = north.calculateDimension(ug.getStringBounder()).getHeight();
|
final double suppY1 = north.calculateDimension(ug.getStringBounder()).getHeight();
|
||||||
ug = ug.apply(UTranslate.dy(suppY1));
|
ug = ug.apply(UTranslate.dy(suppY1));
|
||||||
ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor))
|
ug.apply(borderColor).apply(getThickness()).apply(backColor.bg())
|
||||||
.draw(Diamond.asPolygon(shadowing));
|
.draw(Diamond.asPolygon(shadowing));
|
||||||
// final Dimension2D dimNorth = north.calculateDimension(ug.getStringBounder());
|
// final Dimension2D dimNorth = north.calculateDimension(ug.getStringBounder());
|
||||||
north.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, -suppY1)));
|
north.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, -suppY1)));
|
||||||
|
@ -48,8 +48,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -113,7 +111,7 @@ public class FtileDiamondFoo1 extends AbstractFtile {
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||||
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
||||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
ug = ug.apply(borderColor).apply(getThickness()).apply(backColor.bg());
|
||||||
ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||||
|
|
||||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||||
|
@ -56,8 +56,6 @@ import net.sourceforge.plantuml.style.SName;
|
|||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.style.StyleSignature;
|
import net.sourceforge.plantuml.style.StyleSignature;
|
||||||
import net.sourceforge.plantuml.style.Styleable;
|
import net.sourceforge.plantuml.style.Styleable;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -149,7 +147,7 @@ public class FtileDiamondInside extends AbstractFtile implements Styleable {
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
ug = ug.apply(borderColor).apply(getThickness()).apply(backColor.bg());
|
||||||
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
||||||
|
|
||||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||||
|
@ -53,8 +53,6 @@ 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;
|
||||||
import net.sourceforge.plantuml.style.StyleSignature;
|
import net.sourceforge.plantuml.style.StyleSignature;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -135,7 +133,7 @@ public class FtileDiamondInside2 extends AbstractFtile {
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
ug = ug.apply(borderColor).apply(getThickness()).apply(backColor.bg());
|
||||||
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
||||||
|
|
||||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||||
|
@ -49,8 +49,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -121,7 +119,7 @@ public class FtileDiamondInside3 extends AbstractFtile implements FtileOverpassi
|
|||||||
final StringBounder stringBounder = ug.getStringBounder();
|
final StringBounder stringBounder = ug.getStringBounder();
|
||||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
ug = ug.apply(borderColor).apply(getThickness()).apply(backColor.bg());
|
||||||
final double shadowing = skinParam().shadowing(null) ? 3 : 0;
|
final double shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||||
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
ug.draw(Diamond.asPolygon(shadowing, dimTotal.getWidth(), dimTotal.getHeight()));
|
||||||
|
|
||||||
|
@ -43,13 +43,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
|||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UShape;
|
import net.sourceforge.plantuml.ugraphic.UShape;
|
||||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
|
|
||||||
public class FtileThinSplit extends AbstractFtile {
|
public class FtileThinSplit extends AbstractFtile {
|
||||||
|
|
||||||
@ -80,7 +80,12 @@ public class FtileThinSplit extends AbstractFtile {
|
|||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UShape rect = ULine.hline(last - first);
|
final UShape rect = ULine.hline(last - first);
|
||||||
ug = ug.apply(UTranslate.dx(first));
|
ug = ug.apply(UTranslate.dx(first));
|
||||||
ug.apply(new UChangeColor(colorBar)).apply(new UStroke(1.5)).draw(rect);
|
if (colorBar == null) {
|
||||||
|
ug = ug.apply(new HColorNone());
|
||||||
|
} else {
|
||||||
|
ug = ug.apply(colorBar);
|
||||||
|
}
|
||||||
|
ug.apply(new UStroke(1.5)).draw(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Swimlane> getSwimlanes() {
|
public Set<Swimlane> getSwimlanes() {
|
||||||
|
@ -46,6 +46,12 @@ import java.util.concurrent.Executors;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
import org.apache.tools.ant.BuildException;
|
||||||
|
import org.apache.tools.ant.DirectoryScanner;
|
||||||
|
import org.apache.tools.ant.Task;
|
||||||
|
import org.apache.tools.ant.types.FileList;
|
||||||
|
import org.apache.tools.ant.types.FileSet;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FileFormat;
|
import net.sourceforge.plantuml.FileFormat;
|
||||||
import net.sourceforge.plantuml.FileFormatOption;
|
import net.sourceforge.plantuml.FileFormatOption;
|
||||||
import net.sourceforge.plantuml.GeneratedImage;
|
import net.sourceforge.plantuml.GeneratedImage;
|
||||||
@ -57,12 +63,6 @@ import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
|
|||||||
import net.sourceforge.plantuml.preproc.Defines;
|
import net.sourceforge.plantuml.preproc.Defines;
|
||||||
import net.sourceforge.plantuml.stats.StatsUtils;
|
import net.sourceforge.plantuml.stats.StatsUtils;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.apache.tools.ant.DirectoryScanner;
|
|
||||||
import org.apache.tools.ant.Task;
|
|
||||||
import org.apache.tools.ant.types.FileList;
|
|
||||||
import org.apache.tools.ant.types.FileSet;
|
|
||||||
|
|
||||||
// <?xml version="1.0"?>
|
// <?xml version="1.0"?>
|
||||||
//
|
//
|
||||||
// <project name="OwnTaskExample" default="main" basedir=".">
|
// <project name="OwnTaskExample" default="main" basedir=".">
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.asciiart;
|
|||||||
|
|
||||||
import java.awt.geom.Dimension2D;
|
import java.awt.geom.Dimension2D;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
import java.awt.geom.Point2D.Double;
|
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FileFormat;
|
import net.sourceforge.plantuml.FileFormat;
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
|
@ -51,7 +51,6 @@ import net.sourceforge.plantuml.graphic.InnerStrategy;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -97,7 +96,7 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
raw.drawU(ug);
|
raw.drawU(ug);
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.RED));
|
ug = ug.apply(HColorUtils.RED);
|
||||||
for (Where w : Where.values()) {
|
for (Where w : Where.values()) {
|
||||||
if (have(w)) {
|
if (have(w)) {
|
||||||
drawLine(ug, w, raw.calculateDimension(ug.getStringBounder()));
|
drawLine(ug, w, raw.calculateDimension(ug.getStringBounder()));
|
||||||
|
@ -44,7 +44,6 @@ import net.sourceforge.plantuml.graphic.InnerStrategy;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -89,7 +88,7 @@ public class ConnectorPuzzleEmpty extends AbstractConnectorPuzzle implements Pla
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
// System.err.println("DRAWING " + toString());
|
// System.err.println("DRAWING " + toString());
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLUE));
|
ug = ug.apply(HColorUtils.BLUE);
|
||||||
for (Where w : Where.values()) {
|
for (Where w : Where.values()) {
|
||||||
if (have(w)) {
|
if (have(w)) {
|
||||||
drawLine(ug, w);
|
drawLine(ug, w);
|
||||||
|
@ -41,7 +41,6 @@ import java.awt.geom.Point2D;
|
|||||||
import net.sourceforge.plantuml.ISkinParam;
|
import net.sourceforge.plantuml.ISkinParam;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
@ -155,7 +154,7 @@ public class GridArray implements UDrawable {
|
|||||||
for (int c = 0; c < cols; c++) {
|
for (int c = 0; c < cols; c++) {
|
||||||
widthMax += getWidthOfCol(ug.getStringBounder(), c) + margin;
|
widthMax += getWidthOfCol(ug.getStringBounder(), c) + margin;
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLACK));
|
ug = ug.apply(HColorUtils.BLACK);
|
||||||
double y = 0;
|
double y = 0;
|
||||||
for (int l = 0; l < lines; l++) {
|
for (int l = 0; l < lines; l++) {
|
||||||
ug.apply(UTranslate.dy(y)).draw(ULine.hline(widthMax));
|
ug.apply(UTranslate.dy(y)).draw(ULine.hline(widthMax));
|
||||||
@ -170,7 +169,7 @@ public class GridArray implements UDrawable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void drawArrow(UGraphic ug, Point2D pt1, Point2D pt2) {
|
private void drawArrow(UGraphic ug, Point2D pt1, Point2D pt2) {
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLUE));
|
ug = ug.apply(HColorUtils.BLUE);
|
||||||
final ULine line = new ULine(pt2.getX() - pt1.getX(), pt2.getY() - pt1.getY());
|
final ULine line = new ULine(pt2.getX() - pt1.getX(), pt2.getY() - pt1.getY());
|
||||||
ug.apply(new UTranslate(pt1)).draw(line);
|
ug.apply(new UTranslate(pt1)).draw(line);
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.braille;
|
package net.sourceforge.plantuml.braille;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -56,7 +54,7 @@ public class BrailleDrawer implements UDrawable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
ug = ug.apply(new UChangeColor(HColorSet.instance().getColorIfValid("#F0F0F0")));
|
ug = ug.apply(HColorSet.instance().getColorIfValid("#F0F0F0"));
|
||||||
for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) {
|
for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) {
|
||||||
ug.apply(UTranslate.dx(x * step + spotSize + 1)).draw(
|
ug.apply(UTranslate.dx(x * step + spotSize + 1)).draw(
|
||||||
ULine.vline((grid.getMaxY() - grid.getMinY()) * step));
|
ULine.vline((grid.getMaxY() - grid.getMinY()) * step));
|
||||||
@ -65,7 +63,7 @@ public class BrailleDrawer implements UDrawable {
|
|||||||
ug.apply(UTranslate.dy(y * step + spotSize + 1)).draw(
|
ug.apply(UTranslate.dy(y * step + spotSize + 1)).draw(
|
||||||
ULine.hline((grid.getMaxX() - grid.getMinX()) * step));
|
ULine.hline((grid.getMaxX() - grid.getMinX()) * step));
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLACK)).apply(new UChangeBackColor(HColorUtils.BLACK));
|
ug = ug.apply(HColorUtils.BLACK).apply(HColorUtils.BLACK.bg());
|
||||||
for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) {
|
for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) {
|
||||||
for (int y = grid.getMinY(); y <= grid.getMaxY(); y++) {
|
for (int y = grid.getMinY(); y <= grid.getMaxY(); y++) {
|
||||||
if (grid.getState(x, y)) {
|
if (grid.getState(x, y)) {
|
||||||
|
@ -37,11 +37,9 @@ package net.sourceforge.plantuml.classdiagram;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FileFormatOption;
|
import net.sourceforge.plantuml.FileFormatOption;
|
||||||
import net.sourceforge.plantuml.ISkinSimple;
|
import net.sourceforge.plantuml.ISkinSimple;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.UmlDiagramType;
|
import net.sourceforge.plantuml.UmlDiagramType;
|
||||||
import net.sourceforge.plantuml.core.ImageData;
|
import net.sourceforge.plantuml.core.ImageData;
|
||||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||||
@ -54,7 +52,6 @@ import net.sourceforge.plantuml.cucadiagram.ILeaf;
|
|||||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||||
import net.sourceforge.plantuml.cucadiagram.SuperGroup;
|
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.graphic.USymbol;
|
import net.sourceforge.plantuml.graphic.USymbol;
|
||||||
import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram;
|
import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.classdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringLocated;
|
import net.sourceforge.plantuml.StringLocated;
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.classdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.UmlDiagram;
|
import net.sourceforge.plantuml.UmlDiagram;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.classdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.Direction;
|
import net.sourceforge.plantuml.Direction;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.UmlDiagramType;
|
import net.sourceforge.plantuml.UmlDiagramType;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.UmlDiagramType;
|
import net.sourceforge.plantuml.UmlDiagramType;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.classdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.classdiagram.command;
|
package net.sourceforge.plantuml.classdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command;
|
package net.sourceforge.plantuml.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command;
|
package net.sourceforge.plantuml.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command;
|
package net.sourceforge.plantuml.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command;
|
package net.sourceforge.plantuml.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
@ -130,10 +129,13 @@ public class CommandPackage extends SingleLineCommand2<AbstractEntityDiagram> {
|
|||||||
NamespaceStrategy.SINGLE);
|
NamespaceStrategy.SINGLE);
|
||||||
final IEntity p = diagram.getCurrentGroup();
|
final IEntity p = diagram.getCurrentGroup();
|
||||||
final String stereotype = arg.get("STEREOTYPE", 0);
|
final String stereotype = arg.get("STEREOTYPE", 0);
|
||||||
final USymbol type = USymbol.getFromString(arg.get("TYPE", 0), diagram.getSkinParam().getActorStyle());
|
// final USymbol type = USymbol.getFromString(arg.get("TYPE", 0),
|
||||||
if (type == USymbol.TOGETHER) {
|
// diagram.getSkinParam().getActorStyle());
|
||||||
p.setUSymbol(type);
|
// if (type == USymbol.TOGETHER) {
|
||||||
} else if (stereotype != null) {
|
// p.setUSymbol(type);
|
||||||
|
// p.setThisIsTogether();
|
||||||
|
// } else
|
||||||
|
if (stereotype != null) {
|
||||||
final USymbol usymbol = USymbol.getFromString(stereotype, diagram.getSkinParam().getActorStyle());
|
final USymbol usymbol = USymbol.getFromString(stereotype, diagram.getSkinParam().getActorStyle());
|
||||||
if (usymbol == null) {
|
if (usymbol == null) {
|
||||||
p.setStereotype(new Stereotype(stereotype));
|
p.setStereotype(new Stereotype(stereotype));
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command;
|
package net.sourceforge.plantuml.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||||
|
@ -105,7 +105,7 @@ public class CommandSpriteFile extends SingleLineCommand2<UmlDiagram> {
|
|||||||
if (isSvg(f.getName())) {
|
if (isSvg(f.getName())) {
|
||||||
sprite = new SpriteSvg(f);
|
sprite = new SpriteSvg(f);
|
||||||
} else {
|
} else {
|
||||||
sprite = new SpriteImage(FileUtils.ImageIO_read(f));
|
sprite = new SpriteImage(FileUtils.readRasterImageFromFile(f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -38,30 +38,17 @@ package net.sourceforge.plantuml.command.note;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
|
||||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
|
||||||
import net.sourceforge.plantuml.command.BlocLines;
|
import net.sourceforge.plantuml.command.BlocLines;
|
||||||
import net.sourceforge.plantuml.command.Command;
|
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
import net.sourceforge.plantuml.command.CommandMultilines2;
|
|
||||||
import net.sourceforge.plantuml.command.CommandPackage;
|
|
||||||
import net.sourceforge.plantuml.command.MultilinesStrategy;
|
|
||||||
import net.sourceforge.plantuml.command.Position;
|
|
||||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
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.RegexOptional;
|
|
||||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||||
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
|
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Stereotag;
|
|
||||||
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;
|
|
||||||
|
|
||||||
public final class CommandConstraintOnLinks extends SingleLineCommand2<CucaDiagram> {
|
public final class CommandConstraintOnLinks extends SingleLineCommand2<CucaDiagram> {
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command.note;
|
package net.sourceforge.plantuml.command.note;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||||
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines;
|
||||||
import net.sourceforge.plantuml.command.BlocLines;
|
import net.sourceforge.plantuml.command.BlocLines;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command.note;
|
package net.sourceforge.plantuml.command.note;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.command.note;
|
package net.sourceforge.plantuml.command.note;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.plantuml.command.note;
|
package net.sourceforge.plantuml.command.note;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -43,7 +43,6 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
|||||||
import net.sourceforge.plantuml.command.regex.RegexOptional;
|
import net.sourceforge.plantuml.command.regex.RegexOptional;
|
||||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||||
import net.sourceforge.plantuml.compositediagram.CompositeDiagram;
|
import net.sourceforge.plantuml.compositediagram.CompositeDiagram;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
|
||||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||||
import net.sourceforge.plantuml.cucadiagram.IEntity;
|
import net.sourceforge.plantuml.cucadiagram.IEntity;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||||
|
@ -90,7 +90,7 @@ public class CreoleHorizontalLine extends AbstractAtom implements Atom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
// ug = ug.apply(new UChangeColor(fontConfiguration.getColor()));
|
// ug = ug.apply(UChangeColor.nnn(fontConfiguration.getColor()));
|
||||||
final Dimension2D dim = calculateDimension(ug.getStringBounder());
|
final Dimension2D dim = calculateDimension(ug.getStringBounder());
|
||||||
ug = ug.apply(UTranslate.dy(dim.getHeight() / 2));
|
ug = ug.apply(UTranslate.dy(dim.getHeight() / 2));
|
||||||
ug.draw(getHorizontalLine());
|
ug.draw(getHorizontalLine());
|
||||||
|
@ -38,11 +38,10 @@ package net.sourceforge.plantuml.creole;
|
|||||||
import java.awt.geom.Dimension2D;
|
import java.awt.geom.Dimension2D;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||||
|
|
||||||
public class Position {
|
public class Position {
|
||||||
@ -98,8 +97,7 @@ public class Position {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawDebug(UGraphic ug) {
|
public void drawDebug(UGraphic ug) {
|
||||||
// ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(HtmlColorUtils.LIGHT_GRAY));
|
ug = ug.apply(HColorUtils.BLACK).apply(new HColorNone().bg());
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLACK)).apply(new UChangeBackColor(null));
|
|
||||||
ug = ug.apply(new UTranslate(x, y));
|
ug = ug.apply(new UTranslate(x, y));
|
||||||
ug.draw(new URectangle(dim));
|
ug.draw(new URectangle(dim));
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,20 @@ public class SheetBlock2 extends AbstractTextBlock implements TextBlock, Atom {
|
|||||||
private final UStroke defaultStroke;
|
private final UStroke defaultStroke;
|
||||||
private final Stencil stencil;
|
private final Stencil stencil;
|
||||||
|
|
||||||
|
public SheetBlock2 enlargeMe(final double delta) {
|
||||||
|
final Stencil newStencil = new Stencil() {
|
||||||
|
|
||||||
|
public double getStartingX(StringBounder stringBounder, double y) {
|
||||||
|
return stencil.getStartingX(stringBounder, y) - delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getEndingX(StringBounder stringBounder, double y) {
|
||||||
|
return stencil.getEndingX(stringBounder, y) + delta;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return new SheetBlock2(block, newStencil, defaultStroke);
|
||||||
|
}
|
||||||
|
|
||||||
public SheetBlock2(SheetBlock1 block, Stencil stencil, UStroke defaultStroke) {
|
public SheetBlock2(SheetBlock1 block, Stencil stencil, UStroke defaultStroke) {
|
||||||
this.block = block;
|
this.block = block;
|
||||||
this.stencil = stencil;
|
this.stencil = stencil;
|
||||||
|
@ -95,7 +95,7 @@ public class AtomImg extends AbstractAtom implements Atom {
|
|||||||
final String data = src.substring(DATA_IMAGE_PNG_BASE64.length(), src.length());
|
final String data = src.substring(DATA_IMAGE_PNG_BASE64.length(), src.length());
|
||||||
try {
|
try {
|
||||||
final byte bytes[] = Base64Coder.decode(data);
|
final byte bytes[] = Base64Coder.decode(data);
|
||||||
return build(src, fc, bytes, scale, url);
|
return buildRasterFromData(src, fc, bytes, scale, url);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AtomText.create("ERROR " + e.toString(), fc);
|
return AtomText.create("ERROR " + e.toString(), fc);
|
||||||
}
|
}
|
||||||
@ -104,8 +104,10 @@ public class AtomImg extends AbstractAtom implements Atom {
|
|||||||
try {
|
try {
|
||||||
// Check if valid URL
|
// Check if valid URL
|
||||||
if (src.startsWith("http:") || src.startsWith("https:")) {
|
if (src.startsWith("http:") || src.startsWith("https:")) {
|
||||||
// final byte image[] = getFile(src);
|
if (src.endsWith(".svg")) {
|
||||||
return build(src, fc, new URL(src), scale, url);
|
return buildSvgFromUrl(src, fc, new URL(src), scale, url);
|
||||||
|
}
|
||||||
|
return buildRasterFromUrl(src, fc, new URL(src), scale, url);
|
||||||
}
|
}
|
||||||
final File f = FileSystem.getInstance().getFile(src);
|
final File f = FileSystem.getInstance().getFile(src);
|
||||||
if (f.exists() == false) {
|
if (f.exists() == false) {
|
||||||
@ -114,18 +116,18 @@ public class AtomImg extends AbstractAtom implements Atom {
|
|||||||
if (f.getName().endsWith(".svg")) {
|
if (f.getName().endsWith(".svg")) {
|
||||||
return new AtomImgSvg(new TileImageSvg(f));
|
return new AtomImgSvg(new TileImageSvg(f));
|
||||||
}
|
}
|
||||||
final BufferedImage read = FileUtils.ImageIO_read(f);
|
final BufferedImage read = FileUtils.readRasterImageFromFile(f);
|
||||||
if (read == null) {
|
if (read == null) {
|
||||||
return AtomText.create("(Cannot decode: " + f.getCanonicalPath() + ")", fc);
|
return AtomText.create("(Cannot decode: " + f.getCanonicalPath() + ")", fc);
|
||||||
}
|
}
|
||||||
return new AtomImg(FileUtils.ImageIO_read(f), scale, url, src);
|
return new AtomImg(FileUtils.readRasterImageFromFile(f), scale, url, src);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
return AtomText.create("ERROR " + e.toString(), fc);
|
return AtomText.create("ERROR " + e.toString(), fc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Atom build(String source, final FontConfiguration fc, final byte[] data, double scale, Url url)
|
private static Atom buildRasterFromData(String source, final FontConfiguration fc, final byte[] data, double scale,
|
||||||
throws IOException {
|
Url url) throws IOException {
|
||||||
final BufferedImage read = ImageIO.read(new ByteArrayInputStream(data));
|
final BufferedImage read = ImageIO.read(new ByteArrayInputStream(data));
|
||||||
if (read == null) {
|
if (read == null) {
|
||||||
return AtomText.create("(Cannot decode: " + source + ")", fc);
|
return AtomText.create("(Cannot decode: " + source + ")", fc);
|
||||||
@ -133,21 +135,30 @@ public class AtomImg extends AbstractAtom implements Atom {
|
|||||||
return new AtomImg(read, scale, url, null);
|
return new AtomImg(read, scale, url, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Atom build(String text, final FontConfiguration fc, URL source, double scale, Url url)
|
private static Atom buildRasterFromUrl(String text, final FontConfiguration fc, URL source, double scale, Url url)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
final BufferedImage read = FileUtils.ImageIO_read(source);
|
final BufferedImage read = FileUtils.readRasterImageFromURL(source);
|
||||||
if (read == null) {
|
if (read == null) {
|
||||||
return AtomText.create("(Cannot decode: " + text + ")", fc);
|
return AtomText.create("(Cannot decode: " + text + ")", fc);
|
||||||
}
|
}
|
||||||
return new AtomImg(read, scale, url, source.getPath());
|
return new AtomImg(read, scale, url, source.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Atom buildSvgFromUrl(String text, final FontConfiguration fc, URL source, double scale, Url url)
|
||||||
|
throws IOException {
|
||||||
|
final byte[] read = getFile(source);
|
||||||
|
if (read == null) {
|
||||||
|
return AtomText.create("(Cannot decode SVG: " + text + ")", fc);
|
||||||
|
}
|
||||||
|
return new AtomImgSvg(new TileImageSvg(new String(read, "UTF-8")));
|
||||||
|
}
|
||||||
|
|
||||||
// Added by Alain Corbiere
|
// Added by Alain Corbiere
|
||||||
private static byte[] getFile(String host) throws IOException {
|
private static byte[] getFile(URL url) {
|
||||||
final ByteArrayOutputStream image = new ByteArrayOutputStream();
|
final ByteArrayOutputStream image = new ByteArrayOutputStream();
|
||||||
|
try {
|
||||||
InputStream input = null;
|
InputStream input = null;
|
||||||
try {
|
try {
|
||||||
final URL url = new URL(host);
|
|
||||||
final URLConnection connection = url.openConnection();
|
final URLConnection connection = url.openConnection();
|
||||||
input = connection.getInputStream();
|
input = connection.getInputStream();
|
||||||
final byte[] buffer = new byte[1024];
|
final byte[] buffer = new byte[1024];
|
||||||
@ -162,6 +173,10 @@ public class AtomImg extends AbstractAtom implements Atom {
|
|||||||
input.close();
|
input.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End
|
// End
|
||||||
|
@ -46,13 +46,12 @@ import net.sourceforge.plantuml.creole.Position;
|
|||||||
import net.sourceforge.plantuml.creole.SheetBlock1;
|
import net.sourceforge.plantuml.creole.SheetBlock1;
|
||||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
|
|
||||||
public class AtomTable extends AbstractAtom implements Atom {
|
public class AtomTable extends AbstractAtom implements Atom {
|
||||||
|
|
||||||
@ -108,7 +107,7 @@ public class AtomTable extends AbstractAtom implements Atom {
|
|||||||
final double y2 = getStartingY(i + 1);
|
final double y2 = getStartingY(i + 1);
|
||||||
final double x1 = getStartingX(0);
|
final double x1 = getStartingX(0);
|
||||||
final double x2 = getStartingX(getNbCols());
|
final double x2 = getStartingX(getNbCols());
|
||||||
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(line.lineBackColor))
|
ug.apply(new HColorNone()).apply(line.lineBackColor.bg())
|
||||||
.apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1));
|
.apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1));
|
||||||
}
|
}
|
||||||
for (int j = 0; j < getNbCols(); j++) {
|
for (int j = 0; j < getNbCols(); j++) {
|
||||||
@ -127,7 +126,7 @@ public class AtomTable extends AbstractAtom implements Atom {
|
|||||||
if (cellBackColor != null) {
|
if (cellBackColor != null) {
|
||||||
final double y1 = getStartingY(i);
|
final double y1 = getStartingY(i);
|
||||||
final double y2 = getStartingY(i + 1);
|
final double y2 = getStartingY(i + 1);
|
||||||
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(cellBackColor))
|
ug.apply(new HColorNone()).apply(cellBackColor.bg())
|
||||||
.apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1));
|
.apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1));
|
||||||
}
|
}
|
||||||
final Position pos = positions.get(cell);
|
final Position pos = positions.get(cell);
|
||||||
@ -141,7 +140,7 @@ public class AtomTable extends AbstractAtom implements Atom {
|
|||||||
cell.drawU(ug.apply(pos.getTranslate().compose(UTranslate.dx(dx))));
|
cell.drawU(ug.apply(pos.getTranslate().compose(UTranslate.dx(dx))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(lineColor));
|
ug = ug.apply(lineColor);
|
||||||
final ULine hline = ULine.hline(getEndingX(getNbCols() - 1));
|
final ULine hline = ULine.hline(getEndingX(getNbCols() - 1));
|
||||||
for (int i = 0; i <= getNbLines(); i++) {
|
for (int i = 0; i <= getNbLines(); i++) {
|
||||||
ug.apply(UTranslate.dy(getStartingY(i))).draw(hline);
|
ug.apply(UTranslate.dy(getStartingY(i))).draw(hline);
|
||||||
|
@ -44,7 +44,6 @@ import java.util.Map;
|
|||||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.salt.element.Skeleton2;
|
import net.sourceforge.plantuml.salt.element.Skeleton2;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -89,7 +88,7 @@ public class AtomTree extends AbstractAtom implements Atom {
|
|||||||
ug = ug.apply(UTranslate.dy(dim.getHeight()));
|
ug = ug.apply(UTranslate.dy(dim.getHeight()));
|
||||||
y += dim.getHeight();
|
y += dim.getHeight();
|
||||||
}
|
}
|
||||||
skeleton.draw(ugInit.apply(new UChangeColor(this.lineColor)));
|
skeleton.draw(ugInit.apply(this.lineColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getLevel(Atom atom) {
|
private int getLevel(Atom atom) {
|
||||||
|
@ -40,8 +40,6 @@ import java.awt.geom.Dimension2D;
|
|||||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
@ -81,7 +79,7 @@ public class Bullet extends AbstractAtom implements Atom {
|
|||||||
|
|
||||||
private void drawU0(UGraphic ug) {
|
private void drawU0(UGraphic ug) {
|
||||||
final HColor color = fontConfiguration.getColor();
|
final HColor color = fontConfiguration.getColor();
|
||||||
ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)).apply(new UStroke(0));
|
ug = ug.apply(color).apply(color.bg()).apply(new UStroke(0));
|
||||||
// final double width = getWidth(ug.getStringBounder());
|
// final double width = getWidth(ug.getStringBounder());
|
||||||
ug = ug.apply(UTranslate.dx(3));
|
ug = ug.apply(UTranslate.dx(3));
|
||||||
ug.draw(new UEllipse(5, 5));
|
ug.draw(new UEllipse(5, 5));
|
||||||
@ -97,7 +95,7 @@ public class Bullet extends AbstractAtom implements Atom {
|
|||||||
|
|
||||||
private void drawU1(UGraphic ug) {
|
private void drawU1(UGraphic ug) {
|
||||||
final HColor color = fontConfiguration.getColor();
|
final HColor color = fontConfiguration.getColor();
|
||||||
ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)).apply(new UStroke(0));
|
ug = ug.apply(color).apply(color.bg()).apply(new UStroke(0));
|
||||||
final double width = getWidth(ug.getStringBounder());
|
final double width = getWidth(ug.getStringBounder());
|
||||||
ug = ug.apply(UTranslate.dx(width - 5));
|
ug = ug.apply(UTranslate.dx(width - 5));
|
||||||
ug.draw(new URectangle(3.5, 3.5));
|
ug.draw(new URectangle(3.5, 3.5));
|
||||||
|
@ -35,44 +35,41 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.plantuml.cucadiagram;
|
package net.sourceforge.plantuml.cucadiagram;
|
||||||
|
|
||||||
|
import net.sourceforge.plantuml.svek.Ports;
|
||||||
|
|
||||||
public class EntityPort {
|
public class EntityPort {
|
||||||
|
|
||||||
private final String uid;
|
private final String entityUid;
|
||||||
private final String portName;
|
private final String portId;
|
||||||
|
|
||||||
public EntityPort(String uid, String portName) {
|
public EntityPort(String entityUid, String portName) {
|
||||||
this.uid = uid;
|
this.entityUid = entityUid;
|
||||||
this.portName = portName;
|
this.portId = portName == null ? null : Ports.encodePortNameToId(portName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullString() {
|
public String getFullString() {
|
||||||
if (portName != null) {
|
if (portId != null) {
|
||||||
return uid + ":" + portName;
|
return entityUid + ":" + portId;
|
||||||
}
|
}
|
||||||
return uid;
|
return entityUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isShielded() {
|
private boolean isShielded() {
|
||||||
return uid.endsWith(":h");
|
return entityUid.endsWith(":h");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix() {
|
public String getPrefix() {
|
||||||
if (isShielded()) {
|
if (isShielded()) {
|
||||||
return uid.substring(0, uid.length() - 2);
|
return entityUid.substring(0, entityUid.length() - 2);
|
||||||
}
|
}
|
||||||
return uid;
|
return entityUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean startsWith(String centerId) {
|
public boolean startsWith(String centerId) {
|
||||||
return uid.startsWith(centerId);
|
return entityUid.startsWith(centerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equalsId(EntityPort other) {
|
public boolean equalsId(EntityPort other) {
|
||||||
return this.uid.equals(other.uid);
|
return this.entityUid.equals(other.entityUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private String getPortName() {
|
|
||||||
// return portName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -286,4 +286,8 @@ public class GroupRoot implements IGroup {
|
|||||||
public boolean isAloneAndUnlinked() {
|
public boolean isAloneAndUnlinked() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setThisIsTogether() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,5 +97,7 @@ public interface IEntity extends SpecificBackcolorable, Hideable, Removeable, Li
|
|||||||
|
|
||||||
public boolean isAloneAndUnlinked();
|
public boolean isAloneAndUnlinked();
|
||||||
|
|
||||||
|
public void setThisIsTogether();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ import net.sourceforge.plantuml.ISkinParam;
|
|||||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||||
@ -86,7 +85,7 @@ public class LinkConstraint {
|
|||||||
if (x2 == 0 && y2 == 0) {
|
if (x2 == 0 && y2 == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(HColorUtils.BLACK));
|
ug = ug.apply(HColorUtils.BLACK);
|
||||||
// ug.apply(new UTranslate(x1, y1)).draw(new URectangle(10, 10));
|
// ug.apply(new UTranslate(x1, y1)).draw(new URectangle(10, 10));
|
||||||
// ug.apply(new UTranslate(x2, y2)).draw(new URectangle(10, 10));
|
// ug.apply(new UTranslate(x2, y2)).draw(new URectangle(10, 10));
|
||||||
|
|
||||||
|
@ -53,8 +53,6 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
|||||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||||
import net.sourceforge.plantuml.svek.Ports;
|
import net.sourceforge.plantuml.svek.Ports;
|
||||||
import net.sourceforge.plantuml.svek.WithPorts;
|
import net.sourceforge.plantuml.svek.WithPorts;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||||
@ -189,7 +187,7 @@ public class TextBlockMap extends AbstractTextBlock implements WithPorts {
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UShape point = new UEllipse(getDiameter(), getDiameter());
|
final UShape point = new UEllipse(getDiameter(), getDiameter());
|
||||||
ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color));
|
ug = ug.apply(color).apply(color.bg());
|
||||||
ug.draw(point);
|
ug.draw(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,19 +110,20 @@ public final class CucaDiagramTxtMaker {
|
|||||||
for (Link link : diagram.getLinks()) {
|
for (Link link : diagram.getLinks()) {
|
||||||
final Block b1 = blocks.get(link.getEntity1());
|
final Block b1 = blocks.get(link.getEntity1());
|
||||||
final Block b2 = blocks.get(link.getEntity2());
|
final Block b2 = blocks.get(link.getEntity2());
|
||||||
paths.add(new Path(b1, b2, null, link.getLength()));
|
paths.add(new Path(b1, b2, null, link.getLength(), link.isInvis()));
|
||||||
}
|
}
|
||||||
solver.solve(root, paths);
|
solver.solve(root, paths);
|
||||||
for (Path p : paths) {
|
for (Path p : paths) {
|
||||||
|
if (p.isInvis()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
p.getDotPath().draw(globalUg.getCharArea(), getXPixelPerChar(), getYPixelPerChar());
|
p.getDotPath().draw(globalUg.getCharArea(), getXPixelPerChar(), getYPixelPerChar());
|
||||||
}
|
}
|
||||||
for (IEntity ent : diagram.getLeafsvalues()) {
|
for (IEntity ent : diagram.getLeafsvalues()) {
|
||||||
final Block b = blocks.get(ent);
|
final Block b = blocks.get(ent);
|
||||||
final Point2D p = b.getPosition();
|
final Point2D p = b.getPosition();
|
||||||
printClass(
|
printClass(ent, (UGraphicTxt) globalUg
|
||||||
ent,
|
.apply(new UTranslate(p.getX() / getXPixelPerChar(), p.getY() / getYPixelPerChar())));
|
||||||
(UGraphicTxt) globalUg.apply(new UTranslate(p.getX() / getXPixelPerChar(), p.getY()
|
|
||||||
/ getYPixelPerChar())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,6 @@ package net.sourceforge.plantuml.cucadiagram.dot;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
@ -45,15 +45,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction;
|
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.Guillemet;
|
import net.sourceforge.plantuml.Guillemet;
|
||||||
import net.sourceforge.plantuml.ISkinParam;
|
import net.sourceforge.plantuml.ISkinParam;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
|
||||||
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||||
@ -798,4 +794,11 @@ final public class EntityImpl implements ILeaf, IGroup {
|
|||||||
return originalGroup;
|
return originalGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean together;
|
||||||
|
|
||||||
|
public void setThisIsTogether() {
|
||||||
|
this.together = true;
|
||||||
|
// System.err.println("setThisIsTogether");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,6 @@ public class Cheese implements CuteShape {
|
|||||||
final Point2D ptA = balloon.getPointOnCircle(angle1);
|
final Point2D ptA = balloon.getPointOnCircle(angle1);
|
||||||
final Point2D ptB = balloon.getPointOnCircle(angle2);
|
final Point2D ptB = balloon.getPointOnCircle(angle2);
|
||||||
|
|
||||||
// balloon.drawU(ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK)));
|
|
||||||
final UPath path = new UPath();
|
final UPath path = new UPath();
|
||||||
final Point2D ptA0;
|
final Point2D ptA0;
|
||||||
if (radius.hasCurvation()) {
|
if (radius.hasCurvation()) {
|
||||||
@ -116,12 +115,6 @@ public class Cheese implements CuteShape {
|
|||||||
path.closePath();
|
path.closePath();
|
||||||
ug.draw(path);
|
ug.draw(path);
|
||||||
|
|
||||||
// if (startAngle.hasCurvation()) {
|
|
||||||
// insideA.drawU(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null)));
|
|
||||||
// }
|
|
||||||
// if (endAngle.hasCurvation()) {
|
|
||||||
// insideB.drawU(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null)));
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CuteShape rotateZoom(RotationZoom other) {
|
public CuteShape rotateZoom(RotationZoom other) {
|
||||||
|
@ -40,10 +40,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UPath;
|
import net.sourceforge.plantuml.ugraphic.UPath;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||||
|
|
||||||
public class CutePath {
|
public class CutePath {
|
||||||
@ -141,7 +140,7 @@ public class CutePath {
|
|||||||
for (int i = 0; i < arcs.size(); i++) {
|
for (int i = 0; i < arcs.size(); i++) {
|
||||||
final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i)
|
final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i)
|
||||||
.getTension());
|
.getTension());
|
||||||
betweenCorners.debugMe(ug.apply(new UChangeColor(HColorUtils.BLACK)).apply(new UChangeBackColor(null)));
|
betweenCorners.debugMe(ug.apply(HColorUtils.BLACK).apply(new HColorNone().bg()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.cute;
|
package net.sourceforge.plantuml.cute;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
@ -84,7 +82,7 @@ public class PositionnedImpl implements Positionned {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private UGraphic applyColor(UGraphic ug) {
|
private UGraphic applyColor(UGraphic ug) {
|
||||||
return ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color));
|
return ug.apply(color.bg()).apply(color);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,9 +47,6 @@ public class Triangle implements CuteShape {
|
|||||||
|
|
||||||
private Triangle(CutePath cutePath) {
|
private Triangle(CutePath cutePath) {
|
||||||
this.cutePath = cutePath;
|
this.cutePath = cutePath;
|
||||||
// if (points.size() != 3) {
|
|
||||||
// throw new IllegalArgumentException();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Triangle rotateZoom(final RotationZoom angle) {
|
public Triangle rotateZoom(final RotationZoom angle) {
|
||||||
@ -61,9 +58,5 @@ public class Triangle implements CuteShape {
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
cutePath.drawU(ug);
|
cutePath.drawU(ug);
|
||||||
// ug = ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK));
|
|
||||||
// cutePath.withNoTension().drawU(
|
|
||||||
// ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK)));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,13 +42,12 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
|||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||||
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
|
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.ugraphic.color.HColorNone;
|
||||||
|
|
||||||
public class BoxedCharacter extends AbstractTextBlock implements TextBlock {
|
public class BoxedCharacter extends AbstractTextBlock implements TextBlock {
|
||||||
|
|
||||||
@ -70,12 +69,15 @@ public class BoxedCharacter extends AbstractTextBlock implements TextBlock {
|
|||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
if (circle != null) {
|
if (circle != null) {
|
||||||
ug = ug.apply(new UChangeColor(circle));
|
ug = ug.apply(circle);
|
||||||
|
}
|
||||||
|
if (innerCircle == null) {
|
||||||
|
ug = ug.apply(new HColorNone().bg());
|
||||||
|
} else {
|
||||||
|
ug = ug.apply(innerCircle.bg());
|
||||||
}
|
}
|
||||||
// final HtmlColor back = ug.getParam().getBackcolor();
|
|
||||||
ug = ug.apply(new UChangeBackColor(innerCircle));
|
|
||||||
ug.draw(new URectangle(2 * radius, 2 * radius));
|
ug.draw(new URectangle(2 * radius, 2 * radius));
|
||||||
ug = ug.apply(new UChangeColor(fontColor));
|
ug = ug.apply(fontColor);
|
||||||
ug = ug.apply(new UTranslate(radius, radius));
|
ug = ug.apply(new UTranslate(radius, radius));
|
||||||
ug.draw(new UCenteredCharacter(c.charAt(0), font));
|
ug.draw(new UCenteredCharacter(c.charAt(0), font));
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.descdiagram;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
import net.sourceforge.plantuml.UrlBuilder.ModeUrl;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.descdiagram;
|
package net.sourceforge.plantuml.descdiagram;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.ISkinSimple;
|
import net.sourceforge.plantuml.ISkinSimple;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.UmlDiagramType;
|
import net.sourceforge.plantuml.UmlDiagramType;
|
||||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||||
|
@ -57,8 +57,6 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
|
|||||||
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
||||||
import net.sourceforge.plantuml.svek.ShapeType;
|
import net.sourceforge.plantuml.svek.ShapeType;
|
||||||
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
@ -128,12 +126,12 @@ public class EntityImageDesignedDomain extends AbstractEntityImage {
|
|||||||
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
||||||
URectangle rect2 = new URectangle(4, heightTotal);
|
URectangle rect2 = new URectangle(4, heightTotal);
|
||||||
|
|
||||||
ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.designedBorder)));
|
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.designedBorder));
|
||||||
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
||||||
if (backcolor == null) {
|
if (backcolor == null) {
|
||||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.designedBackground);
|
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.designedBackground);
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeBackColor(backcolor));
|
ug = ug.apply(backcolor.bg());
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
ug.startUrl(url);
|
ug.startUrl(url);
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,6 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
|
|||||||
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
||||||
import net.sourceforge.plantuml.svek.ShapeType;
|
import net.sourceforge.plantuml.svek.ShapeType;
|
||||||
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
||||||
@ -130,12 +128,12 @@ public class EntityImageDomain extends AbstractEntityImage {
|
|||||||
final double heightTotal = dimTotal.getHeight();
|
final double heightTotal = dimTotal.getHeight();
|
||||||
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
||||||
|
|
||||||
ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.domainBorder)));
|
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.domainBorder));
|
||||||
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
||||||
if (backcolor == null) {
|
if (backcolor == null) {
|
||||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.domainBackground);
|
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.domainBackground);
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeBackColor(backcolor));
|
ug = ug.apply(backcolor.bg());
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
ug.startUrl(url);
|
ug.startUrl(url);
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,6 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
|
|||||||
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
||||||
import net.sourceforge.plantuml.svek.ShapeType;
|
import net.sourceforge.plantuml.svek.ShapeType;
|
||||||
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
|
||||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||||
@ -127,12 +125,12 @@ public class EntityImageMachine extends AbstractEntityImage {
|
|||||||
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
final URectangle rect = new URectangle(widthTotal, heightTotal);
|
||||||
URectangle rect2 = new URectangle(4, heightTotal);
|
URectangle rect2 = new URectangle(4, heightTotal);
|
||||||
|
|
||||||
ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.machineBorder)));
|
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.machineBorder));
|
||||||
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
||||||
if (backcolor == null) {
|
if (backcolor == null) {
|
||||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.machineBackground);
|
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.machineBackground);
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeBackColor(backcolor));
|
ug = ug.apply(backcolor.bg());
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
ug.startUrl(url);
|
ug.startUrl(url);
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,6 @@ import net.sourceforge.plantuml.svek.AbstractEntityImage;
|
|||||||
import net.sourceforge.plantuml.svek.ShapeType;
|
import net.sourceforge.plantuml.svek.ShapeType;
|
||||||
import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine;
|
import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine;
|
||||||
import net.sourceforge.plantuml.ugraphic.TextBlockInEllipse;
|
import net.sourceforge.plantuml.ugraphic.TextBlockInEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UChangeColor;
|
|
||||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||||
import net.sourceforge.plantuml.ugraphic.UHorizontalLine;
|
import net.sourceforge.plantuml.ugraphic.UHorizontalLine;
|
||||||
@ -123,12 +121,12 @@ public class EntityImageRequirement extends AbstractEntityImage {
|
|||||||
if (linecolor == null) {
|
if (linecolor == null) {
|
||||||
linecolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.requirementBorder);
|
linecolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.requirementBorder);
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeColor(linecolor));
|
ug = ug.apply(linecolor);
|
||||||
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
HColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
|
||||||
if (backcolor == null) {
|
if (backcolor == null) {
|
||||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.requirementBackground);
|
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.requirementBackground);
|
||||||
}
|
}
|
||||||
ug = ug.apply(new UChangeBackColor(backcolor));
|
ug = ug.apply(backcolor.bg());
|
||||||
final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());
|
final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());
|
||||||
|
|
||||||
ellipse.drawU(ug2);
|
ellipse.drawU(ug2);
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.descdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.descdiagram.command;
|
package net.sourceforge.plantuml.descdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.descdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.descdiagram.command;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.descdiagram.command;
|
|||||||
|
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
@ -59,7 +58,6 @@ import net.sourceforge.plantuml.cucadiagram.ILeaf;
|
|||||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||||
import net.sourceforge.plantuml.descdiagram.DescriptionDiagram;
|
|
||||||
import net.sourceforge.plantuml.graphic.USymbol;
|
import net.sourceforge.plantuml.graphic.USymbol;
|
||||||
import net.sourceforge.plantuml.graphic.color.ColorParser;
|
import net.sourceforge.plantuml.graphic.color.ColorParser;
|
||||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.descdiagram.command;
|
package net.sourceforge.plantuml.descdiagram.command;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.LineLocation;
|
import net.sourceforge.plantuml.LineLocation;
|
||||||
import net.sourceforge.plantuml.OptionFlags;
|
|
||||||
import net.sourceforge.plantuml.StringUtils;
|
import net.sourceforge.plantuml.StringUtils;
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.UrlBuilder;
|
import net.sourceforge.plantuml.UrlBuilder;
|
||||||
@ -73,9 +72,7 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2<AbstractEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static IRegex getRegexConcat() {
|
private static IRegex getRegexConcat() {
|
||||||
return RegexConcat
|
return RegexConcat.build(CommandPackageWithUSymbol.class.getName(), RegexLeaf.start(), //
|
||||||
.build(CommandPackageWithUSymbol.class.getName(),
|
|
||||||
RegexLeaf.start(), //
|
|
||||||
new RegexLeaf("SYMBOL",
|
new RegexLeaf("SYMBOL",
|
||||||
"(package|rectangle|node|artifact|folder|file|frame|cloud|database|storage|component|card|together|queue|stack)"), //
|
"(package|rectangle|node|artifact|folder|file|frame|cloud|database|storage|component|card|together|queue|stack)"), //
|
||||||
RegexLeaf.spaceOneOrMore(), //
|
RegexLeaf.spaceOneOrMore(), //
|
||||||
@ -159,7 +156,11 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2<AbstractEntity
|
|||||||
diagram.gotoGroup(ident, code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage,
|
diagram.gotoGroup(ident, code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage,
|
||||||
NamespaceStrategy.SINGLE);
|
NamespaceStrategy.SINGLE);
|
||||||
final IEntity p = diagram.getCurrentGroup();
|
final IEntity p = diagram.getCurrentGroup();
|
||||||
p.setUSymbol(USymbol.getFromString(arg.get("SYMBOL", 0), diagram.getSkinParam().getActorStyle()));
|
final String symbol = arg.get("SYMBOL", 0);
|
||||||
|
if ("together".equalsIgnoreCase(symbol)) {
|
||||||
|
p.setThisIsTogether();
|
||||||
|
}
|
||||||
|
p.setUSymbol(USymbol.getFromString(symbol, diagram.getSkinParam().getActorStyle()));
|
||||||
final String stereotype = arg.getLazzy("STEREOTYPE", 0);
|
final String stereotype = arg.getLazzy("STEREOTYPE", 0);
|
||||||
if (stereotype != null) {
|
if (stereotype != null) {
|
||||||
p.setStereotype(new Stereotype(stereotype, false));
|
p.setStereotype(new Stereotype(stereotype, false));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user