mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-25 14:27:33 +00:00
wip
This commit is contained in:
parent
73d13f9bf7
commit
ebf1b1b622
@ -97,6 +97,7 @@ import static smetana.core.Macro.GD_n_nodes;
|
||||
import static smetana.core.Macro.GD_nlist;
|
||||
import static smetana.core.Macro.GD_rank;
|
||||
import static smetana.core.Macro.GD_rankleader;
|
||||
import static smetana.core.Macro.N;
|
||||
import static smetana.core.Macro.ND_UF_size;
|
||||
import static smetana.core.Macro.ND_clust;
|
||||
import static smetana.core.Macro.ND_in;
|
||||
@ -363,8 +364,8 @@ try {
|
||||
flat_edge(g, e);
|
||||
prev = e;
|
||||
} else if (NEQ(e, fe)) {
|
||||
UNSUPPORTED("ckfinb4h4twp1ry02y9peyhz"); // safe_other_edge(e);
|
||||
UNSUPPORTED("dg3e0udctqa7xtfynplc7wdpj"); // if (!ED_to_virt(e)) merge_oneway(e, fe);
|
||||
safe_other_edge(e);
|
||||
if (N(ED_to_virt(e))) merge_oneway(e, fe);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ try {
|
||||
for (i = 0; i < L.size; i++)
|
||||
if (EQ(e, L.list.get_(i)))
|
||||
return;
|
||||
UNSUPPORTED("cslejjtgepjdwlcykfas4fmvz"); // elist_append(e, (*L));
|
||||
elist_append(e, L);
|
||||
} finally {
|
||||
LEAVING("cttswsffgmw1g710jzvdd3wzn","safe_list_append");
|
||||
}
|
||||
|
@ -106,12 +106,12 @@ public class AnnotatedWorker {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.frame)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
deltaShadow = style.value(PName.Shadowing).asDouble();
|
||||
fontConfiguration = new FontConfiguration(getSkinParam(), style);
|
||||
fontConfiguration = FontConfiguration.create(getSkinParam(), style);
|
||||
stroke = style.getStroke();
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
deltaShadow = getSkinParam().shadowing(null) ? 3 : 0;
|
||||
fontConfiguration = new FontConfiguration(getSkinParam(), FontParam.CAPTION, null);
|
||||
fontConfiguration = FontConfiguration.create(getSkinParam(), FontParam.CAPTION, null);
|
||||
stroke = new UStroke();
|
||||
borderColor = HColorUtils.BLACK;
|
||||
}
|
||||
@ -193,7 +193,7 @@ public class AnnotatedWorker {
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return style.createTextBlockBordered(caption.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
}
|
||||
return caption.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null),
|
||||
return caption.getDisplay().create(FontConfiguration.create(getSkinParam(), FontParam.CAPTION, null),
|
||||
HorizontalAlignment.CENTER, getSkinParam());
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ public class AnnotatedWorker {
|
||||
block = style.createTextBlockBordered(title.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
} else {
|
||||
final ISkinParam skinParam = getSkinParam();
|
||||
final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.TITLE, null);
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, FontParam.TITLE, null);
|
||||
block = TextBlockUtils.title(fontConfiguration, title.getDisplay(), skinParam);
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ public class AnnotatedWorker {
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.footer)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
textFooter = footer.createRibbon(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null),
|
||||
textFooter = footer.createRibbon(FontConfiguration.create(getSkinParam(), FontParam.FOOTER, null),
|
||||
getSkinParam(), style);
|
||||
}
|
||||
TextBlock textHeader = null;
|
||||
@ -239,7 +239,7 @@ public class AnnotatedWorker {
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.header)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
textHeader = header.createRibbon(new FontConfiguration(getSkinParam(), FontParam.HEADER, null),
|
||||
textHeader = header.createRibbon(FontConfiguration.create(getSkinParam(), FontParam.HEADER, null),
|
||||
getSkinParam(), style);
|
||||
}
|
||||
|
||||
|
@ -42,14 +42,14 @@ public class BaseFile {
|
||||
private final String basename;
|
||||
private final SFile basedir;
|
||||
|
||||
public BaseFile() {
|
||||
this.basedir = null;
|
||||
this.basename = null;
|
||||
}
|
||||
|
||||
public BaseFile(SFile file) {
|
||||
this.basedir = file.getParentFile();
|
||||
this.basename = extractBasename(file.getName());
|
||||
if (file == null) {
|
||||
this.basedir = null;
|
||||
this.basename = null;
|
||||
} else {
|
||||
this.basedir = file.getParentFile();
|
||||
this.basename = extractBasename(file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private static String extractBasename(String name) {
|
||||
|
@ -77,6 +77,7 @@ public class BlockUml {
|
||||
return Collections.unmodifiableSet(included);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
BlockUml(ThemeStyle style, String... strings) {
|
||||
this(style, convert(strings), Defines.createEmpty(), null, null, null);
|
||||
}
|
||||
|
@ -35,11 +35,13 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
|
||||
|
||||
@HaxeIgnored
|
||||
public enum ColorParam {
|
||||
background(HColorUtils.WHITE, true, ColorType.BACK),
|
||||
hyperlink(HColorUtils.BLUE),
|
||||
|
@ -47,15 +47,15 @@ public class Dimension2DDouble extends Dimension2D {
|
||||
final private double height;
|
||||
|
||||
public Dimension2DDouble(double width, double height) {
|
||||
if (Double.isNaN(width) || Double.isNaN(height)) {
|
||||
if (Double.isNaN(width) || Double.isNaN(height))
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public Dimension2DDouble(Point2D point) {
|
||||
this(point.getX(), point.getY());
|
||||
private static Dimension2DDouble fromPoint(Point2D point) {
|
||||
return new Dimension2DDouble(point.getX(), point.getY());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,9 +60,13 @@ public class EmptyImageBuilder {
|
||||
private final Color background;
|
||||
private final StringBounder stringBounder;
|
||||
|
||||
public EmptyImageBuilder(String watermark, double width, double height, Color background,
|
||||
StringBounder stringBounder) {
|
||||
this(watermark, (int) width, (int) height, background, stringBounder);
|
||||
private static EmptyImageBuilder create(String watermark, int width, int height, Color background,
|
||||
StringBounder stringBounder, double dpiFactor) {
|
||||
EmptyImageBuilder result = new EmptyImageBuilder(watermark, (int) (width * dpiFactor),
|
||||
(int) (height * dpiFactor), background, stringBounder);
|
||||
if (dpiFactor != 1.0)
|
||||
result.g2d.setTransform(AffineTransform.getScaleInstance(dpiFactor, dpiFactor));
|
||||
return result;
|
||||
}
|
||||
|
||||
public EmptyImageBuilder(String watermark, int width, int height, Color background, StringBounder stringBounder) {
|
||||
@ -156,14 +160,6 @@ public class EmptyImageBuilder {
|
||||
return result;
|
||||
}
|
||||
|
||||
public EmptyImageBuilder(String watermark, int width, int height, Color background, StringBounder stringBounder,
|
||||
double dpiFactor) {
|
||||
this(watermark, width * dpiFactor, height * dpiFactor, background, stringBounder);
|
||||
if (dpiFactor != 1.0) {
|
||||
g2d.setTransform(AffineTransform.getScaleInstance(dpiFactor, dpiFactor));
|
||||
}
|
||||
}
|
||||
|
||||
public BufferedImage getBufferedImage() {
|
||||
return im;
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import java.awt.geom.AffineTransform;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
|
||||
@ -66,10 +67,12 @@ public final class FileFormatOption implements Serializable {
|
||||
return scale;
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public FileFormatOption(FileFormat fileFormat) {
|
||||
this(fileFormat, true, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, ThemeStyle.LIGHT_REGULAR);
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public FileFormatOption(FileFormat fileFormat, boolean withMetadata) {
|
||||
this(fileFormat, withMetadata, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, ThemeStyle.LIGHT_REGULAR);
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml;
|
||||
|
||||
import java.awt.Font;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
@ -46,6 +47,7 @@ interface FontParamConstant {
|
||||
String COLOR = "black";
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public enum FontParam {
|
||||
TIMING(12, Font.PLAIN), //
|
||||
ACTIVITY(12, Font.PLAIN), //
|
||||
@ -184,7 +186,7 @@ public enum FontParam {
|
||||
}
|
||||
|
||||
public FontConfiguration getFontConfiguration(ISkinParam skinParam) {
|
||||
return new FontConfiguration(skinParam, this, null);
|
||||
return FontConfiguration.create(skinParam, this, null);
|
||||
}
|
||||
|
||||
public StyleSignatureBasic getStyleDefinition(SName diagramType) {
|
||||
|
@ -37,6 +37,8 @@ package net.sourceforge.plantuml;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
public class LineLocationImpl implements LineLocation {
|
||||
|
||||
private final String desc;
|
||||
@ -52,6 +54,7 @@ public class LineLocationImpl implements LineLocation {
|
||||
this(desc, parent, -1);
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
private LineLocationImpl(String desc, LineLocation parent, int position) {
|
||||
this.parent = parent;
|
||||
this.desc = Objects.requireNonNull(desc);
|
||||
|
@ -46,6 +46,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.api.ApiWarning;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||
@ -55,6 +56,7 @@ import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.stats.StatsUtils;
|
||||
|
||||
@HaxeIgnored
|
||||
public class Option {
|
||||
|
||||
private final List<String> excludes = new ArrayList<>();
|
||||
|
@ -114,7 +114,7 @@ public class PSystemBuilder {
|
||||
Diagram result = null;
|
||||
try {
|
||||
final DiagramType type = DiagramType.getTypeFromArobaseStart(source.get(0).getString());
|
||||
final UmlSource umlSource = new UmlSource(source, type == DiagramType.UML, rawSource);
|
||||
final UmlSource umlSource = UmlSource.createWithRaw(source, type == DiagramType.UML, rawSource);
|
||||
|
||||
for (StringLocated s : source) {
|
||||
if (s.getPreprocessorError() != null) {
|
||||
|
@ -38,9 +38,11 @@ package net.sourceforge.plantuml;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@HaxeIgnored
|
||||
public class SkinParamBackcolored extends SkinParamDelegator {
|
||||
|
||||
final private HColor backColorElement;
|
||||
|
@ -41,9 +41,11 @@ import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
@HaxeIgnored
|
||||
public class SourceFileReader extends SourceFileReaderAbstract implements ISourceFileReader {
|
||||
|
||||
public SourceFileReader(File file) throws IOException {
|
||||
|
@ -47,6 +47,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
@ -56,6 +57,7 @@ import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
|
||||
@HaxeIgnored
|
||||
public class SourceStringReader {
|
||||
|
||||
final private List<BlockUml> blocks;
|
||||
|
@ -46,8 +46,8 @@ public class SplitParam {
|
||||
private final HColor externalColor;
|
||||
private final int externalMargin;
|
||||
|
||||
public SplitParam() {
|
||||
this(null, null, 0);
|
||||
private static SplitParam empty() {
|
||||
return new SplitParam(null, null, 0);
|
||||
}
|
||||
|
||||
public SplitParam(HColor borderColor, HColor externalColor, int externalMargin) {
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.command.regex.FoxSignature;
|
||||
import net.sourceforge.plantuml.tim.TLineType;
|
||||
|
||||
@ -50,10 +51,17 @@ final public class StringLocated {
|
||||
private long fox = -1;
|
||||
private TLineType type;
|
||||
|
||||
@HaxeIgnored
|
||||
public StringLocated(String s, LineLocation location) {
|
||||
this(s, location, null);
|
||||
}
|
||||
|
||||
public StringLocated(String s, LineLocation location, String preprocessorError) {
|
||||
this.s = Objects.requireNonNull(s);
|
||||
this.location = location;
|
||||
this.preprocessorError = preprocessorError;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return s;
|
||||
@ -70,12 +78,6 @@ final public class StringLocated {
|
||||
return new StringLocated(s.substring(0, s.length() - 1) + next.s, location, preprocessorError);
|
||||
}
|
||||
|
||||
public StringLocated(String s, LineLocation location, String preprocessorError) {
|
||||
this.s = Objects.requireNonNull(s);
|
||||
this.location = location;
|
||||
this.preprocessorError = preprocessorError;
|
||||
}
|
||||
|
||||
public StringLocated withErrorPreprocessor(String preprocessorError) {
|
||||
return new StringLocated(s, location, preprocessorError);
|
||||
}
|
||||
|
@ -87,23 +87,25 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
return pragma;
|
||||
}
|
||||
|
||||
public TitledDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type) {
|
||||
// public TitledDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type) {
|
||||
// super(source);
|
||||
// this.type = type;
|
||||
// this.skinParam = SkinParam.create(type, style);
|
||||
// }
|
||||
|
||||
public TitledDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) {
|
||||
super(source);
|
||||
this.type = type;
|
||||
this.skinParam = SkinParam.create(type, style);
|
||||
if (orig != null)
|
||||
this.skinParam.copyAllFrom(orig);
|
||||
|
||||
}
|
||||
|
||||
public final StyleBuilder getCurrentStyleBuilder() {
|
||||
return skinParam.getCurrentStyleBuilder();
|
||||
}
|
||||
|
||||
public TitledDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) {
|
||||
this(style, source, type);
|
||||
if (orig != null) {
|
||||
this.skinParam.copyAllFrom(orig);
|
||||
}
|
||||
}
|
||||
|
||||
final public UmlDiagramType getUmlDiagramType() {
|
||||
return type;
|
||||
}
|
||||
@ -274,7 +276,8 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
|
||||
public HColor calculateBackColor() {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, this.getUmlDiagramType().getStyleName())
|
||||
final Style style = StyleSignatureBasic
|
||||
.of(SName.root, SName.document, this.getUmlDiagramType().getStyleName())
|
||||
.getMergedStyle(this.getSkinParam().getCurrentStyleBuilder());
|
||||
|
||||
HColor backgroundColor = style.value(PName.BackGroundColor).asColor(this.getSkinParam().getThemeStyle(),
|
||||
|
@ -87,9 +87,9 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
|
||||
private int minwidth = Integer.MAX_VALUE;
|
||||
|
||||
public UmlDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type) {
|
||||
super(style, source, type);
|
||||
}
|
||||
// public UmlDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type) {
|
||||
// super(style, source, type);
|
||||
// }
|
||||
|
||||
public UmlDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) {
|
||||
super(style, source, type, orig);
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.DotMaker2;
|
||||
|
||||
public class Url implements EnsureVisible {
|
||||
@ -46,6 +47,7 @@ public class Url implements EnsureVisible {
|
||||
private final String label;
|
||||
private boolean member;
|
||||
|
||||
@HaxeIgnored
|
||||
public Url(String url, String tooltip) {
|
||||
this(url, tooltip, null);
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
manageSwimlaneStrategy();
|
||||
if (current() instanceof InstructionRepeat) {
|
||||
final InstructionRepeat instructionRepeat = (InstructionRepeat) current();
|
||||
final LinkRendering back = new LinkRendering(linkColor).withDisplay(linkLabel);
|
||||
final LinkRendering back = LinkRendering.create(linkColor).withDisplay(linkLabel);
|
||||
instructionRepeat.setTest(label, yes, out, nextLinkRenderer(), back, swinlanes.getCurrentSwimlane());
|
||||
setCurrent(instructionRepeat.getParent());
|
||||
this.setNextLinkRendererInternal(LinkRendering.none());
|
||||
@ -471,7 +471,7 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
if (color == null)
|
||||
return;
|
||||
|
||||
final LinkRendering link = new LinkRendering(color);
|
||||
final LinkRendering link = LinkRendering.create(color);
|
||||
setNextLink(link);
|
||||
}
|
||||
|
||||
|
@ -113,11 +113,11 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory {
|
||||
cmds.add(new CommandActivity3());
|
||||
cmds.add(new CommandIf4());
|
||||
cmds.add(new CommandIf2());
|
||||
cmds.add(new CommandDecoratorMultine(new CommandIf2(), 50));
|
||||
cmds.add(CommandDecoratorMultine.create(new CommandIf2(), 50));
|
||||
cmds.add(new CommandIfLegacy1());
|
||||
cmds.add(new CommandElseIf2());
|
||||
cmds.add(new CommandElse3());
|
||||
cmds.add(new CommandDecoratorMultine(new CommandElse3(), 50));
|
||||
cmds.add(CommandDecoratorMultine.create(new CommandElse3(), 50));
|
||||
cmds.add(new CommandElseLegacy1());
|
||||
cmds.add(new CommandEndif3());
|
||||
|
||||
@ -156,7 +156,7 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory {
|
||||
|
||||
cmds.add(new CommandLabel());
|
||||
cmds.add(new CommandGoto());
|
||||
cmds.add(new CommandDecoratorMultine(new CommandElseIf2(), 50));
|
||||
cmds.add(CommandDecoratorMultine.create(new CommandElseIf2(), 50));
|
||||
|
||||
return cmds;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public class Branch {
|
||||
lineBreak = style.wrapWidth();
|
||||
fcArrow = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
return display.create0(fcArrow, HorizontalAlignment.LEFT, skinParam(), lineBreak, CreoleMode.SIMPLE_LINE, null,
|
||||
|
@ -85,7 +85,7 @@ public class InstructionFork extends WithNote implements Instruction {
|
||||
this.skinParam = skinParam;
|
||||
this.swimlaneIn = swimlane;
|
||||
this.swimlaneOut = swimlane;
|
||||
this.forks.add(new InstructionList());
|
||||
this.forks.add(InstructionList.empty());
|
||||
}
|
||||
|
||||
private InstructionList getLastList() {
|
||||
@ -109,14 +109,13 @@ public class InstructionFork extends WithNote implements Instruction {
|
||||
|
||||
return new GtileSplit(all, swimlaneIn, getInLinkRenderingColor(skinParam).getColor());
|
||||
}
|
||||
|
||||
|
||||
private Rainbow getInLinkRenderingColor(ISkinParam skinParam) {
|
||||
Rainbow color;
|
||||
color = Rainbow.build(skinParam);
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Ftile createFtile(FtileFactory factory) {
|
||||
final List<Ftile> all = new ArrayList<>();
|
||||
@ -136,7 +135,7 @@ public class InstructionFork extends WithNote implements Instruction {
|
||||
|
||||
public void forkAgain(Swimlane swimlane) {
|
||||
this.swimlaneOut = swimlane;
|
||||
this.forks.add(new InstructionList());
|
||||
this.forks.add(InstructionList.empty());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +125,7 @@ public class InstructionGroup extends AbstractInstruction implements Instruction
|
||||
@Override
|
||||
public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) {
|
||||
if (list.isEmpty()) {
|
||||
this.note = new PositionedNote(note, position, type, colors, swimlaneNote);
|
||||
this.note = new PositionedNote(note, position, type, swimlaneNote, colors);
|
||||
return true;
|
||||
}
|
||||
return list.addNote(note, position, type, colors, swimlaneNote);
|
||||
|
@ -73,8 +73,12 @@ public class InstructionList extends WithNote implements Instruction, Instructio
|
||||
return false;
|
||||
}
|
||||
|
||||
public InstructionList() {
|
||||
this(null);
|
||||
public static InstructionList empty() {
|
||||
return new InstructionList(null);
|
||||
}
|
||||
|
||||
public InstructionList(Swimlane defaultSwimlane) {
|
||||
this.defaultSwimlane = defaultSwimlane;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
@ -91,10 +95,6 @@ public class InstructionList extends WithNote implements Instruction, Instructio
|
||||
return getLast() instanceof InstructionStop && ((InstructionStop) getLast()).hasNotes() == false;
|
||||
}
|
||||
|
||||
public InstructionList(Swimlane defaultSwimlane) {
|
||||
this.defaultSwimlane = defaultSwimlane;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandExecutionResult add(Instruction ins) {
|
||||
all.add(ins);
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType;
|
||||
|
||||
public class InstructionPartition extends AbstractInstruction implements Instruction {
|
||||
|
||||
private final InstructionList list = new InstructionList();
|
||||
private final InstructionList list = InstructionList.empty();
|
||||
private final Instruction parent;
|
||||
|
||||
public InstructionPartition(Instruction parent, String partitionTitle) {
|
||||
|
@ -204,7 +204,7 @@ public class InstructionRepeat extends AbstractInstruction implements Instructio
|
||||
if (Display.isNull(backward))
|
||||
return repeatList.addNote(note, position, type, colors, swimlaneNote);
|
||||
|
||||
this.backwardNotes.add(new PositionedNote(note, position, type, colors, swimlaneNote));
|
||||
this.backwardNotes.add(new PositionedNote(note, position, type, swimlaneNote, colors));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class InstructionWhile extends WithNote implements Instruction, InstructionCollection {
|
||||
|
||||
private final InstructionList repeatList = new InstructionList();
|
||||
private final InstructionList repeatList = InstructionList.empty();
|
||||
private final Instruction parent;
|
||||
private final LinkRendering nextLinkRenderer;
|
||||
private final HColor color;
|
||||
|
@ -45,8 +45,12 @@ public class LinkRendering {
|
||||
private final Rainbow rainbow;
|
||||
private final Display display;
|
||||
|
||||
public LinkRendering(Rainbow rainbow) {
|
||||
this(rainbow, Display.NULL);
|
||||
public static LinkRendering create(Rainbow rainbow) {
|
||||
return new LinkRendering(rainbow, Display.NULL);
|
||||
}
|
||||
|
||||
public static LinkRendering none() {
|
||||
return LinkRendering.create(Rainbow.none());
|
||||
}
|
||||
|
||||
private LinkRendering(Rainbow rainbow, Display display) {
|
||||
@ -54,10 +58,6 @@ public class LinkRendering {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public static LinkRendering none() {
|
||||
return new LinkRendering(Rainbow.none());
|
||||
}
|
||||
|
||||
public LinkRendering withRainbow(Rainbow rainbow) {
|
||||
return new LinkRendering(rainbow, display);
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
package net.sourceforge.plantuml.activitydiagram3;
|
||||
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.sequencediagram.NotePosition;
|
||||
@ -49,7 +50,7 @@ public class PositionedNote {
|
||||
private final Colors colors;
|
||||
private final Swimlane swimlaneNote;
|
||||
|
||||
public PositionedNote(Display display, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) {
|
||||
public PositionedNote(Display display, NotePosition position, NoteType type, Swimlane swimlaneNote, Colors colors) {
|
||||
this.display = display;
|
||||
this.notePosition = position;
|
||||
this.type = type;
|
||||
@ -57,15 +58,16 @@ public class PositionedNote {
|
||||
this.swimlaneNote = swimlaneNote;
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public PositionedNote(Display note, NotePosition position, NoteType type, Swimlane swimlaneNote) {
|
||||
this(note, position, type, swimlaneNote, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "type=" + type + " notePosition=" + notePosition + " " + display;
|
||||
}
|
||||
|
||||
public PositionedNote(Display note, NotePosition position, NoteType type, Swimlane swimlaneNote) {
|
||||
this(note, position, type, null, swimlaneNote);
|
||||
}
|
||||
|
||||
public Display getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ abstract class WithNote extends AbstractInstruction {
|
||||
private final Collection<PositionedNote> notes = new ArrayList<>();
|
||||
|
||||
public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) {
|
||||
this.notes.add(new PositionedNote(note, position, type, colors, swimlaneNote));
|
||||
this.notes.add(new PositionedNote(note, position, type, swimlaneNote, colors));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class CommandBackward3 extends SingleLineCommand2<ActivityDiagram3> {
|
||||
if (incomingColor == null)
|
||||
in = LinkRendering.none();
|
||||
else
|
||||
in = new LinkRendering(incomingColor);
|
||||
in = LinkRendering.create(incomingColor);
|
||||
final String label = arg.get(name, 0);
|
||||
return in.withDisplay(Display.getWithNewlines(label));
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ import java.awt.geom.Line2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UBackground;
|
||||
@ -56,6 +57,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
|
||||
@HaxeIgnored
|
||||
public class CollisionDetector extends UGraphicNo {
|
||||
|
||||
@Override
|
||||
@ -65,16 +67,24 @@ public class CollisionDetector extends UGraphicNo {
|
||||
|
||||
private final Context context;
|
||||
|
||||
public CollisionDetector(StringBounder stringBounder) {
|
||||
super(stringBounder);
|
||||
this.context = new Context();
|
||||
private static CollisionDetector create(StringBounder stringBounder) {
|
||||
return new CollisionDetector(stringBounder, new UTranslate(), new Context());
|
||||
}
|
||||
|
||||
private CollisionDetector(StringBounder stringBounder, UTranslate translate, Context context) {
|
||||
super(stringBounder, translate);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
private CollisionDetector(CollisionDetector other, UChange change) {
|
||||
super(other, change);
|
||||
if (!instanceOfAny(change, UBackground.class, HColor.class, UStroke.class, UTranslate.class)) {
|
||||
// this(other.stringBounder,
|
||||
// change instanceof UTranslate ? other.translate.compose((UTranslate) change) :
|
||||
// other.translate);
|
||||
super(other.getStringBounder(), change instanceof UTranslate ? other.getTranslate().compose((UTranslate) change)
|
||||
: other.getTranslate());
|
||||
if (!instanceOfAny(change, UBackground.class, HColor.class, UStroke.class, UTranslate.class))
|
||||
throw new UnsupportedOperationException(change.getClass().toString());
|
||||
}
|
||||
|
||||
this.context = other.context;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class EntityImageLegend {
|
||||
return style.createTextBlockBordered(note, skinParam.getIHtmlColorSet(), skinParam);
|
||||
}
|
||||
|
||||
final TextBlock textBlock = note.create(new FontConfiguration(skinParam, FontParam.LEGEND, null),
|
||||
final TextBlock textBlock = note.create(FontConfiguration.create(skinParam, FontParam.LEGEND, null),
|
||||
HorizontalAlignment.LEFT, skinParam);
|
||||
final Rose rose = new Rose();
|
||||
final HColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground);
|
||||
|
@ -118,7 +118,7 @@ public class FtileFactoryDelegator implements FtileFactory {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
||||
private final List<LaneDivider> dividers = new ArrayList<>();
|
||||
private Swimlane currentSwimlane = null;
|
||||
|
||||
private final Instruction root = new InstructionList();
|
||||
private final Instruction root = InstructionList.empty();
|
||||
private Instruction currentInstruction = root;
|
||||
|
||||
private LinkRendering nextLinkRenderer = LinkRendering.none();
|
||||
@ -215,7 +215,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
||||
}
|
||||
|
||||
public final void computeSize(StringBounder stringBounder) {
|
||||
final SlotFinder ug = new SlotFinder(CompressionMode.ON_Y, stringBounder);
|
||||
final SlotFinder ug = SlotFinder.create(CompressionMode.ON_Y, stringBounder);
|
||||
if (swimlanes().size() > 1) {
|
||||
TextBlock full = root.createFtile(getFtileFactory(stringBounder));
|
||||
computeSizeInternal(ug, full);
|
||||
@ -258,7 +258,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
||||
|
||||
private TextBlock getTitle(Swimlane swimlane) {
|
||||
final HorizontalAlignment horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.SWIMLANE_TITLE, null);
|
||||
FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, FontParam.SWIMLANE_TITLE, null);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
fontConfiguration = getStyle().getFontConfiguration(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
@ -359,7 +359,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
||||
private void computeDrawingWidths(UGraphic ug, TextBlock full) {
|
||||
final StringBounder stringBounder = ug.getStringBounder();
|
||||
for (Swimlane swimlane : swimlanes()) {
|
||||
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
||||
final LimitFinder limitFinder = LimitFinder.create(stringBounder, false);
|
||||
final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(
|
||||
new UGraphicForSnake(limitFinder), swimlane, swimlanes());
|
||||
full.drawU(interceptor);
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
|
||||
|
||||
import static net.sourceforge.plantuml.utils.ObjectUtils.instanceOfAny;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UBackground;
|
||||
@ -49,6 +50,7 @@ import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@HaxeIgnored
|
||||
public class ZadBuilder extends UGraphicNo {
|
||||
|
||||
@Override
|
||||
@ -63,20 +65,17 @@ public class ZadBuilder extends UGraphicNo {
|
||||
}
|
||||
|
||||
public ZadBuilder(StringBounder stringBounder) {
|
||||
super(stringBounder);
|
||||
super(stringBounder, new UTranslate());
|
||||
this.context = new Context();
|
||||
}
|
||||
|
||||
private ZadBuilder(ZadBuilder other, UChange change) {
|
||||
super(other, change);
|
||||
if (!instanceOfAny(change,
|
||||
UBackground.class,
|
||||
HColor.class,
|
||||
UStroke.class,
|
||||
UTranslate.class
|
||||
)) {
|
||||
// super(other, change);
|
||||
super(other.getStringBounder(), change instanceof UTranslate ? other.getTranslate().compose((UTranslate) change)
|
||||
: other.getTranslate());
|
||||
if (!instanceOfAny(change, UBackground.class, HColor.class, UStroke.class, UTranslate.class))
|
||||
throw new UnsupportedOperationException(change.getClass().toString());
|
||||
}
|
||||
|
||||
this.context = other.context;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public abstract class AbstractParallelFtilesBuilder {
|
||||
final Style style = getStyleSignatureArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
wrapWidth = style.wrapWidth();
|
||||
fc = new FontConfiguration(skinParam, style);
|
||||
fc = FontConfiguration.create(skinParam, style);
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
@ -92,7 +92,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
||||
|
@ -99,9 +99,9 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
|
||||
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: branch0.getColor();
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fcTest = new FontConfiguration(skinParam(), testParam, null)
|
||||
fcTest = FontConfiguration.create(skinParam(), testParam, null)
|
||||
.changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
|
||||
fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
if (thens.size() > 1) {
|
||||
|
@ -107,8 +107,8 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
|
||||
diamondColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
|
||||
}
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fcDiamond = FontConfiguration.create(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
final LinkRendering endRepeatLinkRendering = repeat.getOutLinkRendering();
|
||||
|
@ -145,7 +145,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
||||
backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
} else {
|
||||
fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
fcDiamond = FontConfiguration.create(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = branch0.getColor() == null
|
||||
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
|
@ -99,8 +99,8 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
||||
backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: color;
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fontArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fcTest = new FontConfiguration(skinParam(), testParam, null);
|
||||
fontArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
fcTest = FontConfiguration.create(skinParam(), testParam, null);
|
||||
}
|
||||
|
||||
incoming1 = ensureColor(incoming1, arrowColor);
|
||||
|
@ -118,7 +118,7 @@ public class FtileGroup extends AbstractFtile {
|
||||
style = null;
|
||||
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION);
|
||||
final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
|
||||
fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
fc = FontConfiguration.create(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
thickness = skinParam.getThickness(LineParam.partitionBorder, null);
|
||||
@ -169,7 +169,7 @@ public class FtileGroup extends AbstractFtile {
|
||||
}
|
||||
|
||||
private MinMax getInnerMinMax(StringBounder stringBounder) {
|
||||
final LimitFinder limitFinder = new LimitFinder(stringBounder, false);
|
||||
final LimitFinder limitFinder = LimitFinder.create(stringBounder, false);
|
||||
final UGraphicForSnake interceptor = new UGraphicForSnake(limitFinder);
|
||||
final UGraphicInterceptorUDrawable interceptor2 = new UGraphicInterceptorUDrawable(interceptor);
|
||||
|
||||
|
@ -128,10 +128,10 @@ class FtileIfAndStop extends AbstractFtile {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.activityDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
thickness = tileNonStop.getThickness(style);
|
||||
fcTest = new FontConfiguration(skinParam, style);
|
||||
fcTest = FontConfiguration.create(skinParam, style);
|
||||
} else {
|
||||
thickness = tileNonStop.getThickness(null);
|
||||
fcTest = new FontConfiguration(skinParam, FontParam.ACTIVITY_DIAMOND, null);
|
||||
fcTest = FontConfiguration.create(skinParam, FontParam.ACTIVITY_DIAMOND, null);
|
||||
}
|
||||
|
||||
final Sheet sheet = Parser
|
||||
|
@ -127,7 +127,7 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
||||
final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
final FontConfiguration fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
@ -158,7 +158,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class FtileWithNotes extends AbstractFtile {
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam2, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam2, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class FtileBox extends AbstractFtile {
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = new LinkRendering(
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
@ -180,10 +180,10 @@ public class FtileBox extends AbstractFtile {
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = new LinkRendering(Rainbow.build(skinParam));
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
@ -161,7 +161,7 @@ public class FtileBox2 extends AbstractFtile {
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = new LinkRendering(
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
@ -181,10 +181,10 @@ public class FtileBox2 extends AbstractFtile {
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = new LinkRendering(Rainbow.build(skinParam));
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
@ -186,7 +186,7 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = new LinkRendering(
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
@ -204,10 +204,10 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.inRendering = new LinkRendering(Rainbow.build(skinParam));
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
@ -77,9 +77,9 @@ public class FtileCircleSpot extends AbstractFtile {
|
||||
this.swimlane = swimlane;
|
||||
this.backColor = backColor;
|
||||
if (UseStyle.useBetaStyle())
|
||||
this.fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
this.fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
else
|
||||
this.fc = new FontConfiguration(skinParam, style);
|
||||
this.fc = FontConfiguration.create(skinParam, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,7 +93,7 @@ public class GtileAssembly extends GtileTopDown {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class GtileBox extends AbstractGtile {
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = new LinkRendering(
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
@ -160,10 +160,10 @@ public class GtileBox extends AbstractGtile {
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = new LinkRendering(Rainbow.build(skinParam));
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
@ -75,7 +75,7 @@ public class GtileCircleSpot extends AbstractGtile {
|
||||
super(stringBounder, skinParam, swimlane);
|
||||
this.spot = spot;
|
||||
this.backColor = backColor;
|
||||
this.fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
|
||||
this.fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
@ -114,7 +114,7 @@ public class GtileGroup extends AbstractGtileRoot {
|
||||
style = null;
|
||||
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION);
|
||||
final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
|
||||
fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
fc = FontConfiguration.create(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ public class GtileIfHexagon extends GtileColumns {
|
||||
// final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
// fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
// } else {
|
||||
// fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null);
|
||||
// fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
// }
|
||||
//
|
||||
// return branch.getDisplayPositive().create0(fontConfiguration, HorizontalAlignment.LEFT, skinParam(),
|
||||
|
@ -133,7 +133,7 @@ public class GtileWithNoteOpale extends AbstractGtile implements Stencil, Stylea
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class GtileWithNotes extends AbstractGtile {
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam2, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam2, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class Gtiles {
|
||||
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.activityDiamondBorder);
|
||||
backColor = color == null ? rose.getHtmlColor(skinParam, ColorParam.activityDiamondBackground) : color;
|
||||
fcTest = new FontConfiguration(skinParam, testParam, null)
|
||||
fcTest = FontConfiguration.create(skinParam, testParam, null)
|
||||
.changeColor(fontColor(skinParam, FontParam.ACTIVITY_DIAMOND));
|
||||
}
|
||||
|
||||
|
11
src/net/sourceforge/plantuml/annotation/HaxeIgnored.java
Normal file
11
src/net/sourceforge/plantuml/annotation/HaxeIgnored.java
Normal file
@ -0,0 +1,11 @@
|
||||
package net.sourceforge.plantuml.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Target({ ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE })
|
||||
public @interface HaxeIgnored {
|
||||
}
|
@ -35,6 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.api;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
@ -49,7 +50,8 @@ public abstract class ImageDataAbstract implements ImageData {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
|
||||
@HaxeIgnored
|
||||
public ImageDataAbstract(Dimension2D dim) {
|
||||
this((int) dim.getWidth(), (int) dim.getHeight());
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.api;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.CMapData;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
public class ImageDataComplex extends ImageDataAbstract {
|
||||
|
||||
@ -45,6 +46,7 @@ public class ImageDataComplex extends ImageDataAbstract {
|
||||
private final String warningOrError;
|
||||
|
||||
@SuppressWarnings("unused") // available publicly so retained for backwards compatibility
|
||||
@HaxeIgnored
|
||||
public ImageDataComplex(Dimension2D info, CMapData cmap, String warningOrError) {
|
||||
super(info);
|
||||
this.cmap = cmap;
|
||||
|
@ -35,16 +35,19 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.api;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
|
||||
public class ImageDataSimple extends ImageDataAbstract {
|
||||
|
||||
@HaxeIgnored
|
||||
public ImageDataSimple(int width, int height) {
|
||||
super(width, height);
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public ImageDataSimple(Dimension2D dim) {
|
||||
super(dim);
|
||||
}
|
||||
@ -54,6 +57,7 @@ public class ImageDataSimple extends ImageDataAbstract {
|
||||
setStatus(status);
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
private ImageDataSimple() {
|
||||
this(0, 0);
|
||||
}
|
||||
|
@ -34,7 +34,8 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzed implements INumberAnalyzed {
|
||||
|
||||
private static final int SLIDING_WINDOW = 1024;
|
||||
|
@ -33,7 +33,9 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzed2 implements INumberAnalyzed {
|
||||
|
||||
private static final int SLIDING_WINDOW = 512;
|
||||
|
@ -33,7 +33,9 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzedDated extends NumberAnalyzed {
|
||||
|
||||
private final AtomicLong created = new AtomicLong();
|
||||
|
@ -71,7 +71,7 @@ public class BoardDiagram extends UmlDiagram {
|
||||
}
|
||||
|
||||
public BoardDiagram(ThemeStyle style, UmlSource source) {
|
||||
super(style, source, UmlDiagramType.BOARD);
|
||||
super(style, source, UmlDiagramType.BOARD, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,7 +76,7 @@ public class BpmDiagram extends UmlDiagram {
|
||||
}
|
||||
|
||||
public BpmDiagram(ThemeStyle style, UmlSource source) {
|
||||
super(style, source, UmlDiagramType.BPM);
|
||||
super(style, source, UmlDiagramType.BPM, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -167,7 +167,7 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz
|
||||
return FtileBox.create(skinParam, display, null, BoxStyle.PLAIN, null);
|
||||
}
|
||||
final UFont font = UFont.serif(14);
|
||||
final FontConfiguration fc = new FontConfiguration(font, HColorUtils.RED, HColorUtils.RED, false);
|
||||
final FontConfiguration fc = FontConfiguration.create(font, HColorUtils.RED, HColorUtils.RED, false);
|
||||
if (Display.isNull(display)) {
|
||||
return Display.getWithNewlines(type.toString()).create(fc, HorizontalAlignment.LEFT, skinParam);
|
||||
}
|
||||
|
@ -132,8 +132,8 @@ public class BlocLines implements Iterable<StringLocated> {
|
||||
return new BlocLines(result);
|
||||
}
|
||||
|
||||
public BlocLines() {
|
||||
this(new ArrayList<StringLocated>());
|
||||
public static BlocLines create() {
|
||||
return new BlocLines(new ArrayList<StringLocated>());
|
||||
}
|
||||
|
||||
public BlocLines add(StringLocated s) {
|
||||
|
@ -42,40 +42,40 @@ public class CommandDecoratorMultine<D extends Diagram> implements Command<D> {
|
||||
private final SingleLineCommand2<D> cmd;
|
||||
private final boolean removeEmptyColumn;
|
||||
private final int nbMaxLines;
|
||||
|
||||
public CommandDecoratorMultine(SingleLineCommand2<D> cmd, int nbMaxLines) {
|
||||
this(cmd, false, nbMaxLines);
|
||||
|
||||
public static <D extends Diagram> CommandDecoratorMultine<D> create(SingleLineCommand2<D> cmd, int nbMaxLines) {
|
||||
return new CommandDecoratorMultine<D>(cmd, false, nbMaxLines);
|
||||
}
|
||||
|
||||
public CommandDecoratorMultine(SingleLineCommand2<D> cmd, boolean removeEmptyColumn, int nbMaxLines) {
|
||||
private CommandDecoratorMultine(SingleLineCommand2<D> cmd, boolean removeEmptyColumn, int nbMaxLines) {
|
||||
this.cmd = cmd;
|
||||
this.removeEmptyColumn = removeEmptyColumn;
|
||||
this.nbMaxLines = nbMaxLines;
|
||||
}
|
||||
|
||||
public CommandExecutionResult execute(D diagram, BlocLines lines) {
|
||||
if (removeEmptyColumn) {
|
||||
if (removeEmptyColumn)
|
||||
lines = lines.removeEmptyColumns();
|
||||
}
|
||||
|
||||
lines = lines.toSingleLineWithHiddenNewLine();
|
||||
return cmd.execute(diagram, lines);
|
||||
}
|
||||
|
||||
public CommandControl isValid(BlocLines lines) {
|
||||
if (cmd.isCommandForbidden()) {
|
||||
if (cmd.isCommandForbidden())
|
||||
return CommandControl.NOT_OK;
|
||||
}
|
||||
|
||||
lines = lines.toSingleLineWithHiddenNewLine();
|
||||
if (cmd.isForbidden(lines.getFirst().getString())) {
|
||||
if (cmd.isForbidden(lines.getFirst().getString()))
|
||||
return CommandControl.NOT_OK;
|
||||
}
|
||||
|
||||
final CommandControl tmp = cmd.isValid(lines);
|
||||
if (tmp == CommandControl.OK_PARTIAL) {
|
||||
if (tmp == CommandControl.OK_PARTIAL)
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
if (tmp == CommandControl.OK) {
|
||||
|
||||
if (tmp == CommandControl.OK)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
return CommandControl.OK_PARTIAL;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ import net.sourceforge.plantuml.ErrorUml;
|
||||
import net.sourceforge.plantuml.ErrorUmlType;
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.core.DiagramType;
|
||||
@ -54,6 +55,7 @@ public abstract class PSystemBasicFactory<P extends AbstractPSystem> extends PSy
|
||||
super(diagramType);
|
||||
}
|
||||
|
||||
@HaxeIgnored
|
||||
public PSystemBasicFactory() {
|
||||
this(DiagramType.UML);
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ import net.sourceforge.plantuml.ErrorUmlType;
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.core.DiagramType;
|
||||
@ -60,6 +61,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory {
|
||||
|
||||
public abstract AbstractPSystem createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam);
|
||||
|
||||
@HaxeIgnored
|
||||
protected PSystemCommandFactory() {
|
||||
this(DiagramType.UML);
|
||||
}
|
||||
@ -171,7 +173,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory {
|
||||
}
|
||||
|
||||
private BlocLines isMultilineCommandOk(IteratorCounter2 it, Command cmd) {
|
||||
BlocLines lines = new BlocLines();
|
||||
BlocLines lines = BlocLines.create();
|
||||
int nb = 0;
|
||||
while (it.hasNext()) {
|
||||
lines = addOneSingleLineManageEmbedded2(it, lines);
|
||||
|
@ -39,6 +39,7 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
@ -50,6 +51,7 @@ public abstract class SingleLineCommand2<S extends Diagram> implements Command<S
|
||||
private final IRegex pattern;
|
||||
private final boolean doTrim;
|
||||
|
||||
@HaxeIgnored
|
||||
public SingleLineCommand2(IRegex pattern) {
|
||||
this(true, pattern);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import java.util.StringTokenizer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
public class RegexLeaf implements IRegex {
|
||||
|
||||
@ -54,10 +55,16 @@ public class RegexLeaf implements IRegex {
|
||||
|
||||
private int count = -1;
|
||||
|
||||
@HaxeIgnored
|
||||
public RegexLeaf(String regex) {
|
||||
this(null, regex);
|
||||
}
|
||||
|
||||
public RegexLeaf(String name, String regex) {
|
||||
this.pattern = regex;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static RegexLeaf spaceZeroOrMore() {
|
||||
return new RegexLeaf("[%s]*");
|
||||
}
|
||||
@ -74,11 +81,6 @@ public class RegexLeaf implements IRegex {
|
||||
return END;
|
||||
}
|
||||
|
||||
public RegexLeaf(String name, String regex) {
|
||||
this.pattern = regex;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " " + name + " " + pattern;
|
||||
|
@ -40,11 +40,13 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
|
||||
public class RegexOr extends RegexComposed implements IRegex {
|
||||
|
||||
private final String name;
|
||||
|
||||
@HaxeIgnored
|
||||
public RegexOr(IRegex... partial) {
|
||||
this(null, partial);
|
||||
}
|
||||
|
@ -67,22 +67,21 @@ final public class UmlSource {
|
||||
final private List<StringLocated> rawSource;
|
||||
|
||||
public UmlSource removeInitialSkinparam() {
|
||||
if (hasInitialSkinparam(source) == false) {
|
||||
if (hasInitialSkinparam(source) == false)
|
||||
return this;
|
||||
}
|
||||
|
||||
final List<StringLocated> copy = new ArrayList<>(source);
|
||||
while (hasInitialSkinparam(copy)) {
|
||||
while (hasInitialSkinparam(copy))
|
||||
copy.remove(1);
|
||||
}
|
||||
|
||||
return new UmlSource(copy, rawSource);
|
||||
}
|
||||
|
||||
public boolean containsIgnoreCase(String searched) {
|
||||
for (StringLocated s : source) {
|
||||
if (StringUtils.goLowerCase(s.getString()).contains(searched)) {
|
||||
for (StringLocated s : source)
|
||||
if (StringUtils.goLowerCase(s.getString()).contains(searched))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -96,24 +95,29 @@ final public class UmlSource {
|
||||
this.rawSource = rawSource;
|
||||
}
|
||||
|
||||
public UmlSource(List<StringLocated> data, boolean checkEndingBackslash) {
|
||||
this(data, checkEndingBackslash, new ArrayList<StringLocated>());
|
||||
public static UmlSource create(List<StringLocated> source, boolean checkEndingBackslash) {
|
||||
return createWithRaw(source, checkEndingBackslash, new ArrayList<StringLocated>());
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the source from a text.
|
||||
*
|
||||
* @param data the source of the diagram
|
||||
* @param source the source of the diagram
|
||||
* @param checkEndingBackslash <code>true</code> if an ending backslash means
|
||||
* that a line has to be collapsed with the
|
||||
* following one.
|
||||
*/
|
||||
public UmlSource(List<StringLocated> data, boolean checkEndingBackslash, List<StringLocated> rawSource) {
|
||||
this(new ArrayList<StringLocated>(), rawSource);
|
||||
public static UmlSource createWithRaw(List<StringLocated> source, boolean checkEndingBackslash,
|
||||
List<StringLocated> rawSource) {
|
||||
final UmlSource result = new UmlSource(new ArrayList<StringLocated>(), rawSource);
|
||||
result.loadInternal(source, checkEndingBackslash);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void loadInternal(List<StringLocated> source, boolean checkEndingBackslash) {
|
||||
if (checkEndingBackslash) {
|
||||
final StringBuilder pending = new StringBuilder();
|
||||
for (StringLocated cs : data) {
|
||||
for (StringLocated cs : source) {
|
||||
final String s = cs.getString();
|
||||
if (StringUtils.endsWithBackslash(s)) {
|
||||
pending.append(s.substring(0, s.length() - 1));
|
||||
@ -124,7 +128,7 @@ final public class UmlSource {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.source.addAll(data);
|
||||
this.source.addAll(source);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,11 +185,10 @@ final public class UmlSource {
|
||||
}
|
||||
|
||||
public String getLine(LineLocation n) {
|
||||
for (StringLocated s : source) {
|
||||
if (s.getLocation().compareTo(n) == 0) {
|
||||
for (StringLocated s : source)
|
||||
if (s.getLocation().compareTo(n) == 0)
|
||||
return s.getString();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -208,18 +211,18 @@ final public class UmlSource {
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
for (StringLocated s : source) {
|
||||
if (StartUtils.isArobaseStartDiagram(s.getString())) {
|
||||
if (StartUtils.isArobaseStartDiagram(s.getString()))
|
||||
continue;
|
||||
}
|
||||
if (StartUtils.isArobaseEndDiagram(s.getString())) {
|
||||
|
||||
if (StartUtils.isArobaseEndDiagram(s.getString()))
|
||||
continue;
|
||||
}
|
||||
if (s.getString().matches("\\s*'.*")) {
|
||||
|
||||
if (s.getString().matches("\\s*'.*"))
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.trin(s.getString()).length() != 0) {
|
||||
|
||||
if (StringUtils.trin(s.getString()).length() != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -233,9 +236,8 @@ final public class UmlSource {
|
||||
for (StringLocated s : source) {
|
||||
final Matcher2 m = p.matcher(s.getString());
|
||||
final boolean ok = m.matches();
|
||||
if (ok) {
|
||||
if (ok)
|
||||
return Display.create(m.group(1));
|
||||
}
|
||||
}
|
||||
return Display.empty();
|
||||
}
|
||||
@ -247,9 +249,9 @@ final public class UmlSource {
|
||||
public String getId() {
|
||||
final Pattern p = Pattern.compile("id=([\\w]+)\\b");
|
||||
final Matcher m = p.matcher(source.get(0).getString());
|
||||
if (m.find()) {
|
||||
if (m.find())
|
||||
return m.group(1);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.creole.atom.Atom;
|
||||
import net.sourceforge.plantuml.creole.legacy.StripeSimple;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
@ -73,6 +74,7 @@ public class SheetBlock1 extends AbstractTextBlock implements TextBlock, Atom, S
|
||||
private final double marginX1;
|
||||
private final double marginX2;
|
||||
|
||||
@HaxeIgnored
|
||||
public SheetBlock1(Sheet sheet, LineBreakStrategy maxWidth, double padding) {
|
||||
this(sheet, maxWidth, padding, 0, 0);
|
||||
}
|
||||
|
@ -81,9 +81,9 @@ public class Body3 extends AbstractTextBlock implements TextBlock, WithPorts {
|
||||
|
||||
FontConfiguration config;
|
||||
if (style != null) {
|
||||
config = new FontConfiguration(skinParam, style);
|
||||
config = FontConfiguration.create(skinParam, style);
|
||||
} else {
|
||||
config = new FontConfiguration(skinParam, fontParam, stereotype);
|
||||
config = FontConfiguration.create(skinParam, fontParam, stereotype);
|
||||
}
|
||||
|
||||
TextBlock foo = display.create(config, HorizontalAlignment.LEFT, skinParam);
|
||||
|
@ -77,7 +77,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi
|
||||
|
||||
BodyEnhanced1(HorizontalAlignment align, List<CharSequence> rawBody, FontParam fontParam, ISkinParam skinParam,
|
||||
Stereotype stereotype, ILeaf entity, Style style) {
|
||||
super(align, UseStyle.useBetaStyle() == false ? new FontConfiguration(skinParam, fontParam, stereotype)
|
||||
super(align, UseStyle.useBetaStyle() == false ? FontConfiguration.create(skinParam, fontParam, stereotype)
|
||||
: style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), style);
|
||||
this.style = style;
|
||||
this.rawBody2 = Display.create(rawBody);
|
||||
@ -93,7 +93,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi
|
||||
|
||||
BodyEnhanced1(HorizontalAlignment align, Display display, FontParam fontParam, ISkinParam skinParam,
|
||||
Stereotype stereotype, ILeaf entity, Style style) {
|
||||
super(align, style == null ? new FontConfiguration(skinParam, fontParam, stereotype)
|
||||
super(align, style == null ? FontConfiguration.create(skinParam, fontParam, stereotype)
|
||||
: style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), style);
|
||||
|
||||
this.style = style;
|
||||
|
@ -93,7 +93,7 @@ public class LinkConstraint {
|
||||
ug = ug.apply(new UStroke(3, 3, 1));
|
||||
ug.apply(new UTranslate(x1, y1)).draw(line);
|
||||
|
||||
final TextBlock label = display.create(new FontConfiguration(skinParam, FontParam.ARROW, null),
|
||||
final TextBlock label = display.create(FontConfiguration.create(skinParam, FontParam.ARROW, null),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
final Dimension2D dimLabel = label.calculateDimension(ug.getStringBounder());
|
||||
final double x = (x1 + x2) / 2 - dimLabel.getWidth() / 2;
|
||||
|
@ -182,9 +182,9 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlock,
|
||||
|
||||
FontConfiguration config;
|
||||
if (style != null)
|
||||
config = new FontConfiguration(skinParam, style);
|
||||
config = FontConfiguration.create(skinParam, style);
|
||||
else
|
||||
config = new FontConfiguration(skinParam, fontParam, stereotype);
|
||||
config = FontConfiguration.create(skinParam, fontParam, stereotype);
|
||||
|
||||
if (cs instanceof Member) {
|
||||
final Member m = (Member) cs;
|
||||
|
@ -226,7 +226,7 @@ public class TextBlockCucaJSon extends AbstractTextBlock implements WithPorts {
|
||||
|
||||
private FontConfiguration getFontConfiguration() {
|
||||
if (fontConfiguration == null)
|
||||
return new FontConfiguration(skinParam, fontParam, null);
|
||||
return FontConfiguration.create(skinParam, fontParam, null);
|
||||
return fontConfiguration;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ public class TextBlockMap extends AbstractTextBlock implements WithPorts {
|
||||
|
||||
private FontConfiguration getFontConfiguration() {
|
||||
if (fontConfiguration == null)
|
||||
return new FontConfiguration(skinParam, fontParam, null);
|
||||
return FontConfiguration.create(skinParam, fontParam, null);
|
||||
return fontConfiguration;
|
||||
}
|
||||
|
||||
|
@ -676,7 +676,7 @@ final public class EntityImpl implements ILeaf, IGroup {
|
||||
final FontParam fontParam = getTitleFontParam();
|
||||
final HColor fontHtmlColor = skinParam.getFontHtmlColor(getStereotype(), fontParam, FontParam.PACKAGE);
|
||||
final UFont font = skinParam.getFont(getStereotype(), true, fontParam, FontParam.PACKAGE);
|
||||
final FontConfiguration fontConfiguration = new FontConfiguration(font, fontHtmlColor,
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(font, fontHtmlColor,
|
||||
skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
return fontConfiguration;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class PSystemDefinition extends PlainDiagram implements UDrawable {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
final UFont font = UFont.sansSerif(14);
|
||||
final FontConfiguration fc = new FontConfiguration(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
final FontConfiguration fc = FontConfiguration.create(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
Display.getWithNewlines(startLine).create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()).drawU(ug);
|
||||
}
|
||||
|
||||
|
@ -73,13 +73,13 @@ public class EntityImageDesignedDomain extends AbstractEntityImage {
|
||||
super(entity, skinParam);
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
this.name = TextBlockUtils.withMargin(
|
||||
entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.DESIGNED_DOMAIN, stereotype),
|
||||
entity.getDisplay().create(FontConfiguration.create(getSkinParam(), FontParam.DESIGNED_DOMAIN, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam), 2, 2);
|
||||
if (stereotype == null || stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR) == null) {
|
||||
this.stereo = null;
|
||||
} else {
|
||||
this.stereo = Display.create(stereotype.getLabels(skinParam.guillemet())).create(
|
||||
new FontConfiguration(getSkinParam(), FontParam.DESIGNED_DOMAIN_STEREOTYPE, stereotype),
|
||||
FontConfiguration.create(getSkinParam(), FontParam.DESIGNED_DOMAIN_STEREOTYPE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
}
|
||||
this.url = entity.getUrl99();
|
||||
|
@ -74,14 +74,14 @@ public class EntityImageDomain extends AbstractEntityImage {
|
||||
public EntityImageDomain(ILeaf entity, ISkinParam skinParam, char typeLetter) {
|
||||
super(entity, skinParam);
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
FontConfiguration fc = new FontConfiguration(getSkinParam(), FontParam.DESIGNED_DOMAIN, stereotype);
|
||||
FontConfiguration fc = FontConfiguration.create(getSkinParam(), FontParam.DESIGNED_DOMAIN, stereotype);
|
||||
this.name = TextBlockUtils.withMargin(entity.getDisplay().create(fc, HorizontalAlignment.CENTER, skinParam), 2,
|
||||
2);
|
||||
if (stereotype == null || stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR) == null) {
|
||||
this.stereo = null;
|
||||
} else {
|
||||
this.stereo = Display.create(stereotype.getLabels(skinParam.guillemet())).create(
|
||||
new FontConfiguration(getSkinParam(), FontParam.DESIGNED_DOMAIN_STEREOTYPE, stereotype),
|
||||
FontConfiguration.create(getSkinParam(), FontParam.DESIGNED_DOMAIN_STEREOTYPE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
}
|
||||
this.tag = new BoxedCharacter(typeLetter, 8, UFont.byDefault(8), stereotype.getHtmlColor(), null, fc.getColor());
|
||||
|
@ -73,13 +73,13 @@ public class EntityImageMachine extends AbstractEntityImage {
|
||||
super(entity, skinParam);
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
this.name = TextBlockUtils.withMargin(
|
||||
entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.MACHINE, stereotype),
|
||||
entity.getDisplay().create(FontConfiguration.create(getSkinParam(), FontParam.MACHINE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam), 2, 2);
|
||||
if (stereotype == null || stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR) == null) {
|
||||
this.stereo = null;
|
||||
} else {
|
||||
this.stereo = Display.create(stereotype.getLabels(skinParam.guillemet())).create(
|
||||
new FontConfiguration(getSkinParam(), FontParam.MACHINE_STEREOTYPE, stereotype),
|
||||
FontConfiguration.create(getSkinParam(), FontParam.MACHINE_STEREOTYPE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
}
|
||||
this.url = entity.getUrl99();
|
||||
|
@ -84,7 +84,7 @@ public class EntityImageRequirement extends AbstractEntityImage {
|
||||
this.desc = tmp;
|
||||
} else {
|
||||
final TextBlock stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().guillemet())).create(
|
||||
new FontConfiguration(getSkinParam(), FontParam.REQUIREMENT_STEREOTYPE, stereotype),
|
||||
FontConfiguration.create(getSkinParam(), FontParam.REQUIREMENT_STEREOTYPE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
this.desc = TextBlockUtils.mergeTB(stereo, tmp, HorizontalAlignment.CENTER);
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ public class PSystemColors extends PlainDiagram implements UDrawable {
|
||||
|
||||
private TextBlock getTextName(final UFont font, String name, final HColorSimple color) {
|
||||
final HColorSimple opposite = color.opposite();
|
||||
final FontConfiguration fc = new FontConfiguration(font, opposite, HColorUtils.BLUE, true);
|
||||
final FontConfiguration fc = FontConfiguration.create(font, opposite, HColorUtils.BLUE, true);
|
||||
final TextBlock tt = Display.getWithNewlines(name).create(fc, HorizontalAlignment.CENTER,
|
||||
new SpriteContainerEmpty());
|
||||
return tt;
|
||||
|
@ -166,7 +166,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
||||
return null;
|
||||
}
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
final FontConfiguration labelFont = new FontConfiguration(skinParam, FontParam.ARROW, null);
|
||||
final FontConfiguration labelFont = FontConfiguration.create(skinParam, FontParam.ARROW, null);
|
||||
final TextBlock label = link.getLabel().create(labelFont,
|
||||
skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam);
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder)) {
|
||||
@ -181,7 +181,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
||||
return null;
|
||||
}
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
final FontConfiguration labelFont = new FontConfiguration(skinParam, FontParam.ARROW, null);
|
||||
final FontConfiguration labelFont = FontConfiguration.create(skinParam, FontParam.ARROW, null);
|
||||
final TextBlock label = Display.getWithNewlines(tmp).create(labelFont,
|
||||
skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam);
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder)) {
|
||||
|
@ -353,7 +353,7 @@ public abstract class PSystemError extends PlainDiagram {
|
||||
"Details on <i>[[https://plantuml.com/dedication]]");
|
||||
|
||||
final UFont font = UFont.sansSerif(14);
|
||||
final FontConfiguration fc = new FontConfiguration(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
final FontConfiguration fc = FontConfiguration.create(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
final TextBlock text = TextBlockUtils
|
||||
.withMargin(disp.create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()), 10, 0);
|
||||
final TextBlock result;
|
||||
@ -374,7 +374,7 @@ public abstract class PSystemError extends PlainDiagram {
|
||||
"Details on <i>[[http://plantuml.com/adopt]]", " ");
|
||||
|
||||
final UFont font = UFont.sansSerif(14);
|
||||
final FontConfiguration fc = new FontConfiguration(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
final FontConfiguration fc = FontConfiguration.create(font, HColorUtils.BLACK, HColorUtils.BLACK, false);
|
||||
final TextBlock text = TextBlockUtils
|
||||
.withMargin(disp.create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()), 10, 0);
|
||||
final TextBlock result;
|
||||
|
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.core.UmlSource;
|
||||
public class PSystemErrorPreprocessor extends PSystemError {
|
||||
|
||||
public PSystemErrorPreprocessor(List<StringLocated> input, List<StringLocated> trace) {
|
||||
super(new UmlSource(input, DiagramType.getTypeFromArobaseStart(input.get(0).getString()) == DiagramType.UML));
|
||||
super(UmlSource.create(input, DiagramType.getTypeFromArobaseStart(input.get(0).getString()) == DiagramType.UML));
|
||||
this.trace = trace;
|
||||
this.singleError = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, getLastLine().getPreprocessorError(), 0,
|
||||
getLastLine().getLocation());
|
||||
|
@ -91,7 +91,7 @@ public class FlowDiagram extends UmlDiagram implements TextBlock {
|
||||
}
|
||||
|
||||
public FlowDiagram(ThemeStyle style, UmlSource source) {
|
||||
super(style, source, UmlDiagramType.FLOW);
|
||||
super(style, source, UmlDiagramType.FLOW, null);
|
||||
}
|
||||
|
||||
public void lineSimple(TileGeometry orientation, String idDest, String label) {
|
||||
|
@ -59,7 +59,7 @@ public class GitDiagram extends UmlDiagram {
|
||||
private final Collection<GNode> gnodes;
|
||||
|
||||
public GitDiagram(ThemeStyle style, UmlSource source, GitTextArea textArea) {
|
||||
super(style, source, UmlDiagramType.GIT);
|
||||
super(style, source, UmlDiagramType.GIT, null);
|
||||
this.gnodes = new GNodeBuilder(textArea.getAllCommits()).getAllNodes();
|
||||
new GNodeBuilder(textArea.getAllCommits());
|
||||
}
|
||||
|
@ -70,13 +70,13 @@ public class MagicBox {
|
||||
}
|
||||
|
||||
private TextBlock getSmallBlock() {
|
||||
final FontConfiguration fc = new FontConfiguration(UFont.monospaced(15).bold(), fontColor, fontColor, false);
|
||||
final FontConfiguration fc = FontConfiguration.create(UFont.monospaced(15).bold(), fontColor, fontColor, false);
|
||||
return node.getDisplay().create(fc, HorizontalAlignment.CENTER, skinParam);
|
||||
}
|
||||
|
||||
private TextBlock getCommentBlock() {
|
||||
if (node.getComment() != null && node.isTop()) {
|
||||
final FontConfiguration tag = new FontConfiguration(UFont.sansSerif(13), fontColor, fontColor, false);
|
||||
final FontConfiguration tag = FontConfiguration.create(UFont.sansSerif(13), fontColor, fontColor, false);
|
||||
return Display.create(node.getComment()).create(tag, HorizontalAlignment.CENTER, skinParam);
|
||||
}
|
||||
return TextBlockUtils.empty(0, 0);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user