mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 02:49:06 +00:00
Merge branch 'wip'
This commit is contained in:
commit
12b33f3202
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.graphic.USymbols;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.DecorateEntityImage;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
@ -103,7 +103,7 @@ public class AnnotatedWorker {
|
||||
final UStroke stroke;
|
||||
final HColor borderColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.frame)
|
||||
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);
|
||||
@ -189,7 +189,7 @@ public class AnnotatedWorker {
|
||||
return TextBlockUtils.empty(0, 0);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.caption)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.caption)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return style.createTextBlockBordered(caption.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
}
|
||||
@ -204,7 +204,7 @@ public class AnnotatedWorker {
|
||||
|
||||
final TextBlock block;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.title)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
block = style.createTextBlockBordered(title.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
} else {
|
||||
@ -226,7 +226,7 @@ public class AnnotatedWorker {
|
||||
if (footer.isNull() == false) {
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = StyleSignature.of(SName.root, SName.document, SName.footer)
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.footer)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
textFooter = footer.createRibbon(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null),
|
||||
@ -236,7 +236,7 @@ public class AnnotatedWorker {
|
||||
if (header.isNull() == false) {
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = StyleSignature.of(SName.root, SName.document, SName.header)
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.header)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
textHeader = header.createRibbon(new FontConfiguration(getSkinParam(), FontParam.HEADER, null),
|
||||
|
@ -39,7 +39,7 @@ import java.awt.Font;
|
||||
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
|
||||
interface FontParamConstant {
|
||||
String FAMILY = "SansSerif";
|
||||
@ -187,23 +187,23 @@ public enum FontParam {
|
||||
return new FontConfiguration(skinParam, this, null);
|
||||
}
|
||||
|
||||
public StyleSignature getStyleDefinition(SName diagramType) {
|
||||
public StyleSignatureBasic getStyleDefinition(SName diagramType) {
|
||||
if (this == FOOTER) {
|
||||
return StyleSignature.of(SName.root, SName.document, SName.footer);
|
||||
return StyleSignatureBasic.of(SName.root, SName.document, SName.footer);
|
||||
}
|
||||
if (this == HEADER) {
|
||||
return StyleSignature.of(SName.root, SName.document, SName.header);
|
||||
return StyleSignatureBasic.of(SName.root, SName.document, SName.header);
|
||||
}
|
||||
if (this == TITLE) {
|
||||
return StyleSignature.of(SName.root, SName.document, SName.title);
|
||||
return StyleSignatureBasic.of(SName.root, SName.document, SName.title);
|
||||
}
|
||||
if (this == CLASS_ATTRIBUTE) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.classDiagram, SName.class_);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.classDiagram, SName.class_);
|
||||
}
|
||||
if (this == RECTANGLE || this == NODE) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.componentDiagram, SName.component);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.componentDiagram, SName.component);
|
||||
}
|
||||
return StyleSignature.of(SName.root, SName.element, diagramType, SName.component);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, diagramType, SName.component);
|
||||
// System.err.println("Warning " + this);
|
||||
// throw new UnsupportedOperationException();
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleLoader;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
@ -274,7 +274,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
|
||||
public HColor calculateBackColor() {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.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(),
|
||||
|
@ -63,7 +63,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class Branch {
|
||||
@ -82,12 +82,12 @@ public class Branch {
|
||||
private Ftile ftile;
|
||||
private Gtile gtile;
|
||||
|
||||
public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
public boolean containsBreak() {
|
||||
|
@ -57,7 +57,7 @@ import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
||||
@ -119,10 +119,10 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
|
||||
return ColorParser.simpleColor(ColorType.BACK, id);
|
||||
}
|
||||
|
||||
private StyleSignature getDefaultStyleDefinitionPartition(USymbol symbol) {
|
||||
private StyleSignatureBasic getDefaultStyleDefinitionPartition(USymbol symbol) {
|
||||
if (symbol == USymbols.RECTANGLE)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.rectangle);
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.rectangle);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -145,7 +145,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
|
||||
double roundCorner;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style stylePartition = getDefaultStyleDefinitionPartition(symbol).with(stereotype)
|
||||
final Style stylePartition = getDefaultStyleDefinitionPartition(symbol).withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
borderColor = stylePartition.value(PName.LineColor).asColor(diagram.getSkinParam().getThemeStyle(),
|
||||
diagram.getSkinParam().getIHtmlColorSet());
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -57,7 +57,7 @@ public class EntityImageLegend {
|
||||
public static TextBlock create(Display note, ISkinParam skinParam) {
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.root, SName.document,
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.root, SName.document,
|
||||
skinParam.getUmlDiagramType().getStyleName(), SName.legend)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return style.createTextBlockBordered(note, skinParam.getIHtmlColorSet(), skinParam);
|
||||
|
@ -61,7 +61,7 @@ import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class FtileFactoryDelegator implements FtileFactory {
|
||||
@ -70,16 +70,16 @@ public class FtileFactoryDelegator implements FtileFactory {
|
||||
|
||||
private final Rose rose = new Rose();
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
protected final Rainbow getInLinkRenderingColor(Ftile tile) {
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
@ -73,8 +73,8 @@ public class LaneDivider extends AbstractTextBlock {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public StyleSignature getDefaultStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.swimlane);
|
||||
public StyleSignatureBasic getDefaultStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.swimlane);
|
||||
}
|
||||
|
||||
private Style getStyle() {
|
||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.VerticalAlignment;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
||||
@ -148,19 +148,19 @@ public class Snake implements UShape {
|
||||
}
|
||||
|
||||
public static Snake create(ISkinParam skinParam, Rainbow color) {
|
||||
final Style style = StyleSignature.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style style = StyleSignatureBasic.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new Snake(skinParam, null, color, null, new Worm(style), MergeStrategy.FULL, null,
|
||||
new ArrayList<Text>());
|
||||
}
|
||||
|
||||
public static Snake create(ISkinParam skinParam, Rainbow color, UPolygon endDecoration) {
|
||||
final Style style = StyleSignature.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style style = StyleSignatureBasic.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new Snake(skinParam, null, color, endDecoration, new Worm(style), MergeStrategy.FULL, null,
|
||||
new ArrayList<Text>());
|
||||
}
|
||||
|
||||
public static Snake create(ISkinParam skinParam, UPolygon startDecoration, Rainbow color, UPolygon endDecoration) {
|
||||
final Style style = StyleSignature.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style style = StyleSignatureBasic.activityArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new Snake(skinParam, startDecoration, color, endDecoration, new Worm(style), MergeStrategy.FULL, null,
|
||||
new ArrayList<Text>());
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||
@ -120,8 +120,8 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
||||
return Collections.unmodifiableList(swimlanesSpecial);
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.swimlane);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.swimlane);
|
||||
}
|
||||
|
||||
public Swimlanes(ISkinParam skinParam, Pragma pragma) {
|
||||
|
@ -50,7 +50,7 @@ import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
|
||||
public abstract class AbstractParallelFtilesBuilder {
|
||||
|
||||
@ -67,12 +67,12 @@ public abstract class AbstractParallelFtilesBuilder {
|
||||
private final StringBounder stringBounder;
|
||||
protected final List<Ftile> list99 = new ArrayList<>();
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final public StyleSignature getStyleSignatureArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getStyleSignatureArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
public AbstractParallelFtilesBuilder(ISkinParam skinParam, StringBounder stringBounder, List<Ftile> all) {
|
||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -79,7 +79,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
|
||||
final LineBreakStrategy wrapWidth;
|
||||
final double shadowing;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
wrapWidth = style.wrapWidth();
|
||||
fc = new FontConfiguration(skinParam, style);
|
||||
|
@ -62,7 +62,7 @@ import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
@ -87,8 +87,8 @@ public class FtileGroup extends AbstractFtile {
|
||||
private final USymbol type;
|
||||
private final double roundCorner;
|
||||
|
||||
final public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
final public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
}
|
||||
|
||||
public FtileGroup(Ftile inner, Display title, Display displayNote, HColor arrowColor, HColor backColor,
|
||||
|
@ -73,7 +73,7 @@ import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.ConditionStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -126,7 +126,7 @@ class FtileIfAndStop extends AbstractFtile {
|
||||
final UStroke thickness;
|
||||
final FontConfiguration fcTest;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.activityDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style style = StyleSignatureBasic.activityDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
thickness = tileNonStop.getThickness(style);
|
||||
fcTest = new FontConfiguration(skinParam, style);
|
||||
} else {
|
||||
|
@ -64,7 +64,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -77,8 +77,8 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable
|
||||
private final boolean withOutPoint;
|
||||
private final Swimlane swimlane;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -88,8 +88,8 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
||||
private final double suppSpace = 20;
|
||||
private final Swimlane swimlaneNote;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
}
|
||||
|
||||
public Set<Swimlane> getSwimlanes() {
|
||||
|
@ -66,7 +66,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -83,8 +83,8 @@ public class FtileWithNotes extends AbstractFtile {
|
||||
|
||||
private final double suppSpace = 20;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
}
|
||||
|
||||
public Set<Swimlane> getSwimlanes() {
|
||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -70,8 +70,8 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
||||
}
|
||||
|
||||
@Override
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -94,20 +94,20 @@ public class VCompactFactory implements FtileFactory {
|
||||
this.stringBounder = stringBounder;
|
||||
}
|
||||
|
||||
private StyleSignature getSignatureCircleEnd() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.end);
|
||||
private StyleSignatureBasic getSignatureCircleEnd() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.end);
|
||||
}
|
||||
|
||||
private StyleSignature getSignatureCircleStop() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.stop);
|
||||
private StyleSignatureBasic getSignatureCircleStop() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.stop);
|
||||
}
|
||||
|
||||
private StyleSignature getSignatureCircleSpot() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.spot);
|
||||
private StyleSignatureBasic getSignatureCircleSpot() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.spot);
|
||||
}
|
||||
|
||||
private StyleSignature getSignatureCircleStart() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.start);
|
||||
private StyleSignatureBasic getSignatureCircleStart() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle, SName.start);
|
||||
}
|
||||
|
||||
public Ftile start(Swimlane swimlane) {
|
||||
|
@ -68,7 +68,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.ConditionEndStyle;
|
||||
import net.sourceforge.plantuml.svek.ConditionStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -96,12 +96,12 @@ public class ConditionalBuilder {
|
||||
private final Ftile tile2;
|
||||
private final Url url;
|
||||
|
||||
private StyleSignature getStyleSignatureDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
private StyleSignatureBasic getStyleSignatureDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
private StyleSignature getStyleSignatureArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
private StyleSignatureBasic getStyleSignatureArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
public ConditionalBuilder(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -93,8 +93,8 @@ public class FtileBlackBlock extends AbstractFtile {
|
||||
return new FtileGeometry(width + supp, height, width / 2, 0, height);
|
||||
}
|
||||
|
||||
private StyleSignature getSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activityBar);
|
||||
private StyleSignatureBasic getSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activityBar);
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
|
@ -73,7 +73,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -99,12 +99,12 @@ public class FtileBox extends AbstractFtile {
|
||||
private final HColor backColor;
|
||||
private final Style style;
|
||||
|
||||
static public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
static public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
static public StyleSignature getStyleSignatureArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
static public StyleSignatureBasic getStyleSignatureArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
final public LinkRendering getInLinkRendering() {
|
||||
@ -144,7 +144,7 @@ public class FtileBox extends AbstractFtile {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getStyleSignature().with(stereotype)
|
||||
style = getStyleSignature().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getStyleSignatureArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -100,12 +100,12 @@ public class FtileBox2 extends AbstractFtile {
|
||||
private final HColor backColor;
|
||||
private final Style style;
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
final public LinkRendering getInLinkRendering() {
|
||||
@ -145,7 +145,7 @@ public class FtileBox2 extends AbstractFtile {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().with(stereotype)
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -99,12 +99,12 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
private final HColor backColor;
|
||||
private final Style style;
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
final public LinkRendering getInLinkRendering() {
|
||||
@ -144,7 +144,7 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().with(stereotype)
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
@ -152,7 +152,7 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
}
|
||||
|
||||
public static TextBlock createWbs(StyleBuilder styleBuilder, ISkinParam skinParam, Display label,
|
||||
StyleSignature styleDefinition) {
|
||||
StyleSignatureBasic styleDefinition) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
@ -171,7 +171,7 @@ public class FtileBoxOld extends AbstractFtile {
|
||||
}
|
||||
|
||||
public static TextBlock createMindMap(StyleBuilder styleBuilder, ISkinParam skinParam, Display label,
|
||||
StyleSignature styleDefinition) {
|
||||
StyleSignatureBasic styleDefinition) {
|
||||
final Style style = styleDefinition.getMergedStyle(styleBuilder);
|
||||
final Style styleArrow = style;
|
||||
return new FtileBoxOld(skinParam, label, null, BoxStyle.PLAIN, style, styleArrow);
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -67,8 +67,8 @@ abstract class FtileDiamondWIP extends AbstractFtile implements Styleable {
|
||||
|
||||
protected final double shadowing;
|
||||
|
||||
final public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public Style getStyle() {
|
||||
|
@ -44,7 +44,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
@ -87,8 +87,8 @@ public abstract class GAbstractConnection implements GConnection {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private final StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
private final StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
protected ISkinParam skinParam() {
|
||||
|
@ -52,7 +52,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
public class GtileAssembly extends GtileTopDown {
|
||||
@ -71,8 +71,8 @@ public class GtileAssembly extends GtileTopDown {
|
||||
return new UTranslate(0, height);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -94,12 +94,12 @@ public class GtileBox extends AbstractGtile {
|
||||
private final HColor backColor;
|
||||
private final Style style;
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
static public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
static public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
final public LinkRendering getInLinkRendering() {
|
||||
@ -124,7 +124,7 @@ public class GtileBox extends AbstractGtile {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().with(stereotype)
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
|
||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
@ -66,8 +66,8 @@ public class GtileCircleSpot extends AbstractGtile {
|
||||
private final HColor backColor;
|
||||
private double shadowing;
|
||||
|
||||
private StyleSignature getDefaultStyleDefinitionCircle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
private StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
}
|
||||
|
||||
public GtileCircleSpot(StringBounder stringBounder, ISkinParam skinParam, HColor backColor, Swimlane swimlane,
|
||||
|
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -58,8 +58,8 @@ public class GtileCircleStart extends AbstractGtile {
|
||||
private final HColor backColor;
|
||||
private double shadowing;
|
||||
|
||||
private StyleSignature getDefaultStyleDefinitionCircle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
private StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
}
|
||||
|
||||
public GtileCircleStart(StringBounder stringBounder, ISkinParam skinParam, HColor backColor, Swimlane swimlane) {
|
||||
|
@ -60,7 +60,7 @@ import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -82,8 +82,8 @@ public class GtileGroup extends AbstractGtileRoot {
|
||||
private final USymbol type;
|
||||
private final double roundCorner;
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionPartition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionPartition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
|
||||
}
|
||||
|
||||
private double suppWidth(StringBounder stringBounder) {
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -63,8 +63,8 @@ public class GtileHexagonInside extends AbstractGtile {
|
||||
|
||||
protected final double shadowing;
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
// FtileDiamondInside
|
||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class GtileIfAlone extends GtileTopDown3 {
|
||||
@ -74,16 +74,16 @@ public class GtileIfAlone extends GtileTopDown3 {
|
||||
return Gtiles.withNorthMargin(tmp, 20);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final static public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final static public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
@ -177,16 +177,16 @@ public class GtileIfHexagon extends GtileColumns {
|
||||
return Dimension2DDouble.delta(nude, 0, height2 + 30);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -83,16 +83,16 @@ public class GtileRepeat extends GtileTopDown3 {
|
||||
return Gtiles.withNorthMargin(tmp, 20);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final static public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final static public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -59,16 +59,16 @@ public class GtileSplit extends GtileColumns {
|
||||
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
final static public StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
final static public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
|
||||
public class GtileWhile extends GtileTopDown3 {
|
||||
@ -52,8 +52,8 @@ public class GtileWhile extends GtileTopDown3 {
|
||||
super(tile1, tile2, tile3);
|
||||
}
|
||||
|
||||
private static StyleSignature getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
private static StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
private static Gtile getShape1(Gtile toto, Swimlane swimlane, Display test, Display yes) {
|
||||
|
@ -63,7 +63,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -86,8 +86,8 @@ public class GtileWithNoteOpale extends AbstractGtile implements Stencil, Stylea
|
||||
private final Dimension2D dimNote;
|
||||
private final Dimension2D dimTile;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,7 +63,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -80,8 +80,8 @@ public class GtileWithNotes extends AbstractGtile {
|
||||
|
||||
private final double suppSpace = 20;
|
||||
|
||||
public StyleSignature getDefaultStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
public StyleSignatureBasic getDefaultStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,7 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.ConditionStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -66,7 +66,7 @@ public class Gtiles {
|
||||
private static final Rose rose = new Rose();
|
||||
|
||||
static public GtileHexagonInside hexagonInside(Swimlane swimlane, StringBounder stringBounder, ISkinParam skinParam,
|
||||
StyleSignature styleSignature, HColor color, Display label) {
|
||||
StyleSignatureBasic styleSignature, HColor color, Display label) {
|
||||
final ConditionStyle conditionStyle = skinParam.getConditionStyle();
|
||||
|
||||
final HColor borderColor;
|
||||
@ -99,7 +99,7 @@ public class Gtiles {
|
||||
}
|
||||
|
||||
static public AbstractGtileRoot diamondEmpty(Swimlane swimlane, StringBounder stringBounder, ISkinParam skinParam,
|
||||
StyleSignature styleSignature, HColor color) {
|
||||
StyleSignatureBasic styleSignature, HColor color) {
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
|
||||
|
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.skin.Component;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
|
||||
public abstract class AbstractComponentText implements Component {
|
||||
|
||||
@ -55,7 +55,7 @@ public abstract class AbstractComponentText implements Component {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -142,8 +142,8 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz
|
||||
}
|
||||
}
|
||||
|
||||
private StyleSignature getSignatureCircle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
private StyleSignatureBasic getSignatureCircle() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.circle);
|
||||
}
|
||||
|
||||
private Style getStyle(ISkinParam skinParam) {
|
||||
|
@ -80,6 +80,7 @@ import net.sourceforge.plantuml.descdiagram.command.CommandNewpage;
|
||||
import net.sourceforge.plantuml.descdiagram.command.CommandPackageWithUSymbol;
|
||||
import net.sourceforge.plantuml.objectdiagram.command.CommandCreateEntityObject;
|
||||
import net.sourceforge.plantuml.objectdiagram.command.CommandCreateEntityObjectMultilines;
|
||||
import net.sourceforge.plantuml.objectdiagram.command.CommandCreateJson;
|
||||
import net.sourceforge.plantuml.objectdiagram.command.CommandCreateMap;
|
||||
|
||||
public class ClassDiagramFactory extends PSystemCommandFactory {
|
||||
@ -106,6 +107,7 @@ public class ClassDiagramFactory extends PSystemCommandFactory {
|
||||
cmds.add(new CommandCreateClassMultilines());
|
||||
cmds.add(new CommandCreateEntityObjectMultilines());
|
||||
cmds.add(new CommandCreateMap());
|
||||
cmds.add(new CommandCreateJson());
|
||||
cmds.add(new CommandCreateClass());
|
||||
cmds.add(new CommandCreateEntityObject());
|
||||
|
||||
|
103
src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java
Normal file
103
src/net/sourceforge/plantuml/cucadiagram/BodierJSon.java
Normal file
@ -0,0 +1,103 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2020, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
||||
|
||||
public class BodierJSon implements Bodier {
|
||||
|
||||
private ILeaf leaf;
|
||||
private JsonValue json;
|
||||
|
||||
@Override
|
||||
public void muteClassToObject() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public BodierJSon() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLeaf(ILeaf leaf) {
|
||||
this.leaf = Objects.requireNonNull(leaf);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Display getMethodsToDisplay() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Display getFieldsToDisplay() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasUrl() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextBlock getBody(FontParam fontParam, ISkinParam skinParam, final boolean showMethods,
|
||||
final boolean showFields, Stereotype stereotype, Style style, FontConfiguration fontConfiguration) {
|
||||
return new TextBlockCucaJSon(fontConfiguration, fontParam, skinParam, json);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CharSequence> getRawBody() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFieldOrMethod(String s) throws NoSuchColorException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void setJson(JsonValue json) {
|
||||
this.json = json;
|
||||
}
|
||||
|
||||
}
|
@ -42,7 +42,7 @@ public enum LeafType {
|
||||
|
||||
EMPTY_PACKAGE,
|
||||
|
||||
ABSTRACT_CLASS, CLASS, INTERFACE, ANNOTATION, LOLLIPOP_FULL, LOLLIPOP_HALF, NOTE, TIPS, OBJECT, MAP, ASSOCIATION,
|
||||
ABSTRACT_CLASS, CLASS, INTERFACE, ANNOTATION, LOLLIPOP_FULL, LOLLIPOP_HALF, NOTE, TIPS, OBJECT, MAP, JSON, ASSOCIATION,
|
||||
ENUM, CIRCLE,
|
||||
|
||||
USECASE, USECASE_BUSINESS,
|
||||
|
237
src/net/sourceforge/plantuml/cucadiagram/TextBlockCucaJSon.java
Normal file
237
src/net/sourceforge/plantuml/cucadiagram/TextBlockCucaJSon.java
Normal file
@ -0,0 +1,237 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2020, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.json.JsonArray;
|
||||
import net.sourceforge.plantuml.json.JsonObject;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.svek.Ports;
|
||||
import net.sourceforge.plantuml.svek.WithPorts;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
public class TextBlockCucaJSon extends AbstractTextBlock implements WithPorts {
|
||||
|
||||
private final FontParam fontParam;
|
||||
private final ISkinParam skinParam;
|
||||
private final FontConfiguration fontConfiguration;
|
||||
private final JsonValue json;
|
||||
private TextBlockJson jsonTextBlock;
|
||||
private double totalWidth;
|
||||
|
||||
public TextBlockCucaJSon(FontConfiguration fontConfiguration, FontParam fontParam, ISkinParam skinParam,
|
||||
JsonValue json) {
|
||||
this.fontParam = fontParam;
|
||||
this.skinParam = skinParam;
|
||||
this.json = json;
|
||||
this.fontConfiguration = fontConfiguration;
|
||||
}
|
||||
|
||||
private TextBlockJson getJsonTextBlock() {
|
||||
if (jsonTextBlock == null)
|
||||
this.jsonTextBlock = new TextBlockJson(json, 0);
|
||||
|
||||
jsonTextBlock.totalWidth = totalWidth;
|
||||
return jsonTextBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ports getPorts(StringBounder stringBounder) {
|
||||
return new Ports();
|
||||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return getJsonTextBlock().calculateDimension(stringBounder);
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
getJsonTextBlock().drawU(ug);
|
||||
}
|
||||
|
||||
class TextBlockJson extends AbstractTextBlock {
|
||||
|
||||
private final JsonObject obj;
|
||||
private double totalWidth;
|
||||
|
||||
public TextBlockJson(JsonValue json, double totalWidth) {
|
||||
this.obj = json.asObject();
|
||||
this.totalWidth = totalWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return new Dimension2DDouble(getWidth1(stringBounder) + getWidth2(stringBounder), getHeight(stringBounder));
|
||||
}
|
||||
|
||||
private double getWidth1(StringBounder stringBounder) {
|
||||
double result = 0;
|
||||
for (JsonObject.Member s : obj) {
|
||||
final TextBlock tb1 = getTextBlockKey(s.getName());
|
||||
result = Math.max(result, tb1.calculateDimension(stringBounder).getWidth());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private double getWidth2(StringBounder stringBounder) {
|
||||
double result = 0;
|
||||
for (JsonObject.Member s : obj) {
|
||||
final TextBlock tb2 = getTextBlockValue(s.getValue(), totalWidth);
|
||||
result = Math.max(result, tb2.calculateDimension(stringBounder).getWidth());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private double getHeight(StringBounder stringBounder) {
|
||||
double result = 0;
|
||||
for (JsonObject.Member s : obj) {
|
||||
final TextBlock tb1 = getTextBlockKey(s.getName());
|
||||
final TextBlock tb2 = getTextBlockValue(s.getValue(), totalWidth);
|
||||
final Dimension2D dim1 = tb1.calculateDimension(stringBounder);
|
||||
final Dimension2D dim2 = tb2.calculateDimension(stringBounder);
|
||||
result += Math.max(dim1.getHeight(), dim2.getHeight());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawU(UGraphic ug) {
|
||||
final StringBounder stringBounder = ug.getStringBounder();
|
||||
final double width1 = getWidth1(stringBounder);
|
||||
final double width2 = getWidth2(stringBounder);
|
||||
final double height = getHeight(stringBounder);
|
||||
ug.apply(UTranslate.dx(width1)).draw(ULine.vline(height));
|
||||
final ULine hline = ULine.hline(this.totalWidth);
|
||||
for (JsonObject.Member s : obj) {
|
||||
final TextBlock tb1 = getTextBlockKey(s.getName());
|
||||
final TextBlock tb2 = getTextBlockValue(s.getValue(), width2);
|
||||
final Dimension2D dim1 = tb1.calculateDimension(stringBounder);
|
||||
final Dimension2D dim2 = tb2.calculateDimension(stringBounder);
|
||||
ug.draw(hline);
|
||||
tb1.drawU(ug);
|
||||
tb2.drawU(ug.apply(UTranslate.dx(width1)));
|
||||
ug = ug.apply(UTranslate.dy(Math.max(dim1.getHeight(), dim2.getHeight())));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private TextBlock getTextBlockValue(JsonValue value, double width2) {
|
||||
if (value.isString() || value.isNull() || value.isTrue() || value.isFalse() || value.isNumber()) {
|
||||
final String tmp = value.isString() ? value.asString() : value.toString();
|
||||
final Display display = Display.getWithNewlines(tmp);
|
||||
TextBlock result = display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam);
|
||||
result = TextBlockUtils.withMargin(result, 5, 2);
|
||||
return result;
|
||||
}
|
||||
if (value.isArray())
|
||||
return new TextBlockArray(value.asArray(), width2);
|
||||
if (value.isObject())
|
||||
return new TextBlockJson(value, width2);
|
||||
|
||||
final String tmp = value.getClass().getSimpleName();
|
||||
final Display display = Display.getWithNewlines(tmp);
|
||||
TextBlock result = display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam);
|
||||
result = TextBlockUtils.withMargin(result, 5, 2);
|
||||
return result;
|
||||
}
|
||||
|
||||
class TextBlockArray extends AbstractTextBlock {
|
||||
|
||||
private final JsonArray array;
|
||||
private final double totalWidth;
|
||||
|
||||
public TextBlockArray(JsonArray array, double totalWidth) {
|
||||
this.array = array;
|
||||
this.totalWidth = totalWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
Dimension2D result = new Dimension2DDouble(0, 0);
|
||||
for (JsonValue element : array) {
|
||||
final TextBlock tb = getTextBlockValue(element, totalWidth);
|
||||
final Dimension2D dim = tb.calculateDimension(stringBounder);
|
||||
result = Dimension2DDouble.mergeTB(result, dim);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawU(UGraphic ug) {
|
||||
final ULine hline = ULine.hline(this.totalWidth);
|
||||
int nb = 0;
|
||||
for (JsonValue element : array) {
|
||||
final TextBlock tb = getTextBlockValue(element, totalWidth);
|
||||
if (nb > 0)
|
||||
ug.draw(hline);
|
||||
nb++;
|
||||
tb.drawU(ug);
|
||||
ug = ug.apply(UTranslate.dy(tb.calculateDimension(ug.getStringBounder()).getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private TextBlock getTextBlockKey(String key) {
|
||||
final Display display = Display.getWithNewlines(key);
|
||||
TextBlock result = display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam);
|
||||
result = TextBlockUtils.withMargin(result, 5, 2);
|
||||
return result;
|
||||
}
|
||||
|
||||
private FontConfiguration getFontConfiguration() {
|
||||
if (fontConfiguration == null)
|
||||
return new FontConfiguration(skinParam, fontParam, null);
|
||||
return fontConfiguration;
|
||||
}
|
||||
|
||||
public void setTotalWidth(double totalWidth) {
|
||||
this.totalWidth = totalWidth;
|
||||
}
|
||||
|
||||
}
|
@ -52,6 +52,7 @@ import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.cucadiagram.Bodier;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodierJSon;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodierMap;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodyFactory;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
@ -134,8 +135,7 @@ public final class EntityFactory {
|
||||
if (g.getColors().getColor(ColorType.BACK) == null) {
|
||||
final ColorParam param = symbol == null ? ColorParam.packageBackground : symbol.getColorParamBack();
|
||||
final HColor c1 = skinParam.getHtmlColor(param, g.getStereotype(), false);
|
||||
folder.setSpecificColorTOBEREMOVED(ColorType.BACK,
|
||||
c1 == null ? skinParam.getBackgroundColor() : c1);
|
||||
folder.setSpecificColorTOBEREMOVED(ColorType.BACK, c1 == null ? skinParam.getBackgroundColor() : c1);
|
||||
} else {
|
||||
folder.setSpecificColorTOBEREMOVED(ColorType.BACK, g.getColors().getColor(ColorType.BACK));
|
||||
}
|
||||
@ -226,6 +226,8 @@ public final class EntityFactory {
|
||||
final Bodier bodier;
|
||||
if (Objects.requireNonNull(entityType) == LeafType.MAP)
|
||||
bodier = new BodierMap();
|
||||
else if (Objects.requireNonNull(entityType) == LeafType.JSON)
|
||||
bodier = new BodierJSon();
|
||||
else
|
||||
bodier = BodyFactory.createLeaf(entityType, hides);
|
||||
|
||||
|
@ -78,7 +78,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.extremity.ExtremityFactory;
|
||||
import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryExtends;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -129,7 +129,7 @@ public class ElkPath implements UDrawable {
|
||||
}
|
||||
|
||||
private Style getStyle() {
|
||||
final StyleSignature signature = StyleSignature.of(SName.root, SName.element, styleName, SName.arrow);
|
||||
final StyleSignatureBasic signature = StyleSignatureBasic.of(SName.root, SName.element, styleName, SName.arrow);
|
||||
return signature.getMergedStyle(diagram.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||
@ -64,7 +64,7 @@ public class MagicBox {
|
||||
public MagicBox(ISkinParam skinParam, GNode node) {
|
||||
this.skinParam = skinParam;
|
||||
this.node = node;
|
||||
final Style style = StyleSignature.of(SName.root, SName.element, SName.gitDiagram)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.gitDiagram)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.fontColor = style.value(PName.FontColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ import net.sourceforge.plantuml.jsondiagram.Mirror;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -89,7 +89,7 @@ public class SmetanaForGit {
|
||||
}
|
||||
|
||||
private Style getStyle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.gitDiagram)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.gitDiagram)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.LinkStyle;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
||||
@ -81,8 +81,8 @@ public class HtmlColorAndStyle {
|
||||
return style;
|
||||
}
|
||||
|
||||
static final public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
static final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
public static HtmlColorAndStyle build(ISkinParam skinParam, String definition) throws NoSuchColorException {
|
||||
|
@ -331,7 +331,7 @@ public final class Json {
|
||||
return string;
|
||||
}
|
||||
|
||||
static class DefaultHandler extends JsonHandler<JsonArray, JsonObject> {
|
||||
public static class DefaultHandler extends JsonHandler<JsonArray, JsonObject> {
|
||||
|
||||
protected JsonValue value;
|
||||
|
||||
@ -385,7 +385,7 @@ public final class Json {
|
||||
object.add(name, value);
|
||||
}
|
||||
|
||||
JsonValue getValue() {
|
||||
public JsonValue getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -116,27 +116,27 @@ public class SmetanaForJson {
|
||||
}
|
||||
|
||||
private Style getStyleArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, getDiagramType(), SName.arrow)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, getDiagramType(), SName.arrow)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
private Style getStyleNode() {
|
||||
return StyleSignature.of(SName.root, SName.element, getDiagramType(), SName.node)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, getDiagramType(), SName.node)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
private Style getStyleNodeHeader() {
|
||||
return StyleSignature.of(SName.root, SName.element, getDiagramType(), SName.header, SName.node)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, getDiagramType(), SName.header, SName.node)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
private Style getStyleNodeHighlight() {
|
||||
return StyleSignature.of(SName.root, SName.element, getDiagramType(), SName.node, SName.highlight)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, getDiagramType(), SName.node, SName.highlight)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
private Style getStyleNodeHeaderHighlight() {
|
||||
return StyleSignature.of(SName.root, SName.element, getDiagramType(), SName.header, SName.node, SName.highlight)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, getDiagramType(), SName.header, SName.node, SName.highlight)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UPath;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -82,32 +82,32 @@ public class FingerImpl implements Finger, UDrawable {
|
||||
private final List<FingerImpl> nail = new ArrayList<>();
|
||||
private Tetris tetris = null;
|
||||
|
||||
private StyleSignature getDefaultStyleDefinitionNode() {
|
||||
private StyleSignatureBasic getDefaultStyleDefinitionNode() {
|
||||
final String depth = SName.depth(level);
|
||||
if (level == 0) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.rootNode)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.rootNode)
|
||||
.add(stereotype).add(depth);
|
||||
}
|
||||
if (shape == IdeaShape.NONE && nail.size() == 0) {
|
||||
return StyleSignature
|
||||
return StyleSignatureBasic
|
||||
.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.leafNode, SName.boxless)
|
||||
.add(stereotype).add(depth);
|
||||
}
|
||||
if (shape == IdeaShape.NONE) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.boxless)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.boxless)
|
||||
.add(stereotype).add(depth);
|
||||
}
|
||||
if (nail.size() == 0) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.leafNode)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.leafNode)
|
||||
.add(stereotype).add(depth);
|
||||
}
|
||||
return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node).add(stereotype)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.mindmapDiagram, SName.node).add(stereotype)
|
||||
.add(depth);
|
||||
}
|
||||
|
||||
public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
final String depth = SName.depth(level);
|
||||
return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.arrow).add(stereotype)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.mindmapDiagram, SName.arrow).add(stereotype)
|
||||
.add(depth);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||
@ -278,8 +278,8 @@ public class NwDiagram extends UmlDiagram {
|
||||
};
|
||||
}
|
||||
|
||||
private StyleSignature getStyleDefinitionNetwork(SName sname) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
private StyleSignatureBasic getStyleDefinitionNetwork(SName sname) {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
}
|
||||
|
||||
private TextBlock toTextBlockForNetworkName(String name, String s) {
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.skin.ActorStyle;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.PackageStyle;
|
||||
|
||||
public class NServer {
|
||||
@ -97,8 +97,8 @@ public class NServer {
|
||||
skinParam);
|
||||
}
|
||||
|
||||
private StyleSignature getStyleDefinition(SName sname) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
private StyleSignatureBasic getStyleDefinition(SName sname) {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
}
|
||||
|
||||
private FontConfiguration getFontConfiguration(ISkinParam skinParam, SName sname) {
|
||||
|
@ -51,7 +51,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -137,8 +137,8 @@ public class NwGroup implements NStackable {
|
||||
return blockDim.getHeight();
|
||||
}
|
||||
|
||||
private StyleSignature getStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.nwdiagDiagram, SName.group);
|
||||
private StyleSignatureBasic getStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.nwdiagDiagram, SName.group);
|
||||
}
|
||||
|
||||
public void drawGroup(UGraphic ug, MinMax size, ISkinParam skinParam) {
|
||||
|
@ -44,7 +44,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||
@ -133,8 +133,8 @@ public class GridTextBlockDecorated extends GridTextBlockSimple {
|
||||
return false;
|
||||
}
|
||||
|
||||
private StyleSignature getStyleDefinitionNetwork(SName sname) {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
private StyleSignatureBasic getStyleDefinitionNetwork(SName sname) {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.nwdiagDiagram, sname);
|
||||
}
|
||||
|
||||
private void drawNetworkTube(UGraphic ug) {
|
||||
|
@ -0,0 +1,159 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2020, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.objectdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.UrlBuilder;
|
||||
import net.sourceforge.plantuml.command.BlocLines;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.CommandMultilines2;
|
||||
import net.sourceforge.plantuml.command.MultilinesStrategy;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodierJSon;
|
||||
import net.sourceforge.plantuml.cucadiagram.Code;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.IEntity;
|
||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||
import net.sourceforge.plantuml.cucadiagram.LeafType;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorParser;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.json.Json.DefaultHandler;
|
||||
import net.sourceforge.plantuml.json.JsonParser;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram;
|
||||
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
||||
|
||||
public class CommandCreateJson extends CommandMultilines2<AbstractClassOrObjectDiagram> {
|
||||
|
||||
public CommandCreateJson() {
|
||||
super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE);
|
||||
}
|
||||
|
||||
private static IRegex getRegexConcat() {
|
||||
return RegexConcat.build(CommandCreateJson.class.getName(), RegexLeaf.start(), //
|
||||
new RegexLeaf("TYPE", "json"), //
|
||||
RegexLeaf.spaceOneOrMore(), //
|
||||
new RegexLeaf("NAME", "(?:[%g]([^%g]+)[%g][%s]+as[%s]+)?([%pLN_.]+)"), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
ColorParser.exp1(), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
new RegexLeaf("\\{"), //
|
||||
RegexLeaf.end());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPatternEnd() {
|
||||
return "^[%s]*\\}[%s]*$";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CommandExecutionResult executeNow(AbstractClassOrObjectDiagram diagram, BlocLines lines)
|
||||
throws NoSuchColorException {
|
||||
lines = lines.trim().removeEmptyLines();
|
||||
final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString());
|
||||
final IEntity entity1 = executeArg0(diagram, line0);
|
||||
if (entity1 == null)
|
||||
return CommandExecutionResult.error("No such entity");
|
||||
|
||||
lines = lines.subExtract(1, 1);
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
for (StringLocated sl : lines) {
|
||||
final String line = sl.getString();
|
||||
assert line.length() > 0;
|
||||
System.err.println("l=" + line);
|
||||
sb.append(line);
|
||||
// entity1.getBodier().addFieldOrMethod(line);
|
||||
// if (BodierMap.getLinkedEntry(line) != null) {
|
||||
// final String linkStr = BodierMap.getLinkedEntry(line);
|
||||
// final int x = line.indexOf(linkStr);
|
||||
// final String key = line.substring(0, x).trim();
|
||||
// final String dest = line.substring(x + linkStr.length()).trim();
|
||||
// final Ident ident2 = diagram.buildLeafIdentSpecial(dest);
|
||||
// final ILeaf entity2 = diagram.getEntityFactory().getLeafStrict(ident2);
|
||||
// if (entity2 == null)
|
||||
// return CommandExecutionResult.error("No such entity " + ident2.getName());
|
||||
//
|
||||
// final LinkType linkType = new LinkType(LinkDecor.ARROW, LinkDecor.NONE);
|
||||
// final int length = linkStr.length() - 2;
|
||||
// final Link link = new Link(entity1, entity2, linkType, Display.NULL, length,
|
||||
// diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
// link.setPortMembers(key, null);
|
||||
// diagram.addLink(link);
|
||||
// }
|
||||
}
|
||||
sb.append("}");
|
||||
|
||||
final DefaultHandler handler = new DefaultHandler();
|
||||
new JsonParser(handler).parse(sb.toString());
|
||||
final JsonValue json = handler.getValue();
|
||||
System.err.println("foo=" + json);
|
||||
((BodierJSon) entity1.getBodier()).setJson(json);
|
||||
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
||||
private IEntity executeArg0(AbstractClassOrObjectDiagram diagram, RegexResult line0) throws NoSuchColorException {
|
||||
final String name = line0.get("NAME", 1);
|
||||
final Ident ident = diagram.buildLeafIdent(name);
|
||||
final Code code = diagram.V1972() ? ident : diagram.buildCode(name);
|
||||
final String display = line0.get("NAME", 0);
|
||||
final String stereotype = line0.get("STEREO", 0);
|
||||
final boolean leafExist = diagram.V1972() ? diagram.leafExistSmart(ident) : diagram.leafExist(code);
|
||||
if (leafExist)
|
||||
return diagram.getOrCreateLeaf(diagram.buildLeafIdent(name), code, LeafType.JSON, null);
|
||||
|
||||
final IEntity entity = diagram.createLeaf(ident, code, Display.getWithNewlines(display), LeafType.JSON, null);
|
||||
if (stereotype != null)
|
||||
entity.setStereotype(Stereotype.build(stereotype, diagram.getSkinParam().getCircledCharacterRadius(),
|
||||
diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER),
|
||||
diagram.getSkinParam().getIHtmlColorSet()));
|
||||
|
||||
final String s = line0.get("COLOR", 0);
|
||||
entity.setSpecificColorTOBEREMOVED(ColorType.BACK, s == null ? null
|
||||
: diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s));
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
@ -95,9 +95,9 @@ public class CommandCreateMap extends CommandMultilines2<AbstractClassOrObjectDi
|
||||
lines = lines.trim().removeEmptyLines();
|
||||
final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString());
|
||||
final IEntity entity1 = executeArg0(diagram, line0);
|
||||
if (entity1 == null) {
|
||||
if (entity1 == null)
|
||||
return CommandExecutionResult.error("No such entity");
|
||||
}
|
||||
|
||||
lines = lines.subExtract(1, 1);
|
||||
for (StringLocated sl : lines) {
|
||||
final String line = sl.getString();
|
||||
@ -110,9 +110,9 @@ public class CommandCreateMap extends CommandMultilines2<AbstractClassOrObjectDi
|
||||
final String dest = line.substring(x + linkStr.length()).trim();
|
||||
final Ident ident2 = diagram.buildLeafIdentSpecial(dest);
|
||||
final ILeaf entity2 = diagram.getEntityFactory().getLeafStrict(ident2);
|
||||
if (entity2 == null) {
|
||||
if (entity2 == null)
|
||||
return CommandExecutionResult.error("No such entity " + ident2.getName());
|
||||
}
|
||||
|
||||
final LinkType linkType = new LinkType(LinkDecor.ARROW, LinkDecor.NONE);
|
||||
final int length = linkStr.length() - 2;
|
||||
final Link link = new Link(entity1, entity2, linkType, Display.NULL, length,
|
||||
@ -131,15 +131,15 @@ public class CommandCreateMap extends CommandMultilines2<AbstractClassOrObjectDi
|
||||
final String display = line0.get("NAME", 0);
|
||||
final String stereotype = line0.get("STEREO", 0);
|
||||
final boolean leafExist = diagram.V1972() ? diagram.leafExistSmart(ident) : diagram.leafExist(code);
|
||||
if (leafExist) {
|
||||
if (leafExist)
|
||||
return diagram.getOrCreateLeaf(diagram.buildLeafIdent(name), code, LeafType.MAP, null);
|
||||
}
|
||||
|
||||
final IEntity entity = diagram.createLeaf(ident, code, Display.getWithNewlines(display), LeafType.MAP, null);
|
||||
if (stereotype != null) {
|
||||
if (stereotype != null)
|
||||
entity.setStereotype(Stereotype.build(stereotype, diagram.getSkinParam().getCircledCharacterRadius(),
|
||||
diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER),
|
||||
diagram.getSkinParam().getIHtmlColorSet()));
|
||||
}
|
||||
|
||||
final String s = line0.get("COLOR", 0);
|
||||
entity.setSpecificColorTOBEREMOVED(ColorType.BACK, s == null ? null
|
||||
: diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s));
|
||||
|
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.skin.Component;
|
||||
import net.sourceforge.plantuml.skin.Context2D;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
||||
@ -65,7 +65,7 @@ public class Frame implements Component {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -169,8 +169,8 @@ public class GanttArrow implements UDrawable {
|
||||
|
||||
}
|
||||
|
||||
private StyleSignature getStyleSignatureTask() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.task);
|
||||
private StyleSignatureBasic getStyleSignatureTask() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task);
|
||||
}
|
||||
|
||||
private double getX(TaskAttribute taskAttribute, TaskDraw task, Direction direction) {
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
|
||||
@ -93,8 +93,8 @@ public class GanttConstraint extends WithLinkType {
|
||||
return source.toString() + " --> " + dest.toString();
|
||||
}
|
||||
|
||||
final public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow);
|
||||
final public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
public UDrawable getUDrawable(TimeScale timeScale, ToTaskDraw toTaskDraw) {
|
||||
|
@ -101,7 +101,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.GraphvizCrash;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
@ -216,7 +216,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
||||
if (labelStrategy.titleInFirstColumn())
|
||||
ug = ug.apply(UTranslate.dx(getTitlesColumnWidth(ug.getStringBounder())));
|
||||
|
||||
final Style timelineStyle = StyleSignature
|
||||
final Style timelineStyle = StyleSignatureBasic
|
||||
.of(SName.root, SName.element, SName.ganttDiagram, SName.timeline)
|
||||
.getMergedStyle(getCurrentStyleBuilder());
|
||||
|
||||
@ -328,12 +328,12 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
||||
}
|
||||
|
||||
private Style getClosedStyle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.closed)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.closed)
|
||||
.getMergedStyle(getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
private Style getTimelineStyle() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.timeline)
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.timeline)
|
||||
.getMergedStyle(getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
@ -365,8 +365,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
||||
|
||||
}
|
||||
|
||||
public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow);
|
||||
public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
private void drawTasksTitle(UGraphic ug, double colTitles, double colBars) {
|
||||
|
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
@ -98,10 +98,10 @@ public abstract class AbstractTaskDraw implements TaskDraw {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
abstract StyleSignature getStyleSignature();
|
||||
abstract StyleSignatureBasic getStyleSignature();
|
||||
|
||||
private StyleSignature getStyleSignatureUnstarted() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.task, SName.unstarted);
|
||||
private StyleSignatureBasic getStyleSignatureUnstarted() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task, SName.unstarted);
|
||||
}
|
||||
|
||||
final protected HColor getLineColor() {
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
||||
import net.sourceforge.plantuml.ugraphic.UShape;
|
||||
@ -70,8 +70,8 @@ public class TaskDrawDiamond extends AbstractTaskDraw {
|
||||
}
|
||||
|
||||
@Override
|
||||
StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.milestone);
|
||||
StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.milestone);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Value;
|
||||
import net.sourceforge.plantuml.svek.image.Opale;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -174,8 +174,8 @@ public class TaskDrawRegular extends AbstractTaskDraw {
|
||||
}
|
||||
|
||||
@Override
|
||||
StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.task);
|
||||
StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.task);
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
@ -208,7 +208,7 @@ public class TaskDrawRegular extends AbstractTaskDraw {
|
||||
}
|
||||
|
||||
private Opale getOpaleNote() {
|
||||
final Style style = StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.note)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.note)
|
||||
.getMergedStyle(getStyleBuilder());
|
||||
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getColorSet());
|
||||
@ -292,7 +292,7 @@ public class TaskDrawRegular extends AbstractTaskDraw {
|
||||
off.add(new Segment(x1, x2));
|
||||
}
|
||||
|
||||
final HColor backUndone = StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.undone)
|
||||
final HColor backUndone = StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.undone)
|
||||
.getMergedStyle(getStyleBuilder()).value(PName.BackGroundColor)
|
||||
.asColor(skinParam.getThemeStyle(), getColorSet());
|
||||
|
||||
|
@ -56,7 +56,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
import net.sourceforge.plantuml.ugraphic.URectangle;
|
||||
@ -107,8 +107,8 @@ public class TaskDrawSeparator implements TaskDraw {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.separator);
|
||||
private StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.separator);
|
||||
}
|
||||
|
||||
private Style getStyle() {
|
||||
|
@ -57,7 +57,7 @@ import net.sourceforge.plantuml.posimo.DotPath;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.extremity.ExtremityFactory;
|
||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -115,7 +115,7 @@ public class SmetanaPath implements UDrawable {
|
||||
HColor color;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
color = StyleSignature.of(SName.root, SName.element, diagram.getUmlDiagramType().getStyleName(), SName.arrow)
|
||||
color = StyleSignatureBasic.of(SName.root, SName.element, diagram.getUmlDiagramType().getStyleName(), SName.arrow)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder())
|
||||
.value(PName.LineColor)
|
||||
.asColor(diagram.getSkinParam().getThemeStyle(), diagram.getSkinParam().getIHtmlColorSet());
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
|
||||
public abstract class AbstractMessage implements EventWithDeactivate, WithStyle {
|
||||
@ -61,8 +61,8 @@ public abstract class AbstractMessage implements EventWithDeactivate, WithStyle
|
||||
return new Style[] { style };
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram, SName.arrow);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
private final Display label;
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.skin.ComponentType;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
|
||||
public class Delay extends AbstractEvent implements Event, WithStyle {
|
||||
@ -48,7 +48,7 @@ public class Delay extends AbstractEvent implements Event, WithStyle {
|
||||
|
||||
final private Style style;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return ComponentType.DELAY_TEXT.getStyleSignature();
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.skin.ComponentType;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
|
||||
public class Divider extends AbstractEvent implements Event, WithStyle {
|
||||
@ -48,7 +48,7 @@ public class Divider extends AbstractEvent implements Event, WithStyle {
|
||||
|
||||
final private Style style;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return ComponentType.DIVIDER.getStyleSignature();
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
@ -94,12 +94,12 @@ public class Doll implements WithStyle {
|
||||
|
||||
}
|
||||
|
||||
final public StyleSignature getStyleSignature() {
|
||||
final public StyleSignatureBasic getStyleSignature() {
|
||||
return ComponentType.ENGLOBER.getStyleSignature();
|
||||
}
|
||||
|
||||
final public Style[] getUsedStyles() {
|
||||
Style tmp = getStyleSignature().with(englober.getStereotype()).getMergedStyle(styleBuilder);
|
||||
Style tmp = getStyleSignature().withTOBECHANGED(englober.getStereotype()).getMergedStyle(styleBuilder);
|
||||
final HColor backColor = englober.getBoxColor();
|
||||
if (tmp != null)
|
||||
tmp = tmp.eventuallyOverride(PName.BackGroundColor, backColor);
|
||||
|
@ -39,7 +39,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -55,12 +55,12 @@ public abstract class Grouping implements Event, WithStyle {
|
||||
final private Style style;
|
||||
final private Style styleHeader;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram, SName.group);
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram, SName.group);
|
||||
}
|
||||
|
||||
private StyleSignature getHeaderStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram, SName.groupHeader);
|
||||
private StyleSignatureBasic getHeaderStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram, SName.groupHeader);
|
||||
}
|
||||
|
||||
public Style[] getUsedStyles() {
|
||||
|
@ -51,7 +51,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -97,7 +97,7 @@ public class LinkAnchor {
|
||||
final HColor color;
|
||||
final FontConfiguration fontConfiguration;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignature signature = StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
final StyleSignatureBasic signature = StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
SName.arrow);
|
||||
final Style style = signature.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
|
@ -46,7 +46,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
|
||||
final public class Note extends AbstractEvent implements Event, SpecificBackcolorable, WithStyle {
|
||||
@ -72,7 +72,7 @@ final public class Note extends AbstractEvent implements Event, SpecificBackcolo
|
||||
|
||||
private Style style;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return noteStyle.getDefaultStyleDefinition();
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.sequencediagram;
|
||||
|
||||
import net.sourceforge.plantuml.skin.ComponentType;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
|
||||
public enum NoteStyle {
|
||||
|
||||
@ -62,8 +62,8 @@ public enum NoteStyle {
|
||||
return ComponentType.NOTE;
|
||||
}
|
||||
|
||||
public StyleSignature getDefaultStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
public StyleSignatureBasic getDefaultStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
SName.note);
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,10 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.SymbolContext;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.WithStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -72,7 +73,7 @@ public class Participant implements SpecificBackcolorable, WithStyle {
|
||||
|
||||
// private Style style;
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
return type.getStyleSignature().addClickable(getUrl());
|
||||
}
|
||||
|
||||
@ -80,7 +81,7 @@ public class Participant implements SpecificBackcolorable, WithStyle {
|
||||
if (UseStyle.useBetaStyle() == false) {
|
||||
return null;
|
||||
}
|
||||
final StyleSignature signature = getStyleSignature().with(stereotype);
|
||||
final StyleSignature signature = getStyleSignature().withTOBECHANGED(stereotype);
|
||||
Style tmp = signature.getMergedStyle(styleBuilder);
|
||||
tmp = tmp.eventuallyOverride(getColors());
|
||||
Style stereo = getStyleSignature().forStereotypeItself(stereotype).getMergedStyle(styleBuilder);
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.sequencediagram;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
|
||||
public enum ParticipantType implements Styleable {
|
||||
@ -60,37 +60,37 @@ public enum ParticipantType implements Styleable {
|
||||
return background;
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
if (this == PARTICIPANT) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.participant);
|
||||
}
|
||||
if (this == ACTOR) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.actor);
|
||||
}
|
||||
if (this == BOUNDARY) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.boundary);
|
||||
}
|
||||
if (this == CONTROL) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.control);
|
||||
}
|
||||
if (this == ENTITY) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.entity);
|
||||
}
|
||||
if (this == QUEUE) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.queue);
|
||||
}
|
||||
if (this == DATABASE) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.database);
|
||||
}
|
||||
if (this == COLLECTIONS) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.collections);
|
||||
}
|
||||
return null;
|
||||
|
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class Reference extends AbstractEvent implements Event {
|
||||
@ -60,12 +60,12 @@ public class Reference extends AbstractEvent implements Event {
|
||||
final private Style style;
|
||||
final private Style styleHeader;
|
||||
|
||||
public StyleSignature getDefaultStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram, SName.reference);
|
||||
public StyleSignatureBasic getDefaultStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram, SName.reference);
|
||||
}
|
||||
|
||||
private StyleSignature getHeaderStyleDefinition() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram, SName.referenceHeader);
|
||||
private StyleSignatureBasic getHeaderStyleDefinition() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram, SName.referenceHeader);
|
||||
}
|
||||
|
||||
public Style[] getUsedStyles() {
|
||||
|
@ -623,7 +623,7 @@ class DrawableSetInitializer {
|
||||
participantDisplay);
|
||||
final Component tail = drawableSet.getSkin().createComponent(p.getUsedStyles(), tailType, null, skinParam,
|
||||
participantDisplay);
|
||||
final Style style = this.defaultLineType.getStyleSignature().with(p.getStereotype())
|
||||
final Style style = this.defaultLineType.getStyleSignature().withTOBECHANGED(p.getStereotype())
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Component line = drawableSet.getSkin().createComponent(new Style[] { style }, this.defaultLineType, null,
|
||||
drawableSet.getSkinParam(), participantDisplay);
|
||||
|
@ -66,7 +66,7 @@ import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -152,7 +152,7 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
|
||||
compTitle = null;
|
||||
} else {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.title)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
compTitle = style.createTextBlockBordered(page.getTitle(), diagram.getSkinParam().getIHtmlColorSet(),
|
||||
diagram.getSkinParam());
|
||||
@ -173,7 +173,7 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
|
||||
legendBlock = TextBlockUtils.empty(0, 0);
|
||||
} else {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.legend)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.legend)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
legendBlock = style.createTextBlockBordered(diagram.getLegend().getDisplay(),
|
||||
diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam());
|
||||
@ -251,7 +251,7 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
|
||||
final DisplaySection display = diagram.getFooterOrHeaderTeoz(fontParam).withPage(page + 1, pages.size());
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignature def = fontParam.getStyleDefinition(null);
|
||||
final StyleSignatureBasic def = fontParam.getStyleDefinition(null);
|
||||
style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
return new PngTitler(titleColor, display, fontSize, fontFamily, hyperlinkColor,
|
||||
|
@ -54,7 +54,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
@ -129,7 +129,7 @@ public abstract class CommunicationTileNoteBottomTopAbstract extends AbstractTil
|
||||
final HColor color;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else
|
||||
|
@ -48,7 +48,7 @@ import net.sourceforge.plantuml.skin.ComponentType;
|
||||
import net.sourceforge.plantuml.skin.Context2D;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
@ -86,7 +86,7 @@ public class LifeEventTile extends AbstractTile {
|
||||
this.skinParam = skinParam;
|
||||
}
|
||||
|
||||
private StyleSignature getStyleSignature() {
|
||||
private StyleSignatureBasic getStyleSignature() {
|
||||
return ComponentType.DESTROY.getStyleSignature();
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ import net.sourceforge.plantuml.skin.SimpleContext2D;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -213,7 +213,7 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
||||
}
|
||||
final TextBlock compTitle;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document, SName.title)
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
compTitle = style.createTextBlockBordered(diagram.getTitle().getDisplay(),
|
||||
diagram.getSkinParam().getIHtmlColorSet(), diagram.getSkinParam());
|
||||
@ -245,7 +245,7 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
||||
Style style = null;
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignature def = param.getStyleDefinition(null);
|
||||
final StyleSignatureBasic def = param.getStyleDefinition(null);
|
||||
style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final PngTitler pngTitler = new PngTitler(titleColor, display, fontSize, fontFamily, hyperlinkColor,
|
||||
@ -271,7 +271,7 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
||||
|
||||
HorizontalAlignment titleAlignment = HorizontalAlignment.CENTER;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignature def = FontParam.TITLE.getStyleDefinition(null);
|
||||
final StyleSignatureBasic def = FontParam.TITLE.getStyleDefinition(null);
|
||||
titleAlignment = def.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder())
|
||||
.getHorizontalAlignment();
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
@ -50,7 +50,7 @@ public abstract class AbstractComponent implements Component {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ package net.sourceforge.plantuml.skin;
|
||||
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.style.Styleable;
|
||||
|
||||
public enum ComponentType implements Styleable {
|
||||
@ -70,42 +70,42 @@ public enum ComponentType implements Styleable {
|
||||
return this == ARROW;
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
if (this == PARTICIPANT_HEAD || this == PARTICIPANT_TAIL) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.participant);
|
||||
}
|
||||
if (this == PARTICIPANT_LINE || this == CONTINUE_LINE) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.lifeLine);
|
||||
}
|
||||
if (this == ALIVE_BOX_CLOSE_CLOSE || this == ALIVE_BOX_CLOSE_OPEN || this == ALIVE_BOX_OPEN_CLOSE
|
||||
|| this == ALIVE_BOX_OPEN_OPEN) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.lifeLine);
|
||||
}
|
||||
if (this == DESTROY) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.lifeLine);
|
||||
}
|
||||
if (this == DIVIDER) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.separator);
|
||||
}
|
||||
if (this == ENGLOBER) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.box);
|
||||
}
|
||||
if (this == NOTE) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.note);
|
||||
}
|
||||
if (this == DELAY_TEXT) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.delay);
|
||||
}
|
||||
if (this == DELAY_LINE) {
|
||||
return StyleSignature.of(SName.root, SName.element,
|
||||
return StyleSignatureBasic.of(SName.root, SName.element,
|
||||
SName.sequenceDiagram, SName.delay);
|
||||
}
|
||||
// if (this == REFERENCE) {
|
||||
@ -116,6 +116,6 @@ public enum ComponentType implements Styleable {
|
||||
throw new UnsupportedOperationException(toString());
|
||||
|
||||
}
|
||||
return StyleSignature.of(SName.root);
|
||||
return StyleSignatureBasic.of(SName.root);
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UEllipse;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UPolygon;
|
||||
@ -324,21 +324,21 @@ public enum VisibilityModifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
if (this == IE_MANDATORY)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.visibilityIcon, SName.IEMandatory);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.visibilityIcon, SName.IEMandatory);
|
||||
|
||||
if (this == PUBLIC_FIELD || this == PUBLIC_METHOD)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.visibilityIcon, SName.public_);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.visibilityIcon, SName.public_);
|
||||
|
||||
if (this == PRIVATE_FIELD || this == PRIVATE_METHOD)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.visibilityIcon, SName.private_);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.visibilityIcon, SName.private_);
|
||||
|
||||
if (this == PROTECTED_FIELD || this == PROTECTED_METHOD)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.visibilityIcon, SName.protected_);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.visibilityIcon, SName.protected_);
|
||||
|
||||
if (this == PACKAGE_PRIVATE_FIELD || this == VisibilityModifier.PACKAGE_PRIVATE_METHOD)
|
||||
return StyleSignature.of(SName.root, SName.element, SName.visibilityIcon, SName.package_);
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.visibilityIcon, SName.package_);
|
||||
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.skin.Area;
|
||||
import net.sourceforge.plantuml.skin.Component;
|
||||
import net.sourceforge.plantuml.skin.Context2D;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
|
||||
public class ComponentRoseGroupingSpace implements Component {
|
||||
@ -52,7 +52,7 @@ public class ComponentRoseGroupingSpace implements Component {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public StyleSignature getStyleSignature() {
|
||||
public StyleSignatureBasic getStyleSignature() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ import net.sourceforge.plantuml.skin.ComponentType;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignature;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
@ -375,7 +375,7 @@ public class Rose {
|
||||
final HorizontalAlignment textHorizontalAlignment;
|
||||
final ArrowDirection arrowDirection = config.getArrowDirection();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignature signature = StyleSignature.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
final StyleSignatureBasic signature = StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram,
|
||||
SName.arrow);
|
||||
final Style textStyle = signature.getMergedStyle(param.getCurrentStyleBuilder());
|
||||
final String value = textStyle.value(PName.HorizontalAlignment).asString();
|
||||
|
@ -116,7 +116,7 @@ public class ClockwiseTopRightBottomLeft {
|
||||
}
|
||||
|
||||
public static ClockwiseTopRightBottomLeft marginForDocument(StyleBuilder styleBuilder) {
|
||||
final Style style = StyleSignature.of(SName.root, SName.document).getMergedStyle(styleBuilder);
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document).getMergedStyle(styleBuilder);
|
||||
return style.getMargin();
|
||||
}
|
||||
|
||||
|
@ -70,8 +70,8 @@ class Context {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
public Collection<StyleSignature> toSignatures() {
|
||||
List<StyleSignature> results = new ArrayList<>(Collections.singletonList(StyleSignature.empty()));
|
||||
public Collection<StyleSignatureBasic> toSignatures() {
|
||||
List<StyleSignatureBasic> results = new ArrayList<>(Collections.singletonList(StyleSignatureBasic.empty()));
|
||||
boolean star = false;
|
||||
for (Iterator<String> it = data.iterator(); it.hasNext();) {
|
||||
String s = it.next();
|
||||
@ -80,16 +80,16 @@ class Context {
|
||||
s = s.substring(0, s.length() - 1);
|
||||
}
|
||||
final String[] names = s.split(",");
|
||||
final List<StyleSignature> tmp = new ArrayList<>();
|
||||
for (StyleSignature ss : results)
|
||||
final List<StyleSignatureBasic> tmp = new ArrayList<>();
|
||||
for (StyleSignatureBasic ss : results)
|
||||
for (String name : names)
|
||||
tmp.add(ss.add(name));
|
||||
results = tmp;
|
||||
}
|
||||
|
||||
if (star)
|
||||
for (ListIterator<StyleSignature> it = results.listIterator(); it.hasNext();) {
|
||||
final StyleSignature tmp = it.next().addStar();
|
||||
for (ListIterator<StyleSignatureBasic> it = results.listIterator(); it.hasNext();) {
|
||||
final StyleSignatureBasic tmp = it.next().addStar();
|
||||
it.set(tmp);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class DarkString {
|
||||
return this;
|
||||
|
||||
if ((this.value2 == null && other.value2 == null) || this.value1 == null && other.value1 == null) {
|
||||
if (this.priority > other.priority)
|
||||
if (isBigger(this.priority, other.priority))
|
||||
return this;
|
||||
return other;
|
||||
}
|
||||
@ -60,16 +60,24 @@ public class DarkString {
|
||||
return new DarkString(this.value1, other.value2, this.priority);
|
||||
if (other.value2 == null && this.value1 == null)
|
||||
return new DarkString(other.value1, this.value2, other.priority);
|
||||
|
||||
if (this.priority > other.priority)
|
||||
|
||||
if (isBigger(this.priority, other.priority))
|
||||
return this;
|
||||
return other;
|
||||
|
||||
|
||||
// System.err.println("this =" + this);
|
||||
// System.err.println("other=" + other);
|
||||
// throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private static boolean isBigger(int a, int b) {
|
||||
if (a > StyleLoader.DELTA_PRIORITY_FOR_STEREOTYPE)
|
||||
a = StyleLoader.DELTA_PRIORITY_FOR_STEREOTYPE;
|
||||
if (b > StyleLoader.DELTA_PRIORITY_FOR_STEREOTYPE)
|
||||
b = StyleLoader.DELTA_PRIORITY_FOR_STEREOTYPE;
|
||||
return a > b;
|
||||
}
|
||||
|
||||
public DarkString addPriority(int delta) {
|
||||
return new DarkString(value1, value2, delta + priority);
|
||||
}
|
||||
|
@ -252,27 +252,20 @@ public class FromSkinparamToStyle {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean complex = value.contains(";");
|
||||
final boolean complex = isComplexValue(value);
|
||||
if (complex) {
|
||||
// System.err.println("key=" + key + " value=" + value);
|
||||
if (value.startsWith(";"))
|
||||
value = " " + value;
|
||||
final StringTokenizer st = new StringTokenizer(value, ";");
|
||||
value = st.nextToken();
|
||||
while (st.hasMoreTokens()) {
|
||||
final String read = st.nextToken();
|
||||
// System.err.println("read:" + read);
|
||||
if (read.startsWith("text:")) {
|
||||
final String value2 = read.split(":")[1];
|
||||
for (Data data : datas)
|
||||
addStyle(PName.FontColor, ValueImpl.regular(value2, counter), data.styleNames);
|
||||
} else if (read.startsWith("line.dotted")) {
|
||||
for (Data data : datas)
|
||||
addStyle(PName.LineStyle, ValueImpl.regular("1;3", counter), data.styleNames);
|
||||
} else if (read.startsWith("line.dashed")) {
|
||||
for (Data data : datas)
|
||||
addStyle(PName.LineStyle, ValueImpl.regular("7;7", counter), data.styleNames);
|
||||
if (value.contains(";")) {
|
||||
if (value.startsWith(";"))
|
||||
value = " " + value;
|
||||
final StringTokenizer st = new StringTokenizer(value, ";");
|
||||
value = st.nextToken();
|
||||
while (st.hasMoreTokens()) {
|
||||
final String read = st.nextToken();
|
||||
readValue(read, datas, counter);
|
||||
}
|
||||
} else {
|
||||
readValue(value, datas, counter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,6 +275,28 @@ public class FromSkinparamToStyle {
|
||||
|
||||
}
|
||||
|
||||
private void readValue(final String read, final List<Data> datas, final AutomaticCounter counter) {
|
||||
if (read.startsWith("text:")) {
|
||||
final String value2 = read.split(":")[1];
|
||||
for (Data data : datas)
|
||||
addStyle(PName.FontColor, ValueImpl.regular(value2, counter), data.styleNames);
|
||||
} else if (read.startsWith("line.dotted")) {
|
||||
for (Data data : datas)
|
||||
addStyle(PName.LineStyle, ValueImpl.regular("1;3", counter), data.styleNames);
|
||||
} else if (read.startsWith("line.dashed")) {
|
||||
for (Data data : datas)
|
||||
addStyle(PName.LineStyle, ValueImpl.regular("7;7", counter), data.styleNames);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isComplexValue(String value) {
|
||||
if (value.contains(";"))
|
||||
return true;
|
||||
if (value.startsWith("text:"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private ValueImpl getShadowingValue(final String value, final AutomaticCounter counter) {
|
||||
if (value.equalsIgnoreCase("false") || value.equalsIgnoreCase("no"))
|
||||
return ValueImpl.regular("0", counter);
|
||||
@ -293,14 +308,17 @@ public class FromSkinparamToStyle {
|
||||
}
|
||||
|
||||
private void addStyle(PName propertyName, Value value, SName... styleNames) {
|
||||
final Map<PName, Value> map = new EnumMap<PName, Value>(PName.class);
|
||||
Map<PName, Value> map = new EnumMap<PName, Value>(PName.class);
|
||||
map.put(propertyName, value);
|
||||
StyleSignature sig = StyleSignature.of(styleNames);
|
||||
if (stereo != null)
|
||||
StyleSignatureBasic sig = StyleSignatureBasic.of(styleNames);
|
||||
if (stereo != null) {
|
||||
map = StyleLoader.addPriorityForStereotype(map);
|
||||
for (String s : stereo.split("\\&"))
|
||||
sig = sig.add(s);
|
||||
}
|
||||
|
||||
styles.add(new Style(sig, map));
|
||||
final Style style = new Style(sig, map);
|
||||
styles.add(style);
|
||||
}
|
||||
|
||||
public List<Style> getStyles() {
|
||||
|
@ -61,9 +61,9 @@ import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
public class Style {
|
||||
|
||||
private final Map<PName, Value> map;
|
||||
private final StyleSignature signature;
|
||||
private final StyleSignatureBasic signature;
|
||||
|
||||
public Style(StyleSignature signature, Map<PName, Value> map) {
|
||||
public Style(StyleSignatureBasic signature, Map<PName, Value> map) {
|
||||
this.map = map;
|
||||
this.signature = signature;
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class Style {
|
||||
return result;
|
||||
}
|
||||
|
||||
public StyleSignature getSignature() {
|
||||
public StyleSignatureBasic getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
|
@ -47,24 +47,24 @@ import net.sourceforge.plantuml.SkinParam;
|
||||
|
||||
public class StyleBuilder implements AutomaticCounter {
|
||||
|
||||
private final Map<StyleSignature, Style> stylesMap = new LinkedHashMap<StyleSignature, Style>();
|
||||
private final Set<StyleSignature> printedForLog;
|
||||
private final Map<StyleSignatureBasic, Style> stylesMap = new LinkedHashMap<StyleSignatureBasic, Style>();
|
||||
private final Set<StyleSignatureBasic> printedForLog;
|
||||
private final SkinParam skinParam;
|
||||
private int counter;
|
||||
|
||||
public void printMe() {
|
||||
for (Entry<StyleSignature, Style> ent : stylesMap.entrySet())
|
||||
for (Entry<StyleSignatureBasic, Style> ent : stylesMap.entrySet())
|
||||
ent.getValue().printMe();
|
||||
|
||||
}
|
||||
|
||||
private StyleBuilder(SkinParam skinParam, Set<StyleSignature> printedForLog) {
|
||||
private StyleBuilder(SkinParam skinParam, Set<StyleSignatureBasic> printedForLog) {
|
||||
this.skinParam = skinParam;
|
||||
this.printedForLog = new LinkedHashSet<>();
|
||||
}
|
||||
|
||||
public StyleBuilder(SkinParam skinParam) {
|
||||
this(skinParam, new LinkedHashSet<StyleSignature>());
|
||||
this(skinParam, new LinkedHashSet<StyleSignatureBasic>());
|
||||
}
|
||||
|
||||
public final SkinParam getSkinParam() {
|
||||
@ -76,7 +76,7 @@ public class StyleBuilder implements AutomaticCounter {
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
name = name.toLowerCase();
|
||||
final StyleSignature signature = new StyleSignature(name);
|
||||
final StyleSignatureBasic signature = new StyleSignatureBasic(name);
|
||||
final Style result = stylesMap.get(signature);
|
||||
if (result == null)
|
||||
return new Style(signature, new EnumMap<PName, Value>(PName.class));
|
||||
@ -85,8 +85,8 @@ public class StyleBuilder implements AutomaticCounter {
|
||||
}
|
||||
|
||||
public StyleBuilder muteStyle(Style modifiedStyle) {
|
||||
final Map<StyleSignature, Style> copy = new LinkedHashMap<StyleSignature, Style>(stylesMap);
|
||||
final StyleSignature signature = modifiedStyle.getSignature();
|
||||
final Map<StyleSignatureBasic, Style> copy = new LinkedHashMap<StyleSignatureBasic, Style>(stylesMap);
|
||||
final StyleSignatureBasic signature = modifiedStyle.getSignature();
|
||||
final Style orig = copy.get(signature);
|
||||
if (orig == null) {
|
||||
copy.put(signature, modifiedStyle);
|
||||
@ -100,7 +100,7 @@ public class StyleBuilder implements AutomaticCounter {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void loadInternal(StyleSignature signature, Style newStyle) {
|
||||
public void loadInternal(StyleSignatureBasic signature, Style newStyle) {
|
||||
if (signature.isStarred())
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
@ -117,14 +117,14 @@ public class StyleBuilder implements AutomaticCounter {
|
||||
return ++counter;
|
||||
}
|
||||
|
||||
public Style getMergedStyle(StyleSignature signature) {
|
||||
public Style getMergedStyle(StyleSignatureBasic signature) {
|
||||
boolean added = this.printedForLog.add(signature);
|
||||
if (added)
|
||||
Log.info("Using style " + signature);
|
||||
|
||||
Style result = null;
|
||||
for (Entry<StyleSignature, Style> ent : stylesMap.entrySet()) {
|
||||
final StyleSignature key = ent.getKey();
|
||||
for (Entry<StyleSignatureBasic, Style> ent : stylesMap.entrySet()) {
|
||||
final StyleSignatureBasic key = ent.getKey();
|
||||
if (key.matchAll(signature) == false)
|
||||
continue;
|
||||
|
||||
@ -137,14 +137,14 @@ public class StyleBuilder implements AutomaticCounter {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Style getMergedStyleSpecial(StyleSignature signature, int deltaPriority) {
|
||||
public Style getMergedStyleSpecial(StyleSignatureBasic signature, int deltaPriority) {
|
||||
boolean added = this.printedForLog.add(signature);
|
||||
if (added)
|
||||
Log.info("Using style " + signature);
|
||||
|
||||
Style result = null;
|
||||
for (Entry<StyleSignature, Style> ent : stylesMap.entrySet()) {
|
||||
final StyleSignature key = ent.getKey();
|
||||
for (Entry<StyleSignatureBasic, Style> ent : stylesMap.entrySet()) {
|
||||
final StyleSignatureBasic key = ent.getKey();
|
||||
if (key.matchAll(signature) == false)
|
||||
continue;
|
||||
|
||||
|
@ -58,6 +58,7 @@ import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class StyleLoader {
|
||||
|
||||
public static final int DELTA_PRIORITY_FOR_STEREOTYPE = 1000;
|
||||
private final SkinParam skinParam;
|
||||
|
||||
public StyleLoader(SkinParam skinParam) {
|
||||
@ -182,11 +183,11 @@ public class StyleLoader {
|
||||
final Matcher2 mCloseBracket = closeBracket.matcher(trimmed);
|
||||
if (mCloseBracket.find()) {
|
||||
if (context.size() > 0) {
|
||||
final Collection<StyleSignature> signatures = context.toSignatures();
|
||||
for (StyleSignature signature : signatures) {
|
||||
final Collection<StyleSignatureBasic> signatures = context.toSignatures();
|
||||
for (StyleSignatureBasic signature : signatures) {
|
||||
Map<PName, Value> tmp = maps.get(maps.size() - 1);
|
||||
if (signature.isWithDot())
|
||||
tmp = addPriority(tmp);
|
||||
tmp = addPriorityForStereotype(tmp);
|
||||
if (tmp.size() > 0) {
|
||||
final Style style = new Style(signature, tmp);
|
||||
result.add(style);
|
||||
@ -204,10 +205,10 @@ public class StyleLoader {
|
||||
|
||||
}
|
||||
|
||||
private static Map<PName, Value> addPriority(Map<PName, Value> tmp) {
|
||||
public static Map<PName, Value> addPriorityForStereotype(Map<PName, Value> tmp) {
|
||||
final Map<PName, Value> result = new EnumMap<>(PName.class);
|
||||
for (Entry<PName, Value> ent : tmp.entrySet())
|
||||
result.put(ent.getKey(), ((ValueImpl) ent.getValue()).addPriority(1000));
|
||||
result.put(ent.getKey(), ((ValueImpl) ent.getValue()).addPriority(DELTA_PRIORITY_FOR_STEREOTYPE));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -35,208 +35,15 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.style;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereostyles;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
|
||||
public class StyleSignature {
|
||||
public interface StyleSignature {
|
||||
|
||||
private final Set<String> names = new LinkedHashSet<>();
|
||||
private final boolean withDot;
|
||||
public Style getMergedStyle(StyleBuilder styleBuilder);
|
||||
|
||||
public StyleSignature(String s) {
|
||||
if (s.contains("*") || s.contains("&") || s.contains("-"))
|
||||
throw new IllegalArgumentException();
|
||||
public StyleSignature withTOBECHANGED(Stereotype stereotype);
|
||||
|
||||
this.withDot = s.contains(".");
|
||||
this.names.add(clean(s));
|
||||
}
|
||||
|
||||
public static StyleSignature empty() {
|
||||
return new StyleSignature(false);
|
||||
}
|
||||
|
||||
private StyleSignature(boolean withDot) {
|
||||
this.withDot = withDot;
|
||||
}
|
||||
|
||||
private StyleSignature(boolean withDot, Collection<String> copy) {
|
||||
this.names.addAll(copy);
|
||||
this.withDot = withDot;
|
||||
}
|
||||
|
||||
public StyleSignature addClickable(Url url) {
|
||||
if (url == null)
|
||||
return this;
|
||||
|
||||
final Set<String> result = new LinkedHashSet<>(names);
|
||||
result.add(SName.clickable.name());
|
||||
return new StyleSignature(withDot, result);
|
||||
|
||||
}
|
||||
|
||||
public StyleSignature add(String s) {
|
||||
if (s == null)
|
||||
return this;
|
||||
|
||||
if (s.contains("*") || s.contains("&"))
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
final Set<String> result = new LinkedHashSet<>(names);
|
||||
result.add(clean(s));
|
||||
return new StyleSignature(withDot || s.contains("."), result);
|
||||
}
|
||||
|
||||
public StyleSignature add(SName name) {
|
||||
return add(name.name().toLowerCase().replace("_", ""));
|
||||
}
|
||||
|
||||
public StyleSignature addStar() {
|
||||
final Set<String> result = new LinkedHashSet<>(names);
|
||||
result.add("*");
|
||||
return new StyleSignature(withDot, result);
|
||||
}
|
||||
|
||||
public boolean isStarred() {
|
||||
return names.contains("*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object arg) {
|
||||
final StyleSignature other = (StyleSignature) arg;
|
||||
return this.names.equals(other.names);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return names.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder result = new StringBuilder();
|
||||
for (String n : names) {
|
||||
if (result.length() > 0)
|
||||
result.append('.');
|
||||
|
||||
result.append(n);
|
||||
}
|
||||
return result.toString() + " " + withDot;
|
||||
}
|
||||
|
||||
public boolean matchAll(StyleSignature other) {
|
||||
if (other.isStarred() && names.contains("*") == false)
|
||||
return false;
|
||||
|
||||
for (String token : names) {
|
||||
if (token.equals("*"))
|
||||
continue;
|
||||
|
||||
if (other.names.contains(token) == false)
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final Set<String> getNames() {
|
||||
return Collections.unmodifiableSet(names);
|
||||
}
|
||||
|
||||
public static StyleSignature of(SName... names) {
|
||||
final List<String> result = new ArrayList<>();
|
||||
for (SName name : names)
|
||||
result.add(name.name().toLowerCase().replace("_", ""));
|
||||
|
||||
return new StyleSignature(false, result);
|
||||
}
|
||||
|
||||
public StyleSignature forStereotypeItself(Stereotype stereotype) {
|
||||
final List<String> result = new ArrayList<>(names);
|
||||
if (stereotype != null)
|
||||
for (String name : stereotype.getStyleNames())
|
||||
result.add(clean(name));
|
||||
|
||||
result.add(SName.stereotype.name().toLowerCase().replace("_", ""));
|
||||
return new StyleSignature(false, result);
|
||||
}
|
||||
|
||||
public StyleSignature with(Stereotype stereotype) {
|
||||
final List<String> result = new ArrayList<>(names);
|
||||
if (stereotype != null)
|
||||
for (String name : stereotype.getStyleNames())
|
||||
result.add(clean(name));
|
||||
|
||||
return new StyleSignature(true, result);
|
||||
}
|
||||
|
||||
public StyleSignature with(Stereostyles stereostyles) {
|
||||
if (stereostyles.isEmpty())
|
||||
return this;
|
||||
final List<String> result = new ArrayList<>(names);
|
||||
for (String name : stereostyles.getStyleNames())
|
||||
result.add(clean(name));
|
||||
|
||||
return new StyleSignature(true, result);
|
||||
}
|
||||
|
||||
private String clean(String name) {
|
||||
return name.toLowerCase().replace("_", "").replace(".", "");
|
||||
}
|
||||
|
||||
public StyleSignature mergeWith(List<Style> others) {
|
||||
final List<String> copy = new ArrayList<>(names);
|
||||
for (Style other : others)
|
||||
for (String s : other.getSignature().getNames())
|
||||
copy.add(s);
|
||||
|
||||
return new StyleSignature(withDot, copy);
|
||||
}
|
||||
|
||||
public StyleSignature mergeWith(StyleSignature other) {
|
||||
final List<String> copy = new ArrayList<>(names);
|
||||
copy.addAll(other.names);
|
||||
return new StyleSignature(withDot || other.withDot, copy);
|
||||
}
|
||||
|
||||
public Style getMergedStyle(StyleBuilder styleBuilder) {
|
||||
if (styleBuilder == null)
|
||||
return null;
|
||||
|
||||
return styleBuilder.getMergedStyle(this);
|
||||
}
|
||||
|
||||
public boolean match(Stereotype stereotype) {
|
||||
for (String s : stereotype.getMultipleLabels())
|
||||
if (names.contains(clean(s)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public final boolean isWithDot() {
|
||||
return withDot;
|
||||
}
|
||||
|
||||
// Frequent use
|
||||
|
||||
public static StyleSignature activity() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
|
||||
}
|
||||
|
||||
public static StyleSignature activityDiamond() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
public static StyleSignature activityArrow() {
|
||||
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.arrow);
|
||||
}
|
||||
public StyleSignature with(Stereostyles stereostyles);
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user