mirror of https://github.com/octoleo/plantuml.git
Import version 1.2022.4
This commit is contained in:
parent
dc18a98c57
commit
bee4d458eb
|
@ -35,10 +35,10 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplayPositioned;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
|
||||
|
@ -61,7 +61,6 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
|
|||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
|
||||
public class AnnotatedWorker {
|
||||
|
||||
|
@ -98,23 +97,13 @@ public class AnnotatedWorker {
|
|||
final double y1 = 10;
|
||||
final double y2 = 10;
|
||||
|
||||
final double deltaShadow;
|
||||
final FontConfiguration fontConfiguration;
|
||||
final UStroke stroke;
|
||||
final HColor borderColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.frame)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
deltaShadow = style.value(PName.Shadowing).asDouble();
|
||||
fontConfiguration = FontConfiguration.create(getSkinParam(), style);
|
||||
stroke = style.getStroke();
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
deltaShadow = getSkinParam().shadowing(null) ? 3 : 0;
|
||||
fontConfiguration = FontConfiguration.create(getSkinParam(), FontParam.CAPTION, null);
|
||||
stroke = new UStroke();
|
||||
borderColor = HColorUtils.BLACK;
|
||||
}
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.frame)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final double deltaShadow = style.value(PName.Shadowing).asDouble();
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(getSkinParam(), style);
|
||||
final UStroke stroke = style.getStroke();
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
final SymbolContext symbolContext = new SymbolContext(getBackgroundColor(), borderColor).withShadow(deltaShadow)
|
||||
.withStroke(stroke);
|
||||
|
@ -188,13 +177,10 @@ public class AnnotatedWorker {
|
|||
if (caption.isNull())
|
||||
return TextBlockUtils.empty(0, 0);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.caption)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return style.createTextBlockBordered(caption.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
}
|
||||
return caption.getDisplay().create(FontConfiguration.create(getSkinParam(), FontParam.CAPTION, null),
|
||||
HorizontalAlignment.CENTER, getSkinParam());
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.caption)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return style.createTextBlockBordered(caption.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
|
||||
}
|
||||
|
||||
private TextBlock addTitle(TextBlock original) {
|
||||
|
@ -202,16 +188,10 @@ public class AnnotatedWorker {
|
|||
if (title.isNull())
|
||||
return original;
|
||||
|
||||
final TextBlock block;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
block = style.createTextBlockBordered(title.getDisplay(), skinParam.getIHtmlColorSet(), skinParam);
|
||||
} else {
|
||||
final ISkinParam skinParam = getSkinParam();
|
||||
final FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, FontParam.TITLE, null);
|
||||
block = TextBlockUtils.title(fontConfiguration, title.getDisplay(), skinParam);
|
||||
}
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.title)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final TextBlock block = style.createTextBlockBordered(title.getDisplay(), skinParam.getIHtmlColorSet(),
|
||||
skinParam);
|
||||
|
||||
return DecorateEntityImage.addTop(original, block, HorizontalAlignment.CENTER);
|
||||
}
|
||||
|
@ -224,21 +204,15 @@ public class AnnotatedWorker {
|
|||
|
||||
TextBlock textFooter = null;
|
||||
if (footer.isNull() == false) {
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.footer)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.footer)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
textFooter = footer.createRibbon(FontConfiguration.create(getSkinParam(), FontParam.FOOTER, null),
|
||||
getSkinParam(), style);
|
||||
}
|
||||
TextBlock textHeader = null;
|
||||
if (header.isNull() == false) {
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = StyleSignatureBasic.of(SName.root, SName.document, SName.header)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.document, SName.header)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
textHeader = header.createRibbon(FontConfiguration.create(getSkinParam(), FontParam.HEADER, null),
|
||||
getSkinParam(), style);
|
||||
}
|
||||
|
|
|
@ -109,21 +109,17 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom {
|
|||
}
|
||||
|
||||
private String getImageSvg() throws IOException, InterruptedException {
|
||||
final boolean sav = UseStyle.useBetaStyle();
|
||||
final Diagram system = getSystem();
|
||||
final ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
system.exportDiagram(os, 0, new FileFormatOption(FileFormat.SVG));
|
||||
os.close();
|
||||
UseStyle.setBetaStyle(sav);
|
||||
return new String(os.toByteArray());
|
||||
}
|
||||
|
||||
private BufferedImage getImage() throws IOException, InterruptedException {
|
||||
if (image == null) {
|
||||
final boolean sav = UseStyle.useBetaStyle();
|
||||
if (image == null)
|
||||
image = getImageSlow();
|
||||
UseStyle.setBetaStyle(sav);
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,46 +105,10 @@ public class SkinParam implements ISkinParam {
|
|||
private SkinParam(UmlDiagramType type, ThemeStyle style) {
|
||||
this.themeStyle = style;
|
||||
this.type = type;
|
||||
UseStyle.setBetaStyle(false);
|
||||
if (type == UmlDiagramType.MINDMAP)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.WBS)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.GANTT)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.JSON)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.GIT)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.BOARD)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.YAML)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.HCL)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.NWDIAG)
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (type == UmlDiagramType.SEQUENCE) {
|
||||
// skin = "debug.skin";
|
||||
// USE_STYLE2.set(true);
|
||||
}
|
||||
// if (type == UmlDiagramType.ACTIVITY) {
|
||||
// // skin = "debug.skin";
|
||||
// USE_STYLE2.set(true);
|
||||
// }
|
||||
}
|
||||
|
||||
public StyleBuilder getCurrentStyleBuilder() {
|
||||
if (styleBuilder == null && UseStyle.useBetaStyle()) {
|
||||
if (styleBuilder == null) {
|
||||
try {
|
||||
this.styleBuilder = getCurrentStyleBuilderInternal();
|
||||
} catch (IOException e) {
|
||||
|
@ -155,8 +119,7 @@ public class SkinParam implements ISkinParam {
|
|||
}
|
||||
|
||||
public void muteStyle(Style modifiedStyle) {
|
||||
if (UseStyle.useBetaStyle())
|
||||
styleBuilder = getCurrentStyleBuilder().muteStyle(modifiedStyle);
|
||||
styleBuilder = getCurrentStyleBuilder().muteStyle(modifiedStyle);
|
||||
}
|
||||
|
||||
public String getDefaultSkin() {
|
||||
|
@ -201,31 +164,22 @@ public class SkinParam implements ISkinParam {
|
|||
public void setParam(String key, String value) {
|
||||
for (String key2 : cleanForKey(key)) {
|
||||
params.put(key2, StringUtils.trin(value));
|
||||
if (key2.startsWith("usebetastyle") && "true".equalsIgnoreCase(value))
|
||||
UseStyle.setBetaStyle(true);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
applyPendingStyleMigration();
|
||||
final FromSkinparamToStyle convertor = new FromSkinparamToStyle(key2);
|
||||
convertor.convertNow(value, getCurrentStyleBuilder());
|
||||
for (Style style : convertor.getStyles())
|
||||
muteStyle(style);
|
||||
} else {
|
||||
paramsPendingForStyleMigration.put(key, value);
|
||||
}
|
||||
applyPendingStyleMigration();
|
||||
final FromSkinparamToStyle convertor = new FromSkinparamToStyle(key2);
|
||||
convertor.convertNow(value, getCurrentStyleBuilder());
|
||||
for (Style style : convertor.getStyles())
|
||||
muteStyle(style);
|
||||
}
|
||||
if ("style".equalsIgnoreCase(key) && "strictuml".equalsIgnoreCase(value)) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final InputStream internalIs = StyleLoader.class.getResourceAsStream("/skin/strictuml.skin");
|
||||
final StyleBuilder styleBuilder = this.getCurrentStyleBuilder();
|
||||
try {
|
||||
final BlocLines lines = BlocLines.load(internalIs, null);
|
||||
for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines, styleBuilder))
|
||||
this.muteStyle(modifiedStyle);
|
||||
final InputStream internalIs = StyleLoader.class.getResourceAsStream("/skin/strictuml.skin");
|
||||
final StyleBuilder styleBuilder = this.getCurrentStyleBuilder();
|
||||
try {
|
||||
final BlocLines lines = BlocLines.load(internalIs, null);
|
||||
for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines, styleBuilder))
|
||||
this.muteStyle(modifiedStyle);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -308,8 +262,7 @@ public class SkinParam implements ISkinParam {
|
|||
}
|
||||
|
||||
public String getValue(String key) {
|
||||
if (UseStyle.useBetaStyle())
|
||||
applyPendingStyleMigration();
|
||||
applyPendingStyleMigration();
|
||||
for (String key2 : cleanForKey(key)) {
|
||||
final String result = params.get(key2);
|
||||
if (result != null)
|
||||
|
|
|
@ -275,20 +275,15 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
|||
}
|
||||
|
||||
public HColor calculateBackColor() {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic
|
||||
.of(SName.root, SName.document, this.getUmlDiagramType().getStyleName())
|
||||
.getMergedStyle(this.getSkinParam().getCurrentStyleBuilder());
|
||||
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(),
|
||||
this.getSkinParam().getIHtmlColorSet());
|
||||
if (backgroundColor == null) {
|
||||
backgroundColor = HColorUtils.transparent();
|
||||
}
|
||||
return backgroundColor;
|
||||
HColor backgroundColor = style.value(PName.BackGroundColor).asColor(this.getSkinParam().getThemeStyle(),
|
||||
this.getSkinParam().getIHtmlColorSet());
|
||||
if (backgroundColor == null)
|
||||
backgroundColor = HColorUtils.transparent();
|
||||
|
||||
}
|
||||
return this.getSkinParam().getBackgroundColor();
|
||||
return backgroundColor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,19 +37,8 @@ package net.sourceforge.plantuml;
|
|||
|
||||
public class UseStyle {
|
||||
|
||||
private static final ThreadLocal<Boolean> useBeta = new ThreadLocal<>();
|
||||
|
||||
static public boolean useBetaStyle() {
|
||||
// final Boolean result = useBeta.get();
|
||||
// if (result == null) {
|
||||
// return false;
|
||||
// }
|
||||
// return result;
|
||||
return true;
|
||||
}
|
||||
|
||||
static public void setBetaStyle(boolean betastyle) {
|
||||
useBeta.set(betastyle);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,10 +38,8 @@ package net.sourceforge.plantuml.activitydiagram3;
|
|||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
|
@ -99,15 +97,10 @@ public class Branch {
|
|||
this.inlabel = Objects.requireNonNull(inlabel);
|
||||
this.labelTest = Objects.requireNonNull(labelTest);
|
||||
this.labelPositive = Objects.requireNonNull(labelPositive);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(styleBuilder);
|
||||
this.color = color == null
|
||||
? style.value(PName.BackGroundColor).asColor(styleBuilder.getSkinParam().getThemeStyle(),
|
||||
styleBuilder.getSkinParam().getIHtmlColorSet())
|
||||
: color;
|
||||
} else {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(styleBuilder);
|
||||
this.color = color == null ? style.value(PName.BackGroundColor).asColor(
|
||||
styleBuilder.getSkinParam().getThemeStyle(), styleBuilder.getSkinParam().getIHtmlColorSet()) : color;
|
||||
|
||||
this.list = new InstructionList(swimlane);
|
||||
}
|
||||
|
@ -248,15 +241,10 @@ public class Branch {
|
|||
if (display == null)
|
||||
return TextBlockUtils.EMPTY_TEXT_BLOCK;
|
||||
|
||||
LineBreakStrategy lineBreak = LineBreakStrategy.NONE;
|
||||
final FontConfiguration fcArrow;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
lineBreak = style.wrapWidth();
|
||||
fcArrow = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final LineBreakStrategy lineBreak = style.wrapWidth();
|
||||
final FontConfiguration fcArrow = style.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
return display.create0(fcArrow, HorizontalAlignment.LEFT, skinParam(), lineBreak, CreoleMode.SIMPLE_LINE, null,
|
||||
null);
|
||||
|
|
|
@ -138,39 +138,19 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
|
|||
final String stereo = arg.get("STEREO", 0);
|
||||
final Stereotype stereotype = stereo == null ? null : Stereotype.build(stereo);
|
||||
|
||||
HColor backColor;
|
||||
// Warning : titleColor unused in FTileGroupW
|
||||
HColor titleColor;
|
||||
HColor borderColor;
|
||||
double roundCorner;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style stylePartition = getDefaultStyleDefinitionPartition(symbol).withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
borderColor = stylePartition.value(PName.LineColor).asColor(diagram.getSkinParam().getThemeStyle(),
|
||||
final Style stylePartition = getDefaultStyleDefinitionPartition(symbol).withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor = stylePartition.value(PName.LineColor).asColor(diagram.getSkinParam().getThemeStyle(),
|
||||
diagram.getSkinParam().getIHtmlColorSet());
|
||||
HColor backColor = colors.getColor(ColorType.BACK);
|
||||
if (backColor == null)
|
||||
backColor = stylePartition.value(PName.BackGroundColor).asColor(diagram.getSkinParam().getThemeStyle(),
|
||||
diagram.getSkinParam().getIHtmlColorSet());
|
||||
backColor = colors.getColor(ColorType.BACK);
|
||||
if (backColor == null)
|
||||
backColor = stylePartition.value(PName.BackGroundColor).asColor(diagram.getSkinParam().getThemeStyle(),
|
||||
diagram.getSkinParam().getIHtmlColorSet());
|
||||
|
||||
titleColor = HColorUtils.BLUE;// stylePartition.value(PName.FontColor).asColor(diagram.getSkinParam().getIHtmlColorSet());
|
||||
roundCorner = stylePartition.value(PName.RoundCorner).asDouble();
|
||||
} else {
|
||||
final HColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(getColorParamBack(symbol),
|
||||
stereotype, false);
|
||||
if (backColorInSkinparam == null)
|
||||
backColor = colors.getColor(ColorType.BACK);
|
||||
else
|
||||
backColor = backColorInSkinparam;
|
||||
|
||||
titleColor = colors.getColor(ColorType.HEADER);
|
||||
|
||||
borderColor = diagram.getSkinParam().getHtmlColor(getColorParamBorder(symbol), stereotype, false);
|
||||
if (borderColor == null)
|
||||
borderColor = HColorUtils.BLACK;
|
||||
roundCorner = symbol.getSkinParameter().getRoundCorner(diagram.getSkinParam(), stereotype);
|
||||
}
|
||||
final HColor titleColor = HColorUtils.BLUE;// stylePartition.value(PName.FontColor).asColor(diagram.getSkinParam().getIHtmlColorSet());
|
||||
final double roundCorner = stylePartition.value(PName.RoundCorner).asDouble();
|
||||
|
||||
diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor, symbol,
|
||||
roundCorner);
|
||||
|
|
|
@ -74,9 +74,8 @@ public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> {
|
|||
: diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s);
|
||||
|
||||
String test = arg.get("TEST", 0);
|
||||
if (test.length() == 0) {
|
||||
if (test.length() == 0)
|
||||
test = null;
|
||||
}
|
||||
|
||||
diagram.startSwitch(Display.getWithNewlines(test), color);
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ import java.util.List;
|
|||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -89,14 +87,7 @@ public abstract class AbstractFtile extends AbstractTextBlock implements Ftile {
|
|||
}
|
||||
|
||||
public final UStroke getThickness(Style style) {
|
||||
if (UseStyle.useBetaStyle())
|
||||
return style.getStroke();
|
||||
|
||||
UStroke thickness = skinParam.getThickness(LineParam.activityBorder, null);
|
||||
if (thickness == null) {
|
||||
thickness = new UStroke(1.5);
|
||||
}
|
||||
return thickness;
|
||||
return style.getStroke();
|
||||
}
|
||||
|
||||
public List<WeldingPoint> getWeldingPoints() {
|
||||
|
|
|
@ -35,45 +35,21 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
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.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
public class EntityImageLegend {
|
||||
|
||||
public static TextBlock create(Display note, ISkinParam skinParam) {
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
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);
|
||||
}
|
||||
|
||||
final TextBlock textBlock = note.create(FontConfiguration.create(skinParam, FontParam.LEGEND, null),
|
||||
HorizontalAlignment.LEFT, skinParam);
|
||||
final Rose rose = new Rose();
|
||||
final HColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground);
|
||||
final HColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder);
|
||||
final UStroke stroke = skinParam.getThickness(LineParam.legendBorder, null);
|
||||
|
||||
final int cornersize = 10;
|
||||
final TextBlock result = TextBlockUtils.bordered(textBlock, stroke, legendColor, legendBackgroundColor,
|
||||
cornersize);
|
||||
return TextBlockUtils.withMargin(result, 8, 8);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,10 +39,8 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ForkStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Instruction;
|
||||
|
@ -86,48 +84,35 @@ public class FtileFactoryDelegator implements FtileFactory {
|
|||
Rainbow color;
|
||||
final LinkRendering linkRendering = tile.getInLinkRendering();
|
||||
if (linkRendering == null) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
} else {
|
||||
color = Rainbow.build(skinParam());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
} else {
|
||||
color = linkRendering.getRainbow();
|
||||
}
|
||||
if (color.size() == 0) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
} else {
|
||||
color = Rainbow.build(skinParam());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
protected final TextBlock getTextBlock(Display display) {
|
||||
// DUP3945
|
||||
if (Display.isNull(display)) {
|
||||
if (Display.isNull(display))
|
||||
return null;
|
||||
}
|
||||
final FontConfiguration fontConfiguration;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
||||
protected Display getInLinkRenderingDisplay(Ftile tile) {
|
||||
final LinkRendering linkRendering = tile.getInLinkRendering();
|
||||
if (linkRendering == null) {
|
||||
if (linkRendering == null)
|
||||
return Display.NULL;
|
||||
}
|
||||
|
||||
return linkRendering.getDisplay();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,16 +35,11 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
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;
|
||||
|
@ -94,15 +89,10 @@ public class LaneDivider extends AbstractTextBlock {
|
|||
final UShape back = new UEmpty(x1 + x2, 1);
|
||||
ug.draw(back);
|
||||
|
||||
HColor color = skinParam.getHtmlColor(ColorParam.swimlaneBorder, null, false);
|
||||
if (color == null) {
|
||||
color = ColorParam.swimlaneBorder.getDefaultValue();
|
||||
}
|
||||
UStroke thickness = Rose.getStroke(skinParam, LineParam.swimlaneBorder, 2);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
thickness = getStyle().getStroke();
|
||||
}
|
||||
final HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final UStroke thickness = getStyle().getStroke();
|
||||
|
||||
ug.apply(UTranslate.dx(x1)).apply(thickness).apply(color).draw(ULine.vline(height));
|
||||
|
||||
}
|
||||
|
|
|
@ -35,18 +35,14 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.Pragma;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Instruction;
|
||||
import net.sourceforge.plantuml.activitydiagram3.InstructionList;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
|
@ -63,6 +59,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicIntercep
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.VCompactFactory;
|
||||
import net.sourceforge.plantuml.activitydiagram3.gtile.GConnection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.gtile.Gtile;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -258,24 +255,21 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
|||
|
||||
private TextBlock getTitle(Swimlane swimlane) {
|
||||
final HorizontalAlignment horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, FontParam.SWIMLANE_TITLE, null);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
fontConfiguration = getStyle().getFontConfiguration(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
}
|
||||
final FontConfiguration fontConfiguration = getStyle().getFontConfiguration(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
LineBreakStrategy wrap = getWrap();
|
||||
if (wrap.isAuto()) {
|
||||
if (wrap.isAuto())
|
||||
wrap = new LineBreakStrategy("" + ((int) swimlane.getActualWidth()));
|
||||
}
|
||||
|
||||
return swimlane.getDisplay().create9(fontConfiguration, horizontalAlignment, skinParam, wrap);
|
||||
}
|
||||
|
||||
private LineBreakStrategy getWrap() {
|
||||
LineBreakStrategy wrap = skinParam.swimlaneWrapTitleWidth();
|
||||
if (wrap == LineBreakStrategy.NONE) {
|
||||
if (wrap == LineBreakStrategy.NONE)
|
||||
wrap = skinParam.wrapWidth();
|
||||
}
|
||||
|
||||
return wrap;
|
||||
}
|
||||
|
||||
|
@ -333,11 +327,9 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable
|
|||
}
|
||||
|
||||
private void drawTitlesBackground(UGraphic ug) {
|
||||
HColor color = skinParam.getHtmlColor(ColorParam.swimlaneTitleBackground, null, false);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
}
|
||||
final HColor color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
if (color != null) {
|
||||
final double titleHeight = getTitlesHeight(ug.getStringBounder());
|
||||
double fullWidth = swimlanesSpecial().get(swimlanesSpecial().size() - 1).getTranslate().getDx() - 2 * 5 - 1;
|
||||
|
|
|
@ -45,12 +45,9 @@ import java.util.List;
|
|||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
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.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.ULine;
|
||||
|
@ -97,15 +94,10 @@ public class Worm implements Iterable<Point2D.Double> {
|
|||
|
||||
ug = ug.apply(arrowColor);
|
||||
ug = ug.apply(arrowColor.bg());
|
||||
if (linkStyle.isNormal()) {
|
||||
UStroke stroke = new UStroke(strokeValue);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
stroke = style.getStroke();
|
||||
}
|
||||
ug = ug.apply(stroke);
|
||||
} else {
|
||||
if (linkStyle.isNormal())
|
||||
ug = ug.apply(style.getStroke());
|
||||
else
|
||||
ug = ug.apply(linkStyle.goThickness(strokeValue).getStroke3());
|
||||
}
|
||||
|
||||
boolean drawn = false;
|
||||
for (int i = 0; i < points.size() - 1; i++) {
|
||||
|
|
|
@ -102,9 +102,9 @@ public abstract class AbstractParallelFtilesBuilder {
|
|||
|
||||
final protected double computeMaxHeight(List<Ftile> all) {
|
||||
double height = 0;
|
||||
for (Ftile tmp : all) {
|
||||
for (Ftile tmp : all)
|
||||
height = Math.max(height, tmp.calculateDimension(getStringBounder()).getHeight());
|
||||
}
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
|
@ -131,16 +131,13 @@ public abstract class AbstractParallelFtilesBuilder {
|
|||
|
||||
protected final TextBlock getTextBlock(Display display) {
|
||||
// DUP3945
|
||||
if (Display.isNull(display)) {
|
||||
if (Display.isNull(display))
|
||||
return null;
|
||||
}
|
||||
final FontConfiguration fontConfiguration;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyleSignatureArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
final Style style = getStyleSignatureArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,13 +35,9 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -54,7 +50,6 @@ 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.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -70,31 +65,16 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
|
|||
|
||||
public FloatingNote(Display note, ISkinParam skinParam) {
|
||||
|
||||
final Rose rose = new Rose();
|
||||
|
||||
UStroke stroke = new UStroke();
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
final double shadowing;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
wrapWidth = style.wrapWidth();
|
||||
fc = FontConfiguration.create(skinParam, style);
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
stroke = style.getStroke();
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else {
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.note)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final FontConfiguration fc = FontConfiguration.create(skinParam, style);
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final UStroke stroke = style.getStroke();
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
|
|
@ -37,11 +37,9 @@ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.Pragma;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
|
@ -74,35 +72,19 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
|
|||
final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle();
|
||||
final Branch branch0 = thens.get(0);
|
||||
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
final Rainbow arrowColor;
|
||||
final FontConfiguration fcTest;
|
||||
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE_HEXAGON ? FontParam.ACTIVITY_DIAMOND
|
||||
: FontParam.ARROW;
|
||||
final FontConfiguration fcArrow;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
backColor = branch0.getColor() == null ? styleDiamond.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
fcTest = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
fcArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = branch0.getColor() == null
|
||||
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: branch0.getColor();
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fcTest = FontConfiguration.create(skinParam(), testParam, null)
|
||||
.changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor backColor = branch0.getColor() == null ? styleDiamond.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(),
|
||||
skinParam().getThemeStyle());
|
||||
final FontConfiguration fcTest = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final FontConfiguration fcArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
if (thens.size() > 1) {
|
||||
if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */)
|
||||
|
|
|
@ -35,12 +35,8 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
||||
|
@ -55,10 +51,10 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -80,36 +76,19 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
|
|||
|
||||
final ConditionStyle conditionStyle = skinParam().getConditionStyle();
|
||||
|
||||
final HColor borderColor;
|
||||
final HColor diamondColor;
|
||||
final Rainbow arrowColor;
|
||||
final FontConfiguration fcDiamond;
|
||||
final FontConfiguration fcArrow;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
diamondColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
fcDiamond = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
fcArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
// diamondColor = color == null ? getRose().getHtmlColor(skinParam(),
|
||||
// ColorParam.activityDiamondBackground) : color;
|
||||
if (colors.getColor(ColorType.BACK) != null && Display.isNull(startLabel)) {
|
||||
diamondColor = colors.getColor(ColorType.BACK);
|
||||
} else {
|
||||
diamondColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
|
||||
}
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fcDiamond = FontConfiguration.create(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
fcArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor diamondColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(),
|
||||
skinParam().getThemeStyle());
|
||||
final FontConfiguration fcDiamond = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final FontConfiguration fcArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
final LinkRendering endRepeatLinkRendering = repeat.getOutLinkRendering();
|
||||
final Rainbow endRepeatLinkColor = endRepeatLinkRendering == null ? null : endRepeatLinkRendering.getRainbow();
|
||||
|
|
|
@ -35,14 +35,10 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
|
@ -57,6 +53,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.FtileSwitch
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateInLabel;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOutLabel;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -112,13 +109,9 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||
ftiles.add(new FtileDecorateOutLabel(new FtileDecorateInLabel(branch.getFtile(), dimLabelIn), dimLabelOut));
|
||||
}
|
||||
|
||||
final Rainbow arrowColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
arrowColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
} else {
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Rainbow arrowColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
|
||||
if (ftiles.size() == 1) {
|
||||
final FtileSwitchWithOneLink result = new FtileSwitchWithOneLink(ftiles, branches, swimlane, diamond1,
|
||||
diamond2, getStringBounder(), arrowColor);
|
||||
|
@ -133,24 +126,15 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||
private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) {
|
||||
|
||||
LineBreakStrategy lineBreak = LineBreakStrategy.NONE;
|
||||
final FontConfiguration fcDiamond;
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
lineBreak = style.wrapWidth();
|
||||
fcDiamond = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
} else {
|
||||
fcDiamond = FontConfiguration.create(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = branch0.getColor() == null
|
||||
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: branch0.getColor();
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
lineBreak = style.wrapWidth();
|
||||
final FontConfiguration fcDiamond = style.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
|
||||
final TextBlock tbTest;
|
||||
if (Display.isNull(test) || test.isWhite())
|
||||
|
@ -163,27 +147,15 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
|
|||
}
|
||||
|
||||
private Ftile getDiamond2(Swimlane swimlane, Branch branch0) {
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
} else {
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = branch0.getColor() == null
|
||||
? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: branch0.getColor();
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor)
|
||||
.asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor();
|
||||
|
||||
return new FtileDiamondInside(TextBlockUtils.empty(0, 0), branch0.skinParam(), backColor, borderColor,
|
||||
swimlane);
|
||||
}
|
||||
|
||||
// private HColor fontColor(FontParam param) {
|
||||
// return skinParam().getFontHtmlColor(null, param);
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -37,20 +37,17 @@ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Instruction;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileBreak;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Genealogy;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
|
||||
|
@ -74,34 +71,21 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
|
|||
public Ftile createWhile(LinkRendering outColor, Swimlane swimlane, Ftile whileBlock, Display test, Display yes,
|
||||
HColor color, Instruction specialOut, Ftile backward, LinkRendering incoming1, LinkRendering incoming2) {
|
||||
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
final Rainbow arrowColor;
|
||||
final FontConfiguration fontArrow;
|
||||
final FontConfiguration fcTest;
|
||||
final ConditionStyle conditionStyle = skinParam().getConditionStyle();
|
||||
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE_HEXAGON ? FontParam.ACTIVITY_DIAMOND
|
||||
: FontParam.ARROW;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
fontArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
fcTest = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground)
|
||||
: color;
|
||||
arrowColor = Rainbow.build(skinParam());
|
||||
fontArrow = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
fcTest = FontConfiguration.create(skinParam(), testParam, null);
|
||||
}
|
||||
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getDefaultStyleDefinitionDiamond()
|
||||
.getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet(),
|
||||
skinParam().getThemeStyle());
|
||||
final FontConfiguration fontArrow = styleArrow.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final FontConfiguration fcTest = styleDiamond.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
incoming1 = ensureColor(incoming1, arrowColor);
|
||||
incoming2 = ensureColor(incoming2, arrowColor);
|
||||
|
|
|
@ -35,21 +35,18 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -66,12 +63,10 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
|||
import net.sourceforge.plantuml.svek.UGraphicForSnake;
|
||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
import net.sourceforge.plantuml.utils.MathUtils;
|
||||
|
||||
public class FtileGroup extends AbstractFtile {
|
||||
|
@ -98,31 +93,17 @@ public class FtileGroup extends AbstractFtile {
|
|||
this.type = type;
|
||||
this.inner = FtileUtils.addHorizontalMargin(inner, 10);
|
||||
|
||||
final FontConfiguration fc;
|
||||
final Style style;
|
||||
final UStroke thickness;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = backColor == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet())
|
||||
: backColor;
|
||||
this.borderColor = borderColor == null
|
||||
? style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet())
|
||||
: borderColor;
|
||||
thickness = style.getStroke();
|
||||
} else {
|
||||
this.backColor = backColor == null ? HColorUtils.WHITE : backColor;
|
||||
this.borderColor = borderColor == null ? HColorUtils.BLACK : borderColor;
|
||||
style = null;
|
||||
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION);
|
||||
final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
|
||||
fc = FontConfiguration.create(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
thickness = skinParam.getThickness(LineParam.partitionBorder, null);
|
||||
}
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = backColor == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet())
|
||||
: backColor;
|
||||
this.borderColor = borderColor == null
|
||||
? style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet())
|
||||
: borderColor;
|
||||
final UStroke thickness = style.getStroke();
|
||||
|
||||
if (title == null)
|
||||
this.name = TextBlockUtils.empty(0, 0);
|
||||
else
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -43,10 +42,8 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
|
@ -61,6 +58,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -123,16 +121,9 @@ class FtileIfAndStop extends AbstractFtile {
|
|||
|
||||
final Ftile stopFtile = ftileFactory.stop(swimlane);
|
||||
|
||||
final UStroke thickness;
|
||||
final FontConfiguration fcTest;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = StyleSignatureBasic.activityDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
thickness = tileNonStop.getThickness(style);
|
||||
fcTest = FontConfiguration.create(skinParam, style);
|
||||
} else {
|
||||
thickness = tileNonStop.getThickness(null);
|
||||
fcTest = FontConfiguration.create(skinParam, FontParam.ACTIVITY_DIAMOND, null);
|
||||
}
|
||||
final Style style = StyleSignatureBasic.activityDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final UStroke thickness = tileNonStop.getThickness(style);
|
||||
final FontConfiguration fcTest = FontConfiguration.create(skinParam, style);
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fcTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
|
|
@ -35,20 +35,18 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -60,7 +58,6 @@ 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.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -105,27 +102,14 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable
|
|||
super(skinParam);
|
||||
this.swimlane = swimlane;
|
||||
this.withOutPoint = withOutPoint;
|
||||
final Rose rose = new Rose();
|
||||
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final double shadowing;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
UStroke stroke = new UStroke();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
final FontConfiguration fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -43,18 +42,16 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -67,7 +64,6 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
|||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.sequencediagram.NotePosition;
|
||||
import net.sourceforge.plantuml.sequencediagram.NoteType;
|
||||
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;
|
||||
|
@ -127,41 +123,23 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
|||
private FtileWithNoteOpale(Ftile tile, PositionedNote note, ISkinParam skinParam, boolean withLink) {
|
||||
super(tile.skinParam());
|
||||
this.swimlaneNote = note.getSwimlaneNote();
|
||||
if (note.getColors() != null) {
|
||||
if (note.getColors() != null)
|
||||
skinParam = note.getColors().mute(skinParam);
|
||||
}
|
||||
|
||||
this.tile = tile;
|
||||
this.notePosition = note.getNotePosition();
|
||||
if (note.getType() == NoteType.FLOATING_NOTE) {
|
||||
if (note.getType() == NoteType.FLOATING_NOTE)
|
||||
withLink = false;
|
||||
}
|
||||
|
||||
final Rose rose = new Rose();
|
||||
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final FontConfiguration fc;
|
||||
UStroke stroke = new UStroke();
|
||||
|
||||
final double shadowing;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
||||
false, null);
|
||||
|
|
|
@ -35,21 +35,18 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -103,37 +100,21 @@ public class FtileWithNotes extends AbstractFtile {
|
|||
super(tile.skinParam());
|
||||
this.tile = tile;
|
||||
|
||||
final Rose rose = new Rose();
|
||||
|
||||
for (PositionedNote note : notes) {
|
||||
ISkinParam skinParam2 = skinParam;
|
||||
if (note.getColors() != null)
|
||||
skinParam2 = note.getColors().mute(skinParam2);
|
||||
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final FontConfiguration fc;
|
||||
final double shadowing;
|
||||
UStroke stroke = new UStroke();
|
||||
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam2, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam2, ColorParam.noteBorder);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
|
|
@ -35,14 +35,12 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
||||
|
@ -56,6 +54,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBlackBlock;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
|
@ -136,12 +135,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
|
|||
double x = 0;
|
||||
for (Ftile tmp : list99) {
|
||||
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
||||
final Rainbow def;
|
||||
if (UseStyle.useBetaStyle())
|
||||
def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
else
|
||||
def = Rainbow.build(skinParam());
|
||||
|
||||
final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
final Rainbow rainbow = tmp.getInLinkRendering().getRainbow(def);
|
||||
conns.add(new ConnectionIn(black, tmp, x, rainbow));
|
||||
x += dim.getWidth();
|
||||
|
@ -200,12 +194,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
|
|||
double x = 0;
|
||||
for (Ftile tmp : list99) {
|
||||
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
||||
final Rainbow def;
|
||||
if (UseStyle.useBetaStyle())
|
||||
def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
else
|
||||
def = Rainbow.build(skinParam());
|
||||
|
||||
final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
final Rainbow rainbow = tmp.getOutLinkRendering().getRainbow(def);
|
||||
if (tmp.calculateDimension(getStringBounder()).hasPointOut())
|
||||
conns.add(new ConnectionOut(tmp, out, x, rainbow, getJustBeforeBar2(middle, getStringBounder())));
|
||||
|
|
|
@ -35,14 +35,12 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
||||
|
@ -54,6 +52,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBlackBlock;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
|
@ -80,13 +79,8 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
|
|||
double x = 0;
|
||||
for (Ftile tmp : list99) {
|
||||
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
||||
final Rainbow def;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
} else {
|
||||
def = Rainbow.build(skinParam());
|
||||
}
|
||||
Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
final Rainbow rainbow = tmp.getInLinkRendering().getRainbow(def);
|
||||
conns.add(new ConnectionIn(black, tmp, x, rainbow));
|
||||
x += dim.getWidth();
|
||||
|
@ -102,19 +96,12 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
|
|||
@Override
|
||||
protected Ftile doStep2(Ftile inner, Ftile result) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
backColor = style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
|
||||
backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
final HColor backColor = style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
|
||||
}
|
||||
final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2());
|
||||
result = new FtileAssemblySimple(result, out);
|
||||
final List<Connection> conns = new ArrayList<>();
|
||||
|
@ -124,12 +111,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
|
|||
for (Ftile tmp : list99) {
|
||||
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
|
||||
final UTranslate translate0 = new UTranslate(x, barHeight);
|
||||
final Rainbow def;
|
||||
if (UseStyle.useBetaStyle())
|
||||
def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
else
|
||||
def = Rainbow.build(skinParam());
|
||||
|
||||
final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
final Rainbow rainbow = tmp.getOutLinkRendering().getRainbow(def);
|
||||
if (tmp.calculateDimension(getStringBounder()).hasPointOut())
|
||||
conns.add(new ConnectionHorizontalThenVertical(tmp, out, rainbow, translate0, diamondTranslate));
|
||||
|
|
|
@ -78,12 +78,8 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||
protected Ftile doStep1(Ftile inner) {
|
||||
Ftile result = inner;
|
||||
final List<Connection> conns = new ArrayList<>();
|
||||
final Rainbow thinColor;
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
if (UseStyle.useBetaStyle())
|
||||
thinColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
else
|
||||
thinColor = result.getInLinkRendering().getRainbow(Rainbow.build(skinParam()));
|
||||
final Rainbow thinColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle());
|
||||
|
||||
final Ftile thin = new FtileThinSplit(skinParam(), getThin1Color(thinColor), list99.get(0).getSwimlaneIn());
|
||||
double x = 0;
|
||||
|
@ -97,12 +93,8 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||
last = x + dim.getLeft();
|
||||
|
||||
final LinkRendering inLinkRendering = tmp.getInLinkRendering();
|
||||
final Rainbow rainbow;
|
||||
if (UseStyle.useBetaStyle())
|
||||
rainbow = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
else
|
||||
rainbow = inLinkRendering.getRainbow(Rainbow.build(skinParam()));
|
||||
final Rainbow rainbow = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
|
||||
conns.add(new ConnectionIn(thin, tmp, x, rainbow));
|
||||
x += dim.getWidth();
|
||||
|
@ -124,13 +116,9 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||
private HColor getThin1Color(final Rainbow thinColor) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
for (Ftile tmp : list99) {
|
||||
final Rainbow rainbow;
|
||||
final LinkRendering inLinkRendering = tmp.getInLinkRendering();
|
||||
if (UseStyle.useBetaStyle())
|
||||
rainbow = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
else
|
||||
rainbow = inLinkRendering.getRainbow(Rainbow.build(skinParam()));
|
||||
final Rainbow rainbow = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
|
||||
if (rainbow.isInvisible() == false)
|
||||
return thinColor.getColor();
|
||||
|
@ -155,13 +143,9 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||
return new FtileKilled(result);
|
||||
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final Rainbow thinColor;
|
||||
final LinkRendering inLinkRendering = result.getInLinkRendering();
|
||||
if (UseStyle.useBetaStyle())
|
||||
thinColor = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
else
|
||||
thinColor = inLinkRendering.getRainbow(Rainbow.build(skinParam()));
|
||||
final Rainbow thinColor = inLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
|
||||
final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlaneOutForStep2());
|
||||
result = new FtileAssemblySimple(result, out);
|
||||
|
@ -179,13 +163,9 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
|
|||
last = x + dim.getLeft();
|
||||
}
|
||||
|
||||
final Rainbow rainbow;
|
||||
final LinkRendering outLinkRendering = tmp.getOutLinkRendering();
|
||||
if (UseStyle.useBetaStyle())
|
||||
rainbow = outLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
else
|
||||
rainbow = outLinkRendering.getRainbow(Rainbow.build(skinParam()));
|
||||
final Rainbow rainbow = outLinkRendering
|
||||
.getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()));
|
||||
|
||||
if (tmp.calculateDimension(getStringBounder()).hasPointOut())
|
||||
conns.add(new ConnectionOut(translate0, tmp, out, x, rainbow, getHeightOfMiddle(inner)));
|
||||
|
|
|
@ -39,11 +39,9 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ForkStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Instruction;
|
||||
|
@ -111,53 +109,34 @@ public class VCompactFactory implements FtileFactory {
|
|||
}
|
||||
|
||||
public Ftile start(Swimlane swimlane) {
|
||||
final HColor color;
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
color = rose.getHtmlColor(skinParam, ColorParam.activityStart);
|
||||
}
|
||||
final Style style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
return new FtileCircleStart(skinParam(), color, swimlane, style);
|
||||
}
|
||||
|
||||
public Ftile stop(Swimlane swimlane) {
|
||||
final HColor borderColor;
|
||||
Style style = null;
|
||||
final HColor backgroundColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
backgroundColor = skinParam.getBackgroundColor();
|
||||
} else {
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.activityEnd);
|
||||
backgroundColor = skinParam.getBackgroundColor();
|
||||
}
|
||||
final Style style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor backgroundColor = skinParam.getBackgroundColor();
|
||||
return new FtileCircleStop(skinParam(), backgroundColor, borderColor, swimlane, style);
|
||||
}
|
||||
|
||||
public Ftile spot(Swimlane swimlane, String spot, HColor color) {
|
||||
final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY);
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getSignatureCircleSpot().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = getSignatureCircleSpot().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new FtileCircleSpot(skinParam(), swimlane, spot, font, color, style);
|
||||
}
|
||||
|
||||
public Ftile end(Swimlane swimlane) {
|
||||
final HColor borderColor;
|
||||
Style style = null;
|
||||
final HColor backgroundColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
backgroundColor = skinParam.getBackgroundColor();
|
||||
} else {
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.activityEnd);
|
||||
backgroundColor = skinParam.getBackgroundColor();
|
||||
}
|
||||
|
||||
final Style style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor backgroundColor = skinParam.getBackgroundColor();
|
||||
|
||||
return new FtileCircleEnd(skinParam(), backgroundColor, borderColor, swimlane, style);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,25 +35,23 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileEmpty;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileMinWidthCentered;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileWithUrl;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileIfDown;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondSquare;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -65,7 +63,6 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
|||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
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.StyleSignatureBasic;
|
||||
|
@ -108,42 +105,24 @@ public class ConditionalBuilder {
|
|||
FtileFactory ftileFactory, ConditionStyle conditionStyle, ConditionEndStyle conditionEndStyle,
|
||||
Branch branch1, Branch branch2, ISkinParam skinParam, StringBounder stringBounder,
|
||||
FontConfiguration fontArrow, FontConfiguration fontTest, Url url) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
if (backColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
if (borderColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
if (arrowColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
final Style styleArrow = getStyleSignatureArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getStyleSignatureDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.diamondLineBreak = styleDiamond.wrapWidth();
|
||||
this.labelLineBreak = styleArrow.wrapWidth();
|
||||
this.borderColor = borderColor; /*
|
||||
* styleDiamond.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
* skinParam.getIHtmlColorSet());
|
||||
*/
|
||||
this.backColor = backColor;
|
||||
/*
|
||||
* styleDiamond.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
* skinParam.getIHtmlColorSet())
|
||||
*/;
|
||||
this.arrowColor = arrowColor;/*
|
||||
* Rainbow.fromColor(
|
||||
* styleArrow.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
* skinParam.getIHtmlColorSet()), null);
|
||||
*/
|
||||
this.fontTest = styleDiamond.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
this.fontArrow = styleArrow.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
this.diamondLineBreak = LineBreakStrategy.NONE;
|
||||
this.labelLineBreak = LineBreakStrategy.NONE;
|
||||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.arrowColor = arrowColor;
|
||||
this.fontTest = fontTest;
|
||||
this.fontArrow = fontArrow;
|
||||
}
|
||||
|
||||
if (backColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
if (borderColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
if (arrowColor == null)
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
final Style styleArrow = getStyleSignatureArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleDiamond = getStyleSignatureDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.fontTest = styleDiamond.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
this.fontArrow = styleArrow.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
this.diamondLineBreak = styleDiamond.wrapWidth();
|
||||
this.labelLineBreak = styleArrow.wrapWidth();
|
||||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.arrowColor = arrowColor;
|
||||
|
||||
this.ftileFactory = ftileFactory;
|
||||
this.swimlane = swimlane;
|
||||
this.conditionStyle = conditionStyle;
|
||||
|
@ -261,7 +240,7 @@ public class ConditionalBuilder {
|
|||
final Sheet sheet = Parser.build(fontTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT),
|
||||
skinParam, CreoleMode.FULL).createSheet(labelTest);
|
||||
final SheetBlock1 sheetBlock1 = new SheetBlock1(sheet, diamondLineBreak, skinParam.getPadding());
|
||||
|
||||
|
||||
final UStroke thickness = tile1
|
||||
.getThickness(getStyleSignatureDiamond().getMergedStyle(skinParam.getCurrentStyleBuilder()));
|
||||
final TextBlock tbTest = new SheetBlock2(sheetBlock1, Hexagon.asStencil(sheetBlock1), thickness);
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -54,6 +53,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.MergeStrategy;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorOneSwimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
|
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
|
|
@ -40,22 +40,11 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
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.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
|
@ -81,6 +82,7 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds {
|
|||
final StringBounder stringBounder = ug.getStringBounder();
|
||||
final Point2D p1 = getP1(stringBounder);
|
||||
final Point2D p2 = getP2(stringBounder);
|
||||
|
||||
final double x1 = p1.getX();
|
||||
final double y1 = p1.getY();
|
||||
final double x2 = p2.getX();
|
||||
|
@ -89,7 +91,16 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds {
|
|||
final Snake snake = Snake.create(skinParam(), arrowColor, Arrows.asToDown())
|
||||
.withLabel(branch.getTextBlockPositive(), arrowHorizontalAlignment());
|
||||
snake.addPoint(x1, y1);
|
||||
snake.addPoint(x2, y1);
|
||||
|
||||
if (isLast() && p1.getX() > p2.getX()) {
|
||||
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
|
||||
snake.addPoint(x1 + Hexagon.hexagonHalfSize, y1);
|
||||
snake.addPoint(x1 + Hexagon.hexagonHalfSize, y1 + dimDiamond1.getHeight());
|
||||
snake.addPoint(x2, y1 + dimDiamond1.getHeight());
|
||||
} else {
|
||||
snake.addPoint(x2, y1);
|
||||
}
|
||||
|
||||
snake.addPoint(x2, y2);
|
||||
|
||||
ug.draw(snake);
|
||||
|
@ -100,7 +111,7 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds {
|
|||
final Point2D pt;
|
||||
if (getFtile2() == tiles.get(0))
|
||||
pt = dimDiamond1.getPointD();
|
||||
else if (getFtile2() == tiles.get(tiles.size() - 1))
|
||||
else if (isLast())
|
||||
pt = dimDiamond1.getPointB();
|
||||
else
|
||||
throw new IllegalStateException();
|
||||
|
@ -108,6 +119,10 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds {
|
|||
return getTranslateDiamond1(stringBounder).getTranslated(pt);
|
||||
}
|
||||
|
||||
private boolean isLast() {
|
||||
return getFtile2() == tiles.get(tiles.size() - 1);
|
||||
}
|
||||
|
||||
private Point2D getP2(final StringBounder stringBounder) {
|
||||
return getTranslateOf(getFtile2(), stringBounder)
|
||||
.getTranslated(getFtile2().calculateDimension(stringBounder).getPointIn());
|
||||
|
|
|
@ -99,15 +99,11 @@ public class FtileBlackBlock extends AbstractFtile {
|
|||
|
||||
public void drawU(UGraphic ug) {
|
||||
final URectangle rect = new URectangle(width, height).rounded(5).ignoreForCompressionOnX();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
rect.setDeltaShadow(shadowing);
|
||||
colorBar = style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet());
|
||||
} else {
|
||||
if (skinParam().shadowing(null))
|
||||
rect.setDeltaShadow(3);
|
||||
}
|
||||
|
||||
final Style style = getSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
rect.setDeltaShadow(shadowing);
|
||||
colorBar = style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
ug.apply(colorBar).apply(colorBar.bg()).draw(rect);
|
||||
final Dimension2D dimLabel = label.calculateDimension(ug.getStringBounder());
|
||||
|
|
|
@ -35,25 +35,21 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.SkinParamColors;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -141,13 +137,9 @@ public class FtileBox extends AbstractFtile {
|
|||
|
||||
public static FtileBox create(ISkinParam skinParam, Display label, Swimlane swimlane, BoxStyle boxStyle,
|
||||
Stereotype stereotype) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getStyleSignature().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getStyleSignatureArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = getStyleSignature().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleArrow = getStyleSignatureArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new FtileBox(skinParam, label, swimlane, boxStyle, style, styleArrow);
|
||||
}
|
||||
|
||||
|
@ -157,38 +149,28 @@ public class FtileBox extends AbstractFtile {
|
|||
this.style = style;
|
||||
this.boxStyle = boxStyle;
|
||||
this.swimlane = swimlane;
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
}
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
||||
}
|
||||
this.inRendering = LinkRendering
|
||||
.create(Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(horizontalAlignment), skinParam, CreoleMode.FULL)
|
||||
.createSheet(label);
|
||||
|
@ -211,23 +193,17 @@ public class FtileBox extends AbstractFtile {
|
|||
final double heightTotal = dimTotal.getHeight();
|
||||
final UDrawable shape = boxStyle.getUDrawable(widthTotal, heightTotal, shadowing, roundCorner);
|
||||
|
||||
final UStroke thickness;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
thickness = style.getStroke();
|
||||
} else {
|
||||
thickness = getThickness(style);
|
||||
}
|
||||
final UStroke thickness = style.getStroke();
|
||||
|
||||
if (borderColor == null) {
|
||||
if (borderColor == null)
|
||||
ug = ug.apply(new HColorNone());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(borderColor);
|
||||
}
|
||||
if (backColor == null) {
|
||||
|
||||
if (backColor == null)
|
||||
ug = ug.apply(new HColorNone().bg());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(backColor.bg());
|
||||
}
|
||||
|
||||
ug = ug.apply(thickness);
|
||||
shape.drawU(ug);
|
||||
|
|
|
@ -35,18 +35,14 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.SkinParamColors;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
|
@ -54,6 +50,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
|||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -142,54 +139,41 @@ public class FtileBox2 extends AbstractFtile {
|
|||
|
||||
public static FtileBox2 create(ISkinParam skinParam, Display label, Swimlane swimlane, BoxStyle boxStyle,
|
||||
Stereotype stereotype) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
return new FtileBox2(skinParam, label, swimlane, boxStyle, style, styleArrow);
|
||||
}
|
||||
|
||||
private FtileBox2(ISkinParam skinParam, Display label, Swimlane swimlane, BoxStyle boxStyle, Style style,
|
||||
Style styleArrow) {
|
||||
super(skinParam);
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
style = style.eventuallyOverride(specBack);
|
||||
|
||||
this.style = style;
|
||||
this.boxStyle = boxStyle;
|
||||
this.swimlane = swimlane;
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
}
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
|
||||
}
|
||||
this.inRendering = LinkRendering
|
||||
.create(Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(horizontalAlignment), skinParam, CreoleMode.FULL)
|
||||
.createSheet(label);
|
||||
|
@ -215,23 +199,17 @@ public class FtileBox2 extends AbstractFtile {
|
|||
final Dimension2D dimTotal = calculateDimension(ug.getStringBounder());
|
||||
ug.draw(new UEmpty(dimTotal));
|
||||
|
||||
final UStroke thickness;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
thickness = style.getStroke();
|
||||
} else {
|
||||
thickness = getThickness(style);
|
||||
}
|
||||
final UStroke thickness = style.getStroke();
|
||||
|
||||
if (borderColor == null) {
|
||||
if (borderColor == null)
|
||||
ug = ug.apply(new HColorNone());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(borderColor);
|
||||
}
|
||||
if (backColor == null) {
|
||||
|
||||
if (backColor == null)
|
||||
ug = ug.apply(new HColorNone().bg());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(backColor.bg());
|
||||
}
|
||||
|
||||
ug = ug.apply(thickness);
|
||||
ug = ug.apply(new UTranslate(margin.getLeft(), margin.getTop()));
|
||||
|
|
|
@ -141,32 +141,23 @@ public class FtileBoxOld extends AbstractFtile {
|
|||
|
||||
public static FtileBoxOld create(ISkinParam skinParam, Display label, Swimlane swimlane, BoxStyle boxStyle,
|
||||
Stereotype stereotype) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
return new FtileBoxOld(skinParam, label, swimlane, boxStyle, style, styleArrow);
|
||||
}
|
||||
|
||||
public static TextBlock createWbs(StyleBuilder styleBuilder, ISkinParam skinParam, Display label,
|
||||
StyleSignatureBasic styleDefinition) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = styleDefinition.getMergedStyle(styleBuilder);
|
||||
styleArrow = style;
|
||||
}
|
||||
final Style style = styleDefinition.getMergedStyle(styleBuilder);
|
||||
final Style styleArrow = style;
|
||||
|
||||
return new FtileBoxOld(skinParam, label, null, BoxStyle.PLAIN, style, styleArrow);
|
||||
}
|
||||
|
||||
public static TextBlock createWbs(Style style, ISkinParam skinParam, Display label) {
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle())
|
||||
styleArrow = style;
|
||||
|
||||
final Style styleArrow = style;
|
||||
return new FtileBoxOld(skinParam, label, null, BoxStyle.PLAIN, style, styleArrow);
|
||||
}
|
||||
|
||||
|
@ -180,39 +171,27 @@ public class FtileBoxOld extends AbstractFtile {
|
|||
private FtileBoxOld(ISkinParam skinParam, Display label, Swimlane swimlane, BoxStyle boxStyle, Style style,
|
||||
Style styleArrow) {
|
||||
super(skinParam);
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.style = style;
|
||||
this.boxStyle = boxStyle;
|
||||
this.swimlane = swimlane;
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
this.inRendering = LinkRendering
|
||||
.create(Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
|
||||
}
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(horizontalAlignment), skinParam, CreoleMode.FULL)
|
||||
.createSheet(label);
|
||||
|
@ -236,11 +215,7 @@ public class FtileBoxOld extends AbstractFtile {
|
|||
final double heightTotal = dimTotal.getHeight();
|
||||
final UDrawable shape = boxStyle.getUDrawable(widthTotal, heightTotal, shadowing, roundCorner);
|
||||
|
||||
final UStroke thickness;
|
||||
if (UseStyle.useBetaStyle())
|
||||
thickness = style.getStroke();
|
||||
else
|
||||
thickness = getThickness(style);
|
||||
final UStroke thickness = style.getStroke();
|
||||
|
||||
if (borderColor == null)
|
||||
ug = ug.apply(new HColorNone());
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.Collections;
|
|||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
|
@ -74,13 +73,9 @@ public class FtileCircleEnd extends AbstractFtile {
|
|||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.swimlane = swimlane;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
} else if (skinParam().shadowing(null)) {
|
||||
this.shadowing = 3;
|
||||
}
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,8 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
|
@ -76,10 +74,7 @@ public class FtileCircleSpot extends AbstractFtile {
|
|||
this.spot = spot;
|
||||
this.swimlane = swimlane;
|
||||
this.backColor = backColor;
|
||||
if (UseStyle.useBetaStyle())
|
||||
this.fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
else
|
||||
this.fc = FontConfiguration.create(skinParam, style);
|
||||
this.fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,9 +83,9 @@ public class FtileCircleSpot extends AbstractFtile {
|
|||
}
|
||||
|
||||
public Set<Swimlane> getSwimlanes() {
|
||||
if (swimlane == null) {
|
||||
if (swimlane == null)
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
return Collections.singleton(swimlane);
|
||||
}
|
||||
|
||||
|
@ -105,25 +100,12 @@ public class FtileCircleSpot extends AbstractFtile {
|
|||
public void drawU(UGraphic ug) {
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
double shadow = 0;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
backColor = this.backColor == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet())
|
||||
: this.backColor;
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet());
|
||||
shadow = style.value(PName.Shadowing).asDouble();
|
||||
} else {
|
||||
borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
backColor = this.backColor == null
|
||||
? SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground)
|
||||
: this.backColor;
|
||||
|
||||
if (skinParam().shadowing(null))
|
||||
shadow = 3;
|
||||
}
|
||||
final HColor backColor = this.backColor == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet())
|
||||
: this.backColor;
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final double shadow = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
circle.setDeltaShadow(shadow);
|
||||
ug.apply(borderColor).apply(backColor.bg()).apply(getThickness(style)).draw(circle);
|
||||
|
|
|
@ -67,13 +67,9 @@ public class FtileCircleStart extends AbstractFtile {
|
|||
this.swimlane = swimlane;
|
||||
this.backColor = backColor;
|
||||
this.borderColor = new HColorNone();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
} else if (skinParam().shadowing(null)) {
|
||||
this.shadowing = 3;
|
||||
}
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -73,13 +73,9 @@ public class FtileCircleStop extends AbstractFtile {
|
|||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.swimlane = swimlane;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
} else if (skinParam().shadowing(null)) {
|
||||
this.shadowing = 3;
|
||||
}
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.Collections;
|
|||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
|
@ -70,7 +69,7 @@ abstract class FtileDiamondWIP extends AbstractFtile implements Styleable {
|
|||
final public StyleSignatureBasic getStyleSignature() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
|
||||
}
|
||||
|
||||
|
||||
final public Style getStyle() {
|
||||
return getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
}
|
||||
|
@ -83,16 +82,10 @@ abstract class FtileDiamondWIP extends AbstractFtile implements Styleable {
|
|||
protected FtileDiamondWIP(TextBlock label, ISkinParam skinParam, HColor backColor, HColor borderColor,
|
||||
Swimlane swimlane, TextBlock north, TextBlock south, TextBlock east, TextBlock west) {
|
||||
super(skinParam);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.borderColor = borderColor; //style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = backColor; //style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else {
|
||||
this.backColor = backColor;
|
||||
this.borderColor = borderColor;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
}
|
||||
Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
this.swimlane = swimlane;
|
||||
|
||||
|
@ -104,9 +97,9 @@ abstract class FtileDiamondWIP extends AbstractFtile implements Styleable {
|
|||
}
|
||||
|
||||
final public Set<Swimlane> getSwimlanes() {
|
||||
if (swimlane == null) {
|
||||
if (swimlane == null)
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
return Collections.singleton(swimlane);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.graphic.Rainbow;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
|
@ -86,24 +85,20 @@ public abstract class GAbstractConnection implements GConnection {
|
|||
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
private final StyleSignatureBasic getDefaultStyleDefinitionArrow() {
|
||||
return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
|
||||
}
|
||||
|
||||
|
||||
protected ISkinParam skinParam() {
|
||||
throw new UnsupportedOperationException("wip");
|
||||
}
|
||||
|
||||
|
||||
// DUPLICATE 4561
|
||||
final protected Rainbow getInLinkRenderingColor() {
|
||||
Rainbow color;
|
||||
final ISkinParam skinParam = gpoint1.getGtile().skinParam();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
color = Rainbow.build(style, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle());
|
||||
} else
|
||||
color = Rainbow.build(skinParam);
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Rainbow color = Rainbow.build(style, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle());
|
||||
// final LinkRendering linkRendering = tile.getInLinkRendering();
|
||||
// if (linkRendering == null) {
|
||||
// if (UseStyle.useBetaStyle()) {
|
||||
|
@ -128,7 +123,4 @@ public abstract class GAbstractConnection implements GConnection {
|
|||
return color;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -85,16 +85,12 @@ public class GtileAssembly extends GtileTopDown {
|
|||
|
||||
protected final TextBlock getTextBlock(Display display) {
|
||||
// DUP3945
|
||||
if (Display.isNull(display)) {
|
||||
if (Display.isNull(display))
|
||||
return TextBlockUtils.EMPTY_TEXT_BLOCK;
|
||||
}
|
||||
final FontConfiguration fontConfiguration;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet());
|
||||
} else {
|
||||
fontConfiguration = FontConfiguration.create(skinParam(), FontParam.ARROW, null);
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(),
|
||||
skinParam().getIHtmlColorSet());
|
||||
return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,20 +35,15 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.SkinParamColors;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -121,54 +116,37 @@ public class GtileBox extends AbstractGtile {
|
|||
|
||||
public static GtileBox create(StringBounder stringBounder, ISkinParam skinParam, Display label, Swimlane swimlane,
|
||||
BoxStyle boxStyle, Stereotype stereotype) {
|
||||
Style style = null;
|
||||
Style styleArrow = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final Style style = getDefaultStyleDefinitionActivity().withTOBECHANGED(stereotype)
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
return new GtileBox(stringBounder, skinParam, label, swimlane, boxStyle, style, styleArrow);
|
||||
}
|
||||
|
||||
private GtileBox(StringBounder stringBounder, ISkinParam skinParam, Display label, Swimlane swimlane,
|
||||
BoxStyle boxStyle, Style style, Style styleArrow) {
|
||||
super(stringBounder, skinParam, swimlane);
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors)
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.style = style;
|
||||
this.boxStyle = boxStyle;
|
||||
|
||||
final FontConfiguration fc;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
this.inRendering = LinkRendering.create(
|
||||
Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
Colors specBack = null;
|
||||
if (skinParam instanceof SkinParamColors) {
|
||||
specBack = ((SkinParamColors) skinParam).getColors();
|
||||
}
|
||||
style = style.eventuallyOverride(specBack);
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
} else {
|
||||
this.padding = ClockwiseTopRightBottomLeft.same(10);
|
||||
this.margin = ClockwiseTopRightBottomLeft.same(0);
|
||||
this.inRendering = LinkRendering.create(Rainbow.build(skinParam));
|
||||
this.borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
|
||||
this.backColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBackground);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
this.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3.0 : 0.0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
this.inRendering = LinkRendering
|
||||
.create(Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle()));
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.horizontalAlignment = style.getHorizontalAlignment();
|
||||
this.padding = style.getPadding();
|
||||
this.margin = style.getMargin();
|
||||
this.roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
this.minimumWidth = style.value(PName.MinimumWidth).asDouble();
|
||||
|
||||
}
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(horizontalAlignment), skinParam, CreoleMode.FULL)
|
||||
.createSheet(label);
|
||||
|
@ -192,23 +170,17 @@ public class GtileBox extends AbstractGtile {
|
|||
final double heightTotal = dimTotal.getHeight();
|
||||
final UDrawable shape = boxStyle.getUDrawable(widthTotal, heightTotal, shadowing, roundCorner);
|
||||
|
||||
final UStroke thickness;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
thickness = style.getStroke();
|
||||
} else {
|
||||
thickness = getThickness();
|
||||
}
|
||||
final UStroke thickness = style.getStroke();
|
||||
|
||||
if (borderColor == null) {
|
||||
if (borderColor == null)
|
||||
ug = ug.apply(new HColorNone());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(borderColor);
|
||||
}
|
||||
if (backColor == null) {
|
||||
|
||||
if (backColor == null)
|
||||
ug = ug.apply(new HColorNone().bg());
|
||||
} else {
|
||||
else
|
||||
ug = ug.apply(backColor.bg());
|
||||
}
|
||||
|
||||
ug = ug.apply(thickness);
|
||||
shape.drawU(ug);
|
||||
|
|
|
@ -35,15 +35,13 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
|
@ -76,11 +74,8 @@ public class GtileCircleSpot extends AbstractGtile {
|
|||
this.spot = spot;
|
||||
this.backColor = backColor;
|
||||
this.fc = FontConfiguration.create(skinParam, FontParam.ACTIVITY, null);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else if (skinParam().shadowing(null))
|
||||
this.shadowing = 3;
|
||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,12 +35,10 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
|
@ -65,11 +63,8 @@ public class GtileCircleStart extends AbstractGtile {
|
|||
public GtileCircleStart(StringBounder stringBounder, ISkinParam skinParam, HColor backColor, Swimlane swimlane) {
|
||||
super(stringBounder, skinParam, swimlane);
|
||||
this.backColor = backColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else if (skinParam().shadowing(null))
|
||||
this.shadowing = 3;
|
||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam().getCurrentStyleBuilder());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,20 +35,17 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FloatingNote;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -61,7 +58,6 @@ import net.sourceforge.plantuml.style.PName;
|
|||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
|
@ -104,30 +100,20 @@ public class GtileGroup extends AbstractGtileRoot {
|
|||
this.inner = inner;
|
||||
this.borderColor = borderColor == null ? HColorUtils.BLACK : borderColor;
|
||||
|
||||
final FontConfiguration fc;
|
||||
final Style style;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
style = getDefaultStyleDefinitionPartition().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else {
|
||||
style = null;
|
||||
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION);
|
||||
final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
|
||||
fc = FontConfiguration.create(font, fontColor, skinParam.getHyperlinkColor(),
|
||||
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
}
|
||||
if (title == null) {
|
||||
final Style style = getDefaultStyleDefinitionPartition().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
if (title == null)
|
||||
this.name = TextBlockUtils.empty(0, 0);
|
||||
} else {
|
||||
else
|
||||
this.name = title.create(fc, HorizontalAlignment.LEFT, skinParam);
|
||||
}
|
||||
if (Display.isNull(displayNote)) {
|
||||
|
||||
if (Display.isNull(displayNote))
|
||||
this.headerNote = TextBlockUtils.empty(0, 0);
|
||||
} else {
|
||||
else
|
||||
this.headerNote = new FloatingNote(displayNote, skinParam);
|
||||
}
|
||||
|
||||
final UStroke thickness = skinParam.getThickness(LineParam.partitionBorder, null);
|
||||
this.stroke = thickness == null ? new UStroke(2) : thickness;
|
||||
|
|
|
@ -35,13 +35,11 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
|
@ -87,16 +85,11 @@ public class GtileHexagonInside extends AbstractGtile {
|
|||
public GtileHexagonInside(StringBounder stringBounder, TextBlock label, ISkinParam skinParam, HColor backColor,
|
||||
HColor borderColor, Swimlane swimlane) {
|
||||
super(stringBounder, skinParam, swimlane);
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
} else {
|
||||
this.backColor = backColor;
|
||||
this.borderColor = borderColor;
|
||||
this.shadowing = skinParam().shadowing(null) ? 3 : 0;
|
||||
}
|
||||
|
||||
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||
|
||||
this.label = label;
|
||||
this.dimLabel = label.calculateDimension(stringBounder);
|
||||
|
|
|
@ -111,32 +111,15 @@ public class GtileWithNoteOpale extends AbstractGtile implements Stencil, Stylea
|
|||
if (note.getType() == NoteType.FLOATING_NOTE)
|
||||
withLink = false;
|
||||
|
||||
final Rose rose = new Rose();
|
||||
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final FontConfiguration fc;
|
||||
|
||||
final double shadowing;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
UStroke stroke = new UStroke();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
||||
false, null);
|
||||
|
|
|
@ -35,18 +35,15 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.Sheet;
|
||||
|
@ -59,7 +56,6 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
|||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.sequencediagram.NotePosition;
|
||||
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;
|
||||
|
@ -107,37 +103,21 @@ public class GtileWithNotes extends AbstractGtile {
|
|||
super(tile.getStringBounder(), tile.skinParam());
|
||||
this.tile = tile;
|
||||
|
||||
final Rose rose = new Rose();
|
||||
|
||||
for (PositionedNote note : notes) {
|
||||
ISkinParam skinParam2 = skinParam;
|
||||
if (note.getColors() != null) {
|
||||
if (note.getColors() != null)
|
||||
skinParam2 = note.getColors().mute(skinParam2);
|
||||
}
|
||||
final HColor noteBackgroundColor;
|
||||
final HColor borderColor;
|
||||
final FontConfiguration fc;
|
||||
final double shadowing;
|
||||
UStroke stroke = new UStroke();
|
||||
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam2, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam2, ColorParam.noteBorder);
|
||||
fc = FontConfiguration.create(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
getIHtmlColorSet());
|
||||
final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final LineBreakStrategy wrapWidth = style.wrapWidth();
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
|
|
@ -35,11 +35,9 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram3.gtile;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Hexagon;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
|
@ -53,41 +51,25 @@ 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.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
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;
|
||||
|
||||
public class Gtiles {
|
||||
|
||||
private static final Rose rose = new Rose();
|
||||
|
||||
static public GtileHexagonInside hexagonInside(Swimlane swimlane, StringBounder stringBounder, ISkinParam skinParam,
|
||||
StyleSignatureBasic styleSignature, HColor color, Display label) {
|
||||
final ConditionStyle conditionStyle = skinParam.getConditionStyle();
|
||||
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
final FontConfiguration fcTest;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
backColor = color == null ? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet()) : color;
|
||||
fcTest = style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE_HEXAGON ? FontParam.ACTIVITY_DIAMOND
|
||||
: FontParam.ARROW;
|
||||
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.activityDiamondBorder);
|
||||
backColor = color == null ? rose.getHtmlColor(skinParam, ColorParam.activityDiamondBackground) : color;
|
||||
fcTest = FontConfiguration.create(skinParam, testParam, null)
|
||||
.changeColor(fontColor(skinParam, FontParam.ACTIVITY_DIAMOND));
|
||||
}
|
||||
final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor backColor = color == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet())
|
||||
: color;
|
||||
final FontConfiguration fcTest = style.getFontConfiguration(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
final Sheet sheet = Parser
|
||||
.build(fcTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL)
|
||||
|
@ -100,18 +82,13 @@ public class Gtiles {
|
|||
|
||||
static public AbstractGtileRoot diamondEmpty(Swimlane swimlane, StringBounder stringBounder, ISkinParam skinParam,
|
||||
StyleSignatureBasic styleSignature, HColor color) {
|
||||
final HColor borderColor;
|
||||
final HColor backColor;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
backColor = color == null ? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet()) : color;
|
||||
} else {
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.activityDiamondBorder);
|
||||
backColor = color == null ? rose.getHtmlColor(skinParam, ColorParam.activityDiamondBackground) : color;
|
||||
}
|
||||
final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor backColor = color == null
|
||||
? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet())
|
||||
: color;
|
||||
|
||||
return new GtileHexagonInside(stringBounder, TextBlockUtils.EMPTY_TEXT_BLOCK, skinParam, backColor, borderColor,
|
||||
swimlane);
|
||||
|
|
|
@ -34,26 +34,22 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.bpm;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.InnerStrategy;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
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.StyleSignatureBasic;
|
||||
|
@ -147,10 +143,7 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz
|
|||
}
|
||||
|
||||
private Style getStyle(ISkinParam skinParam) {
|
||||
if (UseStyle.useBetaStyle())
|
||||
return getSignatureCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
return null;
|
||||
return getSignatureCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
|
||||
public TextBlock toTextBlockInternal(ISkinParam skinParam) {
|
||||
|
|
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.command;
|
|||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.TitledDiagram;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
|
@ -73,10 +72,10 @@ public class CommandFooter extends SingleLineCommand2<TitledDiagram> {
|
|||
protected CommandExecutionResult executeArg(TitledDiagram diagram, LineLocation location, RegexResult arg) {
|
||||
final String align = arg.get("POSITION", 0);
|
||||
HorizontalAlignment ha = HorizontalAlignment.fromString(align, HorizontalAlignment.CENTER);
|
||||
if (UseStyle.useBetaStyle() && align == null) {
|
||||
if (align == null)
|
||||
ha = FontParam.FOOTER.getStyleDefinition(null).getMergedStyle(diagram.getCurrentStyleBuilder())
|
||||
.getHorizontalAlignment();
|
||||
}
|
||||
|
||||
final Display s = Display.getWithNewlines(arg.getLazzy("LABEL", 0));
|
||||
diagram.getFooter().putDisplay(s, ha);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.command;
|
|||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.TitledDiagram;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
|
@ -75,10 +74,10 @@ public class CommandHeader extends SingleLineCommand2<TitledDiagram> {
|
|||
protected CommandExecutionResult executeArg(TitledDiagram diagram, LineLocation location, RegexResult arg) {
|
||||
final String align = arg.get("POSITION", 0);
|
||||
HorizontalAlignment ha = HorizontalAlignment.fromString(align, HorizontalAlignment.RIGHT);
|
||||
if (UseStyle.useBetaStyle() && align == null) {
|
||||
if (align == null)
|
||||
ha = FontParam.HEADER.getStyleDefinition(null).getMergedStyle(diagram.getCurrentStyleBuilder())
|
||||
.getHorizontalAlignment();
|
||||
}
|
||||
|
||||
final Display s = Display.getWithNewlines(arg.getLazzy("LABEL", 0));
|
||||
diagram.getHeader().putDisplay(s, ha);
|
||||
return CommandExecutionResult.ok();
|
||||
|
|
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.command;
|
|||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.TitledDiagram;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -66,11 +65,11 @@ public class CommandMultilinesFooter extends CommandMultilines<TitledDiagram> {
|
|||
final Display strings = lines.toDisplay();
|
||||
if (strings.size() > 0) {
|
||||
HorizontalAlignment ha = HorizontalAlignment.fromString(align, HorizontalAlignment.CENTER);
|
||||
if (UseStyle.useBetaStyle() && align == null) {
|
||||
if (align == null)
|
||||
ha = FontParam.FOOTER.getStyleDefinition(null)
|
||||
.getMergedStyle(((UmlDiagram) diagram).getSkinParam().getCurrentStyleBuilder())
|
||||
.getHorizontalAlignment();
|
||||
}
|
||||
|
||||
diagram.getFooter().putDisplay(strings, ha);
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.command;
|
|||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.TitledDiagram;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
|
@ -66,11 +65,11 @@ public class CommandMultilinesHeader extends CommandMultilines<TitledDiagram> {
|
|||
final Display strings = lines.toDisplay();
|
||||
if (strings.size() > 0) {
|
||||
HorizontalAlignment ha = HorizontalAlignment.fromString(align, HorizontalAlignment.RIGHT);
|
||||
if (UseStyle.useBetaStyle() && align == null) {
|
||||
if (align == null)
|
||||
ha = FontParam.HEADER.getStyleDefinition(null)
|
||||
.getMergedStyle(((UmlDiagram) diagram).getSkinParam().getCurrentStyleBuilder())
|
||||
.getHorizontalAlignment();
|
||||
}
|
||||
|
||||
diagram.getHeader().putDisplay(strings, ha);
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface Bodier {
|
|||
|
||||
public Display getMethodsToDisplay();
|
||||
|
||||
public void addFieldOrMethod(String s) throws NoSuchColorException;
|
||||
public boolean addFieldOrMethod(String s) throws NoSuchColorException;
|
||||
|
||||
public TextBlock getBody(FontParam fontParam, ISkinParam skinParam, boolean showMethods, boolean showFields,
|
||||
Stereotype stereotype, Style style, FontConfiguration fontConfiguration);
|
||||
|
|
|
@ -92,7 +92,7 @@ public class BodierJSon implements Bodier {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addFieldOrMethod(String s) throws NoSuchColorException {
|
||||
public boolean addFieldOrMethod(String s) throws NoSuchColorException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
|
|
@ -87,11 +87,12 @@ public class BodierLikeClassOrObject implements Bodier {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addFieldOrMethod(String s) {
|
||||
public boolean addFieldOrMethod(String s) {
|
||||
// Empty cache
|
||||
methodsToDisplay = null;
|
||||
fieldsToDisplay = null;
|
||||
rawBody.add(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isBodyEnhanced() {
|
||||
|
|
|
@ -80,15 +80,18 @@ public class BodierMap implements Bodier {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addFieldOrMethod(String s) {
|
||||
public boolean addFieldOrMethod(String s) {
|
||||
if (s.contains("=>")) {
|
||||
final int x = s.indexOf("=>");
|
||||
map.put(s.substring(0, x).trim(), s.substring(x + 2).trim());
|
||||
return true;
|
||||
} else if (getLinkedEntry(s) != null) {
|
||||
final String link = getLinkedEntry(s);
|
||||
final int x = s.indexOf(link);
|
||||
map.put(s.substring(0, x).trim(), "\0");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -67,9 +67,10 @@ public class BodierSimple implements Bodier {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addFieldOrMethod(String s) throws NoSuchColorException {
|
||||
public boolean addFieldOrMethod(String s) throws NoSuchColorException {
|
||||
final Display display = Display.getWithNewlines2(s);
|
||||
rawBody.addAll(display.asList());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -48,7 +48,6 @@ import net.sourceforge.plantuml.FontParam;
|
|||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.creole.Parser;
|
||||
import net.sourceforge.plantuml.creole.legacy.CreoleParser;
|
||||
|
@ -77,8 +76,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi
|
|||
|
||||
BodyEnhanced1(HorizontalAlignment align, List<CharSequence> rawBody, FontParam fontParam, ISkinParam skinParam,
|
||||
Stereotype stereotype, ILeaf entity, Style style) {
|
||||
super(align, UseStyle.useBetaStyle() == false ? FontConfiguration.create(skinParam, fontParam, stereotype)
|
||||
: style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), style);
|
||||
super(align, style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), style);
|
||||
this.style = style;
|
||||
this.rawBody2 = Display.create(rawBody);
|
||||
this.stereotype = stereotype;
|
||||
|
|
|
@ -35,11 +35,9 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
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;
|
||||
|
@ -116,9 +114,7 @@ public abstract class BodyEnhancedAbstract extends AbstractTextBlock implements
|
|||
}
|
||||
|
||||
final protected double getDefaultThickness() {
|
||||
if (UseStyle.useBetaStyle())
|
||||
return style.value(PName.LineThickness).asDouble();
|
||||
return 1.5;
|
||||
return style.value(PName.LineThickness).asDouble();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
@ -45,7 +44,7 @@ import net.sourceforge.plantuml.EmbeddedDiagram;
|
|||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.CreoleMode;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
|
@ -57,7 +56,6 @@ import net.sourceforge.plantuml.graphic.TextBlockLineBefore;
|
|||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockWithUrl;
|
||||
import net.sourceforge.plantuml.skin.VisibilityModifier;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.svek.Ports;
|
||||
|
@ -81,7 +79,7 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlock,
|
|||
|
||||
private final FontParam fontParam;
|
||||
private final ISkinParam skinParam;
|
||||
private final Rose rose = new Rose();
|
||||
|
||||
private final Display members;
|
||||
private final HorizontalAlignment align;
|
||||
private final Stereotype stereotype;
|
||||
|
@ -264,20 +262,12 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlock,
|
|||
}
|
||||
};
|
||||
}
|
||||
final HColor backColor;
|
||||
final HColor borderColor;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = modifier.getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
final boolean isField = modifier.isField();
|
||||
backColor = isField ? null
|
||||
: style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
borderColor = rose.getHtmlColor(skinParam, modifier.getForeground());
|
||||
backColor = modifier.getBackground() == null ? null
|
||||
: rose.getHtmlColor(skinParam, modifier.getBackground());
|
||||
}
|
||||
final Style style = modifier.getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final boolean isField = modifier.isField();
|
||||
final HColor backColor = isField ? null
|
||||
: style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
|
||||
final TextBlock uBlock = modifier.getUBlock(skinParam.classAttributeIconSize(), borderColor, backColor,
|
||||
url != null);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class Stereotype implements CharSequence {
|
|||
this.automaticPackageStyle = automaticPackageStyle;
|
||||
this.radius = radius;
|
||||
this.circledFont = circledFont;
|
||||
this.decoration = decoration;
|
||||
this.decoration = Objects.requireNonNull(decoration);
|
||||
|
||||
}
|
||||
|
||||
|
@ -189,11 +189,7 @@ public class Stereotype implements CharSequence {
|
|||
}
|
||||
|
||||
public List<String> getStyleNames() {
|
||||
final List<String> labels = getLabels(Guillemet.NONE);
|
||||
if (labels == null)
|
||||
return Collections.emptyList();
|
||||
|
||||
return Collections.unmodifiableList(labels);
|
||||
return decoration.getStyleNames();
|
||||
}
|
||||
|
||||
public PackageStyle getPackageStyle() {
|
||||
|
|
|
@ -95,6 +95,22 @@ public class StereotypeDecoration {
|
|||
final String spriteName;
|
||||
final double spriteScale;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "label='" + label + "' spriteName='" + spriteName + "'";
|
||||
}
|
||||
|
||||
public List<String> getStyleNames() {
|
||||
final List<String> result = new ArrayList<>(cutLabels(label, Guillemet.NONE));
|
||||
if (spriteName == null)
|
||||
return Collections.unmodifiableList(result);
|
||||
|
||||
final int idx = spriteName.lastIndexOf('/');
|
||||
if (idx != -1)
|
||||
result.add(spriteName.substring(idx + 1));
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
|
||||
private StereotypeDecoration(String label, HColor htmlColor, char character, String spriteName,
|
||||
double spriteScale) {
|
||||
this.label = label;
|
||||
|
|
|
@ -126,20 +126,20 @@ public final class EntityFactory {
|
|||
folder.setUSymbol(symbol);
|
||||
folder.setStereotype(g.getStereotype());
|
||||
folder.setColors(g.getColors());
|
||||
if (g.getUrl99() != null) {
|
||||
if (g.getUrl99() != null)
|
||||
folder.addUrl(g.getUrl99());
|
||||
}
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
// System.err.println("Backcolor ?");
|
||||
} else {
|
||||
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);
|
||||
} else {
|
||||
folder.setSpecificColorTOBEREMOVED(ColorType.BACK, g.getColors().getColor(ColorType.BACK));
|
||||
}
|
||||
}
|
||||
|
||||
// if (UseStyle.useBetaStyle()) {
|
||||
// // System.err.println("Backcolor ?");
|
||||
// } else {
|
||||
// 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);
|
||||
// } else {
|
||||
// folder.setSpecificColorTOBEREMOVED(ColorType.BACK, g.getColors().getColor(ColorType.BACK));
|
||||
// }
|
||||
// }
|
||||
emptyGroupsAsNode.put(g, folder);
|
||||
return folder;
|
||||
}
|
||||
|
|
|
@ -35,11 +35,9 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.descdiagram.command;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.command.SingleLineCommand2;
|
||||
import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
|
@ -120,95 +118,92 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
|||
LinkDecor d1 = LinkDecor.NONE;
|
||||
LinkDecor d2 = LinkDecor.NONE;
|
||||
|
||||
if (head1.equals("(0")) {
|
||||
if (head1.equals("(0"))
|
||||
d1 = LinkDecor.CIRCLE_CONNECT;
|
||||
} else if (head1.equals("#")) {
|
||||
else if (head1.equals("#"))
|
||||
d1 = LinkDecor.SQUARE;
|
||||
} else if (head1.equals("0")) {
|
||||
else if (head1.equals("0"))
|
||||
d1 = LinkDecor.CIRCLE;
|
||||
} else if (head1.equals("@")) {
|
||||
else if (head1.equals("@"))
|
||||
d1 = LinkDecor.CIRCLE_FILL;
|
||||
} else if (head1.equals("(")) {
|
||||
else if (head1.equals("("))
|
||||
d1 = LinkDecor.PARENTHESIS;
|
||||
} else if (head1.equals(">")) {
|
||||
else if (head1.equals(">"))
|
||||
d1 = LinkDecor.ARROW;
|
||||
} else if (head1.equals("*")) {
|
||||
else if (head1.equals("*"))
|
||||
d1 = LinkDecor.COMPOSITION;
|
||||
} else if (head1.equals("o")) {
|
||||
else if (head1.equals("o"))
|
||||
d1 = LinkDecor.AGREGATION;
|
||||
} else if (head1.equals("+")) {
|
||||
else if (head1.equals("+"))
|
||||
d1 = LinkDecor.PLUS;
|
||||
} else if (head1.equals("\\\\")) {
|
||||
else if (head1.equals("\\\\"))
|
||||
d1 = LinkDecor.HALF_ARROW;
|
||||
} else if (head1.equals(">>")) {
|
||||
else if (head1.equals(">>"))
|
||||
d1 = LinkDecor.ARROW_TRIANGLE;
|
||||
} else if (head1.equals("^")) {
|
||||
else if (head1.equals("^"))
|
||||
d1 = LinkDecor.EXTENDS;
|
||||
} else if (head1.equals(":|>")) {
|
||||
else if (head1.equals(":|>"))
|
||||
d1 = LinkDecor.DEFINEDBY;
|
||||
} else if (head1.equals("||>")) {
|
||||
else if (head1.equals("||>"))
|
||||
d1 = LinkDecor.REDEFINES;
|
||||
} else if (head1.equals("|>")) {
|
||||
else if (head1.equals("|>"))
|
||||
d1 = LinkDecor.EXTENDS;
|
||||
}
|
||||
|
||||
if (head2.equals("0)")) {
|
||||
if (head2.equals("0)"))
|
||||
d2 = LinkDecor.CIRCLE_CONNECT;
|
||||
} else if (head2.equals("#")) {
|
||||
else if (head2.equals("#"))
|
||||
d2 = LinkDecor.SQUARE;
|
||||
} else if (head2.equals("0")) {
|
||||
else if (head2.equals("0"))
|
||||
d2 = LinkDecor.CIRCLE;
|
||||
} else if (head2.equals("@")) {
|
||||
else if (head2.equals("@"))
|
||||
d2 = LinkDecor.CIRCLE_FILL;
|
||||
} else if (head2.equals(")")) {
|
||||
else if (head2.equals(")"))
|
||||
d2 = LinkDecor.PARENTHESIS;
|
||||
} else if (head2.equals("<")) {
|
||||
else if (head2.equals("<"))
|
||||
d2 = LinkDecor.ARROW;
|
||||
} else if (head2.equals("*")) {
|
||||
else if (head2.equals("*"))
|
||||
d2 = LinkDecor.COMPOSITION;
|
||||
} else if (head2.equals("o")) {
|
||||
else if (head2.equals("o"))
|
||||
d2 = LinkDecor.AGREGATION;
|
||||
} else if (head2.equals("+")) {
|
||||
else if (head2.equals("+"))
|
||||
d2 = LinkDecor.PLUS;
|
||||
} else if (head2.equals("<<")) {
|
||||
else if (head2.equals("<<"))
|
||||
d2 = LinkDecor.ARROW_TRIANGLE;
|
||||
} else if (head2.equals("^")) {
|
||||
else if (head2.equals("^"))
|
||||
d2 = LinkDecor.EXTENDS;
|
||||
} else if (head2.equals("<|:")) {
|
||||
else if (head2.equals("<|:"))
|
||||
d2 = LinkDecor.DEFINEDBY;
|
||||
} else if (head2.equals("<||")) {
|
||||
else if (head2.equals("<||"))
|
||||
d2 = LinkDecor.REDEFINES;
|
||||
} else if (head2.equals("<|")) {
|
||||
else if (head2.equals("<|"))
|
||||
d2 = LinkDecor.EXTENDS;
|
||||
}
|
||||
|
||||
LinkType result = new LinkType(d1, d2);
|
||||
final String queue = getQueue(arg);
|
||||
if (queue.contains(".")) {
|
||||
if (queue.contains("."))
|
||||
result = result.goDashed();
|
||||
} else if (queue.contains("~")) {
|
||||
else if (queue.contains("~"))
|
||||
result = result.goDotted();
|
||||
} else if (queue.contains("=")) {
|
||||
else if (queue.contains("="))
|
||||
result = result.goBold();
|
||||
}
|
||||
|
||||
final String middle = arg.get("INSIDE", 0);
|
||||
if ("0".equals(middle)) {
|
||||
if ("0".equals(middle))
|
||||
result = result.withMiddleCircle();
|
||||
} else if ("0)".equals(middle)) {
|
||||
else if ("0)".equals(middle))
|
||||
result = result.withMiddleCircleCircled1();
|
||||
} else if ("(0".equals(middle)) {
|
||||
else if ("(0".equals(middle))
|
||||
result = result.withMiddleCircleCircled2();
|
||||
} else if ("(0)".equals(middle)) {
|
||||
else if ("(0)".equals(middle))
|
||||
result = result.withMiddleCircleCircled();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String trimAndLowerCase(String s) {
|
||||
if (s == null) {
|
||||
if (s == null)
|
||||
return "";
|
||||
}
|
||||
|
||||
return StringUtils.goLowerCase(StringUtils.trin(s));
|
||||
}
|
||||
|
||||
|
@ -245,11 +240,11 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
|||
final LinkType linkType = getLinkType(arg);
|
||||
final Direction dir = getDirection(arg);
|
||||
final String queue;
|
||||
if (dir == Direction.LEFT || dir == Direction.RIGHT) {
|
||||
if (dir == Direction.LEFT || dir == Direction.RIGHT)
|
||||
queue = "-";
|
||||
} else {
|
||||
else
|
||||
queue = getQueue(arg);
|
||||
}
|
||||
|
||||
final Labels labels = new Labels(arg);
|
||||
|
||||
final IEntity cl1;
|
||||
|
@ -267,31 +262,27 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
|||
labels.getFirstLabel(), labels.getSecondLabel(), diagram.getLabeldistance(), diagram.getLabelangle(),
|
||||
diagram.getSkinParam().getCurrentStyleBuilder());
|
||||
link.setLinkArrow(labels.getLinkArrow());
|
||||
if (dir == Direction.LEFT || dir == Direction.UP) {
|
||||
if (dir == Direction.LEFT || dir == Direction.UP)
|
||||
link = link.getInv();
|
||||
}
|
||||
|
||||
link.setColors(color().getColor(diagram.getSkinParam().getThemeStyle(), arg,
|
||||
diagram.getSkinParam().getIHtmlColorSet()));
|
||||
link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0));
|
||||
if (arg.get("STEREOTYPE", 0) != null) {
|
||||
final Stereotype stereotype = Stereotype.build(arg.get("STEREOTYPE", 0));
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
link.setStereotype(stereotype);
|
||||
} else {
|
||||
link.setColors(link.getColors().applyStereotype(stereotype, diagram.getSkinParam(), ColorParam.arrow));
|
||||
}
|
||||
link.setStereotype(stereotype);
|
||||
}
|
||||
diagram.addLink(link);
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
||||
private IEntity getFoo1(DescriptionDiagram diagram, Code code, Ident ident, Ident pure) {
|
||||
if (!diagram.V1972() && diagram.isGroup(code)) {
|
||||
if (!diagram.V1972() && diagram.isGroup(code))
|
||||
return diagram.getGroup(code);
|
||||
}
|
||||
if (diagram.V1972() && diagram.isGroupStrict(ident)) {
|
||||
|
||||
if (diagram.V1972() && diagram.isGroupStrict(ident))
|
||||
return diagram.getGroupStrict(ident);
|
||||
}
|
||||
|
||||
final String codeString = code.getName();
|
||||
if (ident.getLast().startsWith("()")) {
|
||||
ident = ident.removeStartingParenthesis();
|
||||
|
@ -320,9 +311,9 @@ public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
|
|||
if (diagram.V1972()) {
|
||||
final ILeaf result = pure.size() == 1 ? diagram.getLeafVerySmart(ident) : diagram.getLeafStrict(ident);
|
||||
// final ILeaf result = diagram.getLeafSmart(ident);
|
||||
if (result != null) {
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
return diagram.getOrCreateLeaf(ident, code, type, symbol);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.elk;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -54,8 +53,8 @@ import net.sourceforge.plantuml.ISkinParam;
|
|||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
|
@ -111,7 +110,6 @@ import net.sourceforge.plantuml.graphic.QuoteUtils;
|
|||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.USymbols;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
|
@ -169,24 +167,24 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
final FontConfiguration labelFont = FontConfiguration.create(skinParam, FontParam.ARROW, null);
|
||||
final TextBlock label = link.getLabel().create(labelFont,
|
||||
skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam);
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder)) {
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder))
|
||||
return null;
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
private TextBlock getQualifier(Link link, int n) {
|
||||
final String tmp = n == 1 ? link.getQualifier1() : link.getQualifier2();
|
||||
if (tmp == null) {
|
||||
if (tmp == null)
|
||||
return null;
|
||||
}
|
||||
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
final FontConfiguration labelFont = FontConfiguration.create(skinParam, FontParam.ARROW, null);
|
||||
final TextBlock label = Display.getWithNewlines(tmp).create(labelFont,
|
||||
skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam);
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder)) {
|
||||
if (TextBlockUtils.isEmpty(label, stringBounder))
|
||||
return null;
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
|
@ -225,23 +223,23 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
}
|
||||
|
||||
private void drawAllClusters(UGraphic ug) {
|
||||
for (Entry<IGroup, ElkNode> ent : clusters.entrySet()) {
|
||||
for (Entry<IGroup, ElkNode> ent : clusters.entrySet())
|
||||
drawSingleCluster(ug, ent.getKey(), ent.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void drawAllNodes(UGraphic ug) {
|
||||
for (Entry<ILeaf, ElkNode> ent : nodes.entrySet()) {
|
||||
for (Entry<ILeaf, ElkNode> ent : nodes.entrySet())
|
||||
drawSingleNode(ug, ent.getKey(), ent.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void drawAllEdges(UGraphic ug) {
|
||||
for (Entry<Link, ElkEdge> ent : edges.entrySet()) {
|
||||
final Link link = ent.getKey();
|
||||
if (link.isInvis()) {
|
||||
if (link.isInvis())
|
||||
continue;
|
||||
}
|
||||
|
||||
drawSingleEdge(ug, link, ent.getValue());
|
||||
}
|
||||
}
|
||||
|
@ -252,28 +250,16 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
|
||||
PackageStyle packageStyle = group.getPackageStyle();
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
if (packageStyle == null) {
|
||||
if (packageStyle == null)
|
||||
packageStyle = skinParam.packageStyle();
|
||||
}
|
||||
|
||||
final UmlDiagramType umlDiagramType = diagram.getUmlDiagramType();
|
||||
|
||||
final double shadowing;
|
||||
final UStroke stroke;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = Cluster.getDefaultStyleDefinition(umlDiagramType.getStyleName(), group.getUSymbol())
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
stroke = Cluster.getStrokeInternal(group, skinParam, style);
|
||||
} else {
|
||||
if (group.getUSymbol() == null) {
|
||||
shadowing = skinParam.shadowing2(group.getStereotype(), USymbols.PACKAGE.getSkinParameter()) ? 3 : 0;
|
||||
} else {
|
||||
shadowing = skinParam.shadowing2(group.getStereotype(), group.getUSymbol().getSkinParameter()) ? 3
|
||||
: 0;
|
||||
}
|
||||
stroke = Cluster.getStrokeInternal(group, skinParam, null);
|
||||
}
|
||||
final Style style = Cluster.getDefaultStyleDefinition(umlDiagramType.getStyleName(), group.getUSymbol())
|
||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||
final UStroke stroke = Cluster.getStrokeInternal(group, skinParam, style);
|
||||
|
||||
HColor backColor = getBackColor(umlDiagramType);
|
||||
backColor = Cluster.getBackColor(backColor, skinParam, group.getStereotype(), umlDiagramType.getStyleName(),
|
||||
group.getUSymbol());
|
||||
|
@ -298,9 +284,8 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
|
||||
private TextBlock getTitleBlock(IGroup g) {
|
||||
final Display label = g.getDisplay();
|
||||
if (label == null) {
|
||||
if (label == null)
|
||||
return TextBlockUtils.empty(0, 0);
|
||||
}
|
||||
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
final FontConfiguration fontConfiguration = g.getFontConfigurationForTitle(skinParam);
|
||||
|
@ -330,9 +315,9 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
if (minMax == null) {
|
||||
if (minMax == null)
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
return minMax.getDimension();
|
||||
}
|
||||
|
||||
|
@ -344,19 +329,18 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
|
||||
private Collection<ILeaf> getUnpackagedEntities() {
|
||||
final List<ILeaf> result = new ArrayList<>();
|
||||
for (ILeaf ent : diagram.getLeafsvalues()) {
|
||||
if (diagram.getEntityFactory().getRootGroup() == ent.getParentContainer()) {
|
||||
for (ILeaf ent : diagram.getLeafsvalues())
|
||||
if (diagram.getEntityFactory().getRootGroup() == ent.getParentContainer())
|
||||
result.add(ent);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private ElkNode getElkNode(final IEntity entity) {
|
||||
ElkNode node = nodes.get(entity);
|
||||
if (node == null) {
|
||||
if (node == null)
|
||||
node = clusters.get(entity);
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -423,9 +407,9 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
}
|
||||
|
||||
private void printSingleGroup(IGroup g) {
|
||||
if (g.getGroupType() == GroupType.CONCURRENT_STATE) {
|
||||
if (g.getGroupType() == GroupType.CONCURRENT_STATE)
|
||||
return;
|
||||
}
|
||||
|
||||
this.printEntities(clusters.get(g), g.getLeafsDirect());
|
||||
printAllSubgroups(clusters.get(g), g);
|
||||
}
|
||||
|
@ -433,18 +417,18 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
private void printEntities(ElkNode parent, Collection<ILeaf> entities) {
|
||||
// Convert all "leaf" to ELK node
|
||||
for (ILeaf ent : entities) {
|
||||
if (ent.isRemoved()) {
|
||||
if (ent.isRemoved())
|
||||
continue;
|
||||
}
|
||||
|
||||
manageSingleNode(parent, ent);
|
||||
}
|
||||
}
|
||||
|
||||
private void manageAllEdges() {
|
||||
// Convert all "link" to ELK edge
|
||||
for (final Link link : diagram.getLinks()) {
|
||||
for (final Link link : diagram.getLinks())
|
||||
manageSingleEdge(link);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void manageSingleNode(final ElkNode root, ILeaf leaf) {
|
||||
|
@ -548,14 +532,13 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
|||
}
|
||||
|
||||
private IEntityImage printEntityInternal(ILeaf ent) {
|
||||
if (ent.isRemoved()) {
|
||||
if (ent.isRemoved())
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
if (ent.getSvekImage() == null) {
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
if (skinParam.sameClassWidth()) {
|
||||
if (skinParam.sameClassWidth())
|
||||
System.err.println("NOT YET IMPLEMENED");
|
||||
}
|
||||
|
||||
return GeneralImageBuilder.createEntityImageBlock(ent, skinParam, diagram.isHideEmptyDescriptionForState(),
|
||||
diagram, getBibliotekon(), null, diagram.getUmlDiagramType(), diagram.getLinks());
|
||||
|
|
|
@ -43,7 +43,6 @@ import net.sourceforge.plantuml.ColorParam;
|
|||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.UmlDiagramType;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.Link;
|
||||
import net.sourceforge.plantuml.cucadiagram.LinkDecor;
|
||||
|
@ -138,13 +137,10 @@ public class ElkPath implements UDrawable {
|
|||
if (link.isHidden())
|
||||
return;
|
||||
|
||||
HColor color;
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
|
||||
if (UseStyle.useBetaStyle())
|
||||
color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
else
|
||||
color = rose.getHtmlColor(skinParam, null, getArrowColorParam());
|
||||
HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
|
||||
if (this.link.getColors() != null) {
|
||||
final HColor newColor = this.link.getColors().getColor(ColorType.ARROW, ColorType.LINE);
|
||||
|
|
|
@ -86,29 +86,26 @@ public class HtmlColorAndStyle {
|
|||
}
|
||||
|
||||
public static HtmlColorAndStyle build(ISkinParam skinParam, String definition) throws NoSuchColorException {
|
||||
HColor arrowColor;
|
||||
HColor arrowHeadColor = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
arrowColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||
} else {
|
||||
arrowColor = Rainbow.build(skinParam).getColors().get(0).arrowColor;
|
||||
arrowColor = Rainbow.build(skinParam).getColors().get(0).arrowHeadColor;
|
||||
}
|
||||
LinkStyle style = LinkStyle.NORMAL();
|
||||
|
||||
final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
HColor arrowColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||
skinParam.getIHtmlColorSet());
|
||||
final HColor arrowHeadColor = null;
|
||||
|
||||
LinkStyle linkStyle = LinkStyle.NORMAL();
|
||||
final HColorSet set = skinParam.getIHtmlColorSet();
|
||||
for (String s : definition.split(",")) {
|
||||
final LinkStyle tmpStyle = LinkStyle.fromString1(s);
|
||||
if (tmpStyle.isNormal() == false) {
|
||||
style = tmpStyle;
|
||||
linkStyle = tmpStyle;
|
||||
continue;
|
||||
}
|
||||
final HColor tmpColor = s == null ? null : set.getColor(skinParam.getThemeStyle(), s);
|
||||
if (tmpColor != null) {
|
||||
if (tmpColor != null)
|
||||
arrowColor = tmpColor;
|
||||
}
|
||||
|
||||
}
|
||||
return new HtmlColorAndStyle(arrowColor, style, arrowHeadColor);
|
||||
return new HtmlColorAndStyle(arrowColor, linkStyle, arrowHeadColor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
|
@ -72,20 +70,15 @@ public class Rainbow {
|
|||
}
|
||||
|
||||
public static Rainbow fromColor(HColor arrowColor, HColor arrowHeadColor) {
|
||||
if (arrowColor == null) {
|
||||
if (arrowColor == null)
|
||||
return Rainbow.none();
|
||||
}
|
||||
|
||||
return Rainbow.build(new HtmlColorAndStyle(arrowColor, arrowHeadColor));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Rainbow build(ISkinParam skinParam) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
final HColor arrow = rose.getHtmlColor(skinParam, ColorParam.arrow);
|
||||
final HColor arrowHead = rose.getHtmlColor(skinParam, null, ColorParam.arrowHead, ColorParam.arrow);
|
||||
return fromColor(arrow, arrowHead);
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
public static Rainbow build(Style style, HColorSet set, ThemeStyle themeStyle) {
|
||||
|
@ -94,9 +87,9 @@ public class Rainbow {
|
|||
}
|
||||
|
||||
public Rainbow withDefault(Rainbow defaultColor) {
|
||||
if (this.size() == 0) {
|
||||
if (this.size() == 0)
|
||||
return defaultColor;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -108,22 +101,21 @@ public class Rainbow {
|
|||
|
||||
public static Rainbow build(ISkinParam skinParam, String colorString, int colorArrowSeparationSpace)
|
||||
throws NoSuchColorException {
|
||||
if (colorString == null) {
|
||||
if (colorString == null)
|
||||
return Rainbow.none();
|
||||
}
|
||||
|
||||
final Rainbow result = new Rainbow(colorArrowSeparationSpace);
|
||||
for (String s : colorString.split(";")) {
|
||||
for (String s : colorString.split(";"))
|
||||
result.colors.add(HtmlColorAndStyle.build(skinParam, s));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean isInvisible() {
|
||||
for (HtmlColorAndStyle style : colors) {
|
||||
if (style.getStyle().isInvisible()) {
|
||||
for (HtmlColorAndStyle style : colors)
|
||||
if (style.getStyle().isInvisible())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,31 +84,13 @@ public class TextBlockUtils {
|
|||
}
|
||||
|
||||
public static TextBlock title(FontConfiguration font, Display stringsToDisplay, ISkinParam skinParam) {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
UStroke stroke = skinParam.getThickness(LineParam.titleBorder, null);
|
||||
final Rose rose = new Rose();
|
||||
HColor borderColor = rose.getHtmlColor(skinParam, ColorParam.titleBorder);
|
||||
final HColor backgroundColor = rose.getHtmlColor(skinParam, ColorParam.titleBackground);
|
||||
final TextBlockTitle result = new TextBlockTitle(font, stringsToDisplay, skinParam);
|
||||
if (stroke == null && borderColor == null) {
|
||||
return result;
|
||||
}
|
||||
if (stroke == null) {
|
||||
stroke = new UStroke(1.5);
|
||||
}
|
||||
if (borderColor == null) {
|
||||
borderColor = HColorUtils.BLACK;
|
||||
}
|
||||
final double corner = skinParam.getRoundCorner(CornerParam.titleBorder, null);
|
||||
return withMargin(bordered(result, stroke, borderColor, backgroundColor, corner), 2, 2);
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public static TextBlock withMargin(TextBlock textBlock, double marginX, double marginY) {
|
||||
if (marginX == 0 && marginY == 0) {
|
||||
if (marginX == 0 && marginY == 0)
|
||||
return textBlock;
|
||||
}
|
||||
|
||||
return new TextBlockMarged(textBlock, marginY, marginX, marginY, marginX);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,9 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine;
|
||||
import net.sourceforge.plantuml.ugraphic.UEmpty;
|
||||
|
@ -76,12 +75,7 @@ class USymbolDatabase extends USymbol {
|
|||
|
||||
final UPath closing = getClosingPath(width);
|
||||
ug.apply(new HColorNone().bg()).draw(closing);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
ug.apply(new UTranslate(width, height)).draw(new UEmpty(10, 10));
|
||||
// ug.apply(HColorUtils.BLACK).apply(new UTranslate(width, height)).draw(new
|
||||
// URectangle(10, 10));
|
||||
}
|
||||
ug.apply(new UTranslate(width, height)).draw(new UEmpty(10, 10));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -90,9 +90,8 @@ class USymbolNode extends USymbol {
|
|||
|
||||
ug.apply(UTranslate.dy(10)).draw(ULine.hline(width - 10));
|
||||
ug.apply(new UTranslate(width - 10, 10)).draw(ULine.vline(height - 10));
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
ug.apply(new UTranslate(0, height)).draw(new UEmpty(10, 10));
|
||||
}
|
||||
|
||||
ug.apply(new UTranslate(0, height)).draw(new UEmpty(10, 10));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ import net.sourceforge.plantuml.FontParam;
|
|||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamColors;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
|
@ -91,9 +90,9 @@ public class Colors {
|
|||
final String s = st.nextToken();
|
||||
final int x = s.indexOf(':');
|
||||
if (x == -1) {
|
||||
if (s.contains(".") == false) {
|
||||
if (s.contains(".") == false)
|
||||
map.put(mainType, set.getColor(themeStyle, s));
|
||||
}
|
||||
|
||||
} else {
|
||||
final String name = s.substring(0, x);
|
||||
final String value = s.substring(x + 1);
|
||||
|
@ -106,13 +105,13 @@ public class Colors {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (data.contains("line.dashed")) {
|
||||
if (data.contains("line.dashed"))
|
||||
lineStyle = LinkStyle.DASHED();
|
||||
} else if (data.contains("line.dotted")) {
|
||||
else if (data.contains("line.dotted"))
|
||||
lineStyle = LinkStyle.DOTTED();
|
||||
} else if (data.contains("line.bold")) {
|
||||
else if (data.contains("line.bold"))
|
||||
lineStyle = LinkStyle.BOLD();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public HColor getColor(ColorType key) {
|
||||
|
@ -121,29 +120,23 @@ public class Colors {
|
|||
|
||||
public HColor getColor(ColorType key1, ColorType key2) {
|
||||
final HColor result = getColor(key1);
|
||||
if (result != null) {
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
|
||||
return getColor(key2);
|
||||
}
|
||||
|
||||
public UStroke getSpecificLineStroke() {
|
||||
if (lineStyle == null) {
|
||||
if (lineStyle == null)
|
||||
return null;
|
||||
}
|
||||
|
||||
return lineStyle.getStroke3();
|
||||
}
|
||||
|
||||
// public Colors addSpecificLineStroke(UStroke specificStroke) {
|
||||
// final Colors result = copy();
|
||||
// result.specificStroke = specificStroke;
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public Colors add(ColorType type, HColor color) {
|
||||
if (color == null) {
|
||||
if (color == null)
|
||||
return this;
|
||||
}
|
||||
|
||||
final Colors result = copy();
|
||||
result.map.put(type, color);
|
||||
return result;
|
||||
|
@ -152,9 +145,9 @@ public class Colors {
|
|||
private Colors add(ColorType colorType, Colors other) {
|
||||
final Colors result = copy();
|
||||
result.map.putAll(other.map);
|
||||
if (other.lineStyle != null) {
|
||||
if (other.lineStyle != null)
|
||||
result.lineStyle = other.lineStyle;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -187,37 +180,20 @@ public class Colors {
|
|||
throws NoSuchColorException {
|
||||
Objects.requireNonNull(stereotype);
|
||||
final ColorType colorType = Objects.requireNonNull(Objects.requireNonNull(param).getColorType());
|
||||
if (getColor(colorType) != null) {
|
||||
if (getColor(colorType) != null)
|
||||
return this;
|
||||
}
|
||||
|
||||
final Colors colors = skinParam.getColors(param, stereotype);
|
||||
return add(colorType, colors);
|
||||
}
|
||||
|
||||
private Colors applyFontParamStereotype(Stereotype stereotype, ISkinParam skinParam, FontParam param) {
|
||||
Objects.requireNonNull(stereotype);
|
||||
if (param == null) {
|
||||
return this;
|
||||
}
|
||||
final ColorType colorType = ColorType.TEXT;
|
||||
if (getColor(colorType) != null) {
|
||||
return this;
|
||||
}
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
return this;
|
||||
}
|
||||
final HColor col = skinParam.getFontHtmlColor(stereotype, param);
|
||||
return add(colorType, col);
|
||||
}
|
||||
|
||||
public Colors applyStereotypeForNote(Stereotype stereotype, ISkinParam skinParam, FontParam fontParam,
|
||||
ColorParam... params) throws NoSuchColorException {
|
||||
Objects.requireNonNull(stereotype);
|
||||
Colors result = this;
|
||||
for (ColorParam param : Objects.requireNonNull(params)) {
|
||||
for (ColorParam param : Objects.requireNonNull(params))
|
||||
result = result.applyStereotype(stereotype, skinParam, param);
|
||||
}
|
||||
result = result.applyFontParamStereotype(stereotype, skinParam, fontParam);
|
||||
|
||||
result.shadowing = skinParam.shadowingForNote(stereotype);
|
||||
return result;
|
||||
}
|
||||
|
@ -227,9 +203,9 @@ public class Colors {
|
|||
}
|
||||
|
||||
public UStroke muteStroke(UStroke stroke) {
|
||||
if (lineStyle == null) {
|
||||
if (lineStyle == null)
|
||||
return stroke;
|
||||
}
|
||||
|
||||
return lineStyle.muteStroke(stroke);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,10 @@ public class CommandCreateMap extends CommandMultilines2<AbstractClassOrObjectDi
|
|||
for (StringLocated sl : lines) {
|
||||
final String line = sl.getString();
|
||||
assert line.length() > 0;
|
||||
entity1.getBodier().addFieldOrMethod(line);
|
||||
final boolean ok = entity1.getBodier().addFieldOrMethod(line);
|
||||
if (ok == false)
|
||||
return CommandExecutionResult.error("Map definition should contains key => value");
|
||||
|
||||
if (BodierMap.getLinkedEntry(line) != null) {
|
||||
final String linkStr = BodierMap.getLinkedEntry(line);
|
||||
final int x = line.indexOf(linkStr);
|
||||
|
@ -135,11 +138,11 @@ public class CommandCreateMap extends CommandMultilines2<AbstractClassOrObjectDi
|
|||
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));
|
||||
|
|
|
@ -35,74 +35,44 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.png;
|
||||
|
||||
import java.awt.Font;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.SpriteContainerEmpty;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
|
||||
public class PngTitler {
|
||||
|
||||
private final HColor textColor;
|
||||
private final HColor hyperlinkColor;
|
||||
private final DisplaySection text;
|
||||
private final int fontSize;
|
||||
private final String fontFamily;
|
||||
private final boolean useUnderlineForHyperlink;
|
||||
|
||||
private final Style style;
|
||||
private final HColorSet set;
|
||||
private final ISkinSimple spriteContainer;
|
||||
|
||||
public PngTitler(HColor textColor, DisplaySection text, int fontSize, String fontFamily, HColor hyperlinkColor,
|
||||
boolean useUnderlineForHyperlink, Style style, HColorSet set, ISkinSimple spriteContainer) {
|
||||
public PngTitler(DisplaySection text, Style style, HColorSet set, ISkinSimple spriteContainer) {
|
||||
this.style = style;
|
||||
this.set = set;
|
||||
this.spriteContainer = spriteContainer;
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
textColor = style.value(PName.FontColor).asColor(spriteContainer.getThemeStyle(), set);
|
||||
fontSize = style.value(PName.FontSize).asInt();
|
||||
fontFamily = style.value(PName.FontName).asString();
|
||||
hyperlinkColor = style.value(PName.HyperLinkColor).asColor(spriteContainer.getThemeStyle(), set);
|
||||
}
|
||||
this.textColor = textColor;
|
||||
this.text = text;
|
||||
this.fontSize = fontSize;
|
||||
this.fontFamily = fontFamily;
|
||||
this.hyperlinkColor = hyperlinkColor;
|
||||
this.useUnderlineForHyperlink = useUnderlineForHyperlink;
|
||||
|
||||
}
|
||||
|
||||
public Dimension2D getTextDimension(StringBounder stringBounder) {
|
||||
final TextBlock textBloc = getRibbonBlock();
|
||||
if (textBloc == null) {
|
||||
if (textBloc == null)
|
||||
return null;
|
||||
}
|
||||
|
||||
return textBloc.calculateDimension(stringBounder);
|
||||
}
|
||||
|
||||
public TextBlock getRibbonBlock() {
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Display display = text.getDisplay();
|
||||
if (display == null) {
|
||||
return null;
|
||||
}
|
||||
return style.createTextBlockBordered(display, set, spriteContainer);
|
||||
}
|
||||
final UFont normalFont = new UFont(fontFamily, Font.PLAIN, fontSize);
|
||||
return text.createRibbon(FontConfiguration.create(normalFont, textColor, hyperlinkColor, useUnderlineForHyperlink),
|
||||
new SpriteContainerEmpty(), null);
|
||||
final Display display = text.getDisplay();
|
||||
if (display == null)
|
||||
return null;
|
||||
|
||||
return style.createTextBlockBordered(display, set, spriteContainer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ public class CommandSkin extends SingleLineCommand2<TitledDiagram> {
|
|||
@Override
|
||||
protected CommandExecutionResult executeArg(TitledDiagram diagram, LineLocation location, RegexResult arg) {
|
||||
try {
|
||||
UseStyle.setBetaStyle(true);
|
||||
return diagram.loadSkin(arg.get("SKIN", 0));
|
||||
} catch (IOException e) {
|
||||
return CommandExecutionResult.error("Skin read error");
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.sequencediagram.graphic;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
@ -49,6 +48,7 @@ import net.sourceforge.plantuml.FontParam;
|
|||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
|
||||
|
@ -157,10 +157,9 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
|
|||
compTitle = style.createTextBlockBordered(page.getTitle(), diagram.getSkinParam().getIHtmlColorSet(),
|
||||
diagram.getSkinParam());
|
||||
} else {
|
||||
compTitle = TextBlockUtils.withMargin(
|
||||
TextBlockUtils.title(FontConfiguration.create(drawableSet.getSkinParam(), FontParam.TITLE, null),
|
||||
page.getTitle(), drawableSet.getSkinParam()),
|
||||
7, 7);
|
||||
compTitle = TextBlockUtils.withMargin(TextBlockUtils.title(
|
||||
FontConfiguration.create(drawableSet.getSkinParam(), FontParam.TITLE, null), page.getTitle(),
|
||||
drawableSet.getSkinParam()), 7, 7);
|
||||
}
|
||||
final Dimension2D dimTitle = compTitle.calculateDimension(stringBounder);
|
||||
area.setTitleArea(dimTitle.getWidth(), dimTitle.getHeight());
|
||||
|
@ -244,18 +243,11 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
|
|||
|
||||
private PngTitler getPngTitler(final FontParam fontParam, int page) {
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
final HColor hyperlinkColor = skinParam.getHyperlinkColor();
|
||||
final HColor titleColor = skinParam.getFontHtmlColor(null, fontParam);
|
||||
final String fontFamily = skinParam.getFont(null, false, fontParam).getFamily(null);
|
||||
final int fontSize = skinParam.getFont(null, false, fontParam).getSize();
|
||||
final DisplaySection display = diagram.getFooterOrHeaderTeoz(fontParam).withPage(page + 1, pages.size());
|
||||
Style style = null;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignatureBasic def = fontParam.getStyleDefinition(null);
|
||||
style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
return new PngTitler(titleColor, display, fontSize, fontFamily, hyperlinkColor,
|
||||
skinParam.useUnderlineForHyperlink(), style, skinParam.getIHtmlColorSet(), skinParam);
|
||||
final StyleSignatureBasic def = fontParam.getStyleDefinition(null);
|
||||
final Style style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
return new PngTitler(display, style, skinParam.getIHtmlColorSet(), skinParam);
|
||||
}
|
||||
|
||||
private boolean isLegendTop() {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.sequencediagram.teoz;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.FontParam;
|
|||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
|
||||
|
@ -70,7 +70,6 @@ import net.sourceforge.plantuml.style.Style;
|
|||
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;
|
||||
import net.sourceforge.plantuml.utils.MathUtils;
|
||||
|
||||
public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
||||
|
@ -137,9 +136,7 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
|||
if (this.index != index) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
return diagram.createImageBuilder(fileFormatOption)
|
||||
.drawable(new Foo(index))
|
||||
.write(os);
|
||||
return diagram.createImageBuilder(fileFormatOption).drawable(new Foo(index)).write(os);
|
||||
}
|
||||
|
||||
class Foo implements UDrawable {
|
||||
|
@ -234,22 +231,16 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
|
|||
}
|
||||
|
||||
public TextBlock getFooterOrHeader(final FontParam param) {
|
||||
if (diagram.getFooterOrHeaderTeoz(param).isNull()) {
|
||||
if (diagram.getFooterOrHeaderTeoz(param).isNull())
|
||||
return new TeozLayer(null, stringBounder, param);
|
||||
}
|
||||
|
||||
final DisplaySection display = diagram.getFooterOrHeaderTeoz(param).withPage(index + 1, getNbPages());
|
||||
final HColor hyperlinkColor = getSkinParam().getHyperlinkColor();
|
||||
final HColor titleColor = getSkinParam().getFontHtmlColor(null, param);
|
||||
final String fontFamily = getSkinParam().getFont(null, false, param).getFamily(null);
|
||||
final int fontSize = getSkinParam().getFont(null, false, param).getSize();
|
||||
Style style = null;
|
||||
final ISkinParam skinParam = diagram.getSkinParam();
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignatureBasic def = param.getStyleDefinition(null);
|
||||
style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
}
|
||||
final PngTitler pngTitler = new PngTitler(titleColor, display, fontSize, fontFamily, hyperlinkColor,
|
||||
getSkinParam().useUnderlineForHyperlink(), style, skinParam.getIHtmlColorSet(), skinParam);
|
||||
|
||||
final StyleSignatureBasic def = param.getStyleDefinition(null);
|
||||
final Style style = def.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||
|
||||
final PngTitler pngTitler = new PngTitler(display, style, skinParam.getIHtmlColorSet(), skinParam);
|
||||
return new TeozLayer(pngTitler, stringBounder, param);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,15 +65,11 @@ public class CommandStyleMultilinesCSS extends CommandMultilines2<TitledDiagram>
|
|||
}
|
||||
|
||||
protected CommandExecutionResult executeNow(TitledDiagram diagram, BlocLines lines) {
|
||||
UseStyle.setBetaStyle(true);
|
||||
if (UseStyle.useBetaStyle() == false) {
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
try {
|
||||
final StyleBuilder styleBuilder = diagram.getSkinParam().getCurrentStyleBuilder();
|
||||
for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines.subExtract(1, 1), styleBuilder)) {
|
||||
for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines.subExtract(1, 1), styleBuilder))
|
||||
diagram.getSkinParam().muteStyle(modifiedStyle);
|
||||
}
|
||||
|
||||
((SkinParam) diagram.getSkinParam()).applyPendingStyleMigration();
|
||||
return CommandExecutionResult.ok();
|
||||
} catch (NoStyleAvailableException e) {
|
||||
|
|
|
@ -209,6 +209,7 @@ public class FromSkinparamToStyle {
|
|||
addMagic(SName.storage);
|
||||
addMagic(SName.usecase);
|
||||
addMagic(SName.map);
|
||||
addMagic(SName.archimate);
|
||||
|
||||
}
|
||||
|
||||
|
@ -233,7 +234,7 @@ public class FromSkinparamToStyle {
|
|||
if (key.contains("<<")) {
|
||||
final StringTokenizer st = new StringTokenizer(key, "<>");
|
||||
this.key = st.nextToken();
|
||||
this.stereo = st.nextToken();
|
||||
this.stereo = st.hasMoreTokens() ? st.nextToken() : null;
|
||||
} else {
|
||||
this.key = key;
|
||||
this.stereo = null;
|
||||
|
|
|
@ -50,6 +50,11 @@ public class StyleSignatures implements StyleSignature {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return all.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Style getMergedStyle(StyleBuilder currentStyleBuilder) {
|
||||
if (all.size() == 0)
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -47,9 +46,8 @@ import java.util.Set;
|
|||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.cucadiagram.BodyFactory;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
|
@ -116,7 +114,6 @@ public class EntityImageDescription extends AbstractEntityImage {
|
|||
this.fixCircleLabelOverlapping = getSkinParam().fixCircleLabelOverlapping();
|
||||
|
||||
this.links = links;
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
USymbol symbol = getUSymbol(entity);
|
||||
if (symbol == USymbols.FOLDER)
|
||||
this.shapeType = ShapeType.FOLDER;
|
||||
|
@ -134,50 +131,30 @@ public class EntityImageDescription extends AbstractEntityImage {
|
|||
|
||||
final Colors colors = entity.getColors();
|
||||
HColor backcolor = colors.getColor(ColorType.BACK);
|
||||
final HColor forecolor;
|
||||
final double roundCorner;
|
||||
final double diagonalCorner;
|
||||
final double deltaShadow;
|
||||
final UStroke stroke;
|
||||
final FontConfiguration fcTitle;
|
||||
final FontConfiguration fcStereo;
|
||||
|
||||
Style style = null;
|
||||
final HorizontalAlignment defaultAlign;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final StyleSignatureBasic tmp = StyleSignatureBasic.of(SName.root, SName.element, styleName,
|
||||
symbol.getSkinParameter().getStyleName());
|
||||
style = tmp.withTOBECHANGED(stereotype).getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
||||
style = style.eventuallyOverride(colors);
|
||||
final Style styleStereo = tmp.forStereotypeItself(stereotype)
|
||||
.getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
||||
forecolor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
final StyleSignatureBasic tmp = StyleSignatureBasic.of(SName.root, SName.element, styleName,
|
||||
symbol.getSkinParameter().getStyleName());
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
final Style style = tmp.withTOBECHANGED(stereotype).getMergedStyle(getSkinParam().getCurrentStyleBuilder())
|
||||
.eventuallyOverride(colors);
|
||||
|
||||
final Style styleStereo = tmp.forStereotypeItself(stereotype)
|
||||
.getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
||||
final HColor forecolor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
diagonalCorner = style.value(PName.DiagonalCorner).asDouble();
|
||||
deltaShadow = style.value(PName.Shadowing).asDouble();
|
||||
stroke = style.getStroke(colors);
|
||||
fcTitle = style.getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet());
|
||||
fcStereo = styleStereo.getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
defaultAlign = style.getHorizontalAlignment();
|
||||
} else {
|
||||
forecolor = SkinParamUtils.getColor(getSkinParam(), stereotype, symbol.getColorParamBorder());
|
||||
if (backcolor == null)
|
||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), symbol.getColorParamBack());
|
||||
|
||||
roundCorner = symbol.getSkinParameter().getRoundCorner(getSkinParam(), stereotype);
|
||||
diagonalCorner = symbol.getSkinParameter().getDiagonalCorner(getSkinParam(), stereotype);
|
||||
deltaShadow = getSkinParam().shadowing2(getEntity().getStereotype(), symbol.getSkinParameter()) ? 3 : 0;
|
||||
stroke = colors.muteStroke(symbol.getSkinParameter().getStroke(getSkinParam(), stereotype));
|
||||
fcTitle = FontConfiguration.create(getSkinParam(), symbol.getFontParam(), stereotype);
|
||||
fcStereo = FontConfiguration.create(getSkinParam(), symbol.getFontParamStereotype(), stereotype);
|
||||
defaultAlign = HorizontalAlignment.LEFT;
|
||||
}
|
||||
final double roundCorner = style.value(PName.RoundCorner).asDouble();
|
||||
final double diagonalCorner = style.value(PName.DiagonalCorner).asDouble();
|
||||
final double deltaShadow = style.value(PName.Shadowing).asDouble();
|
||||
final UStroke stroke = style.getStroke(colors);
|
||||
final FontConfiguration fcTitle = style.getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
final FontConfiguration fcStereo = styleStereo.getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
final HorizontalAlignment defaultAlign = style.getHorizontalAlignment();
|
||||
|
||||
assert getStereo() == stereotype;
|
||||
|
||||
|
|
|
@ -35,21 +35,17 @@
|
|||
*/
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.CornerParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineConfigurable;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.Stencil;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
|
@ -99,12 +95,8 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
|||
final Stereotype stereotype = entity.getStereotype();
|
||||
this.roundCorner = skinParam.getRoundCorner(CornerParam.DEFAULT, null);
|
||||
|
||||
final FontConfiguration fcHeader;
|
||||
if (UseStyle.useBetaStyle())
|
||||
fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
else
|
||||
fcHeader = FontConfiguration.create(getSkinParam(), FontParam.OBJECT, stereotype);
|
||||
final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
this.name = TextBlockUtils
|
||||
.withMargin(entity.getDisplay().create(fcHeader, HorizontalAlignment.CENTER, skinParam), 2, 2);
|
||||
|
@ -117,14 +109,10 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
|||
FontConfiguration.create(getSkinParam(), FontParam.OBJECT_STEREOTYPE, stereotype),
|
||||
HorizontalAlignment.CENTER, skinParam);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final FontConfiguration fontConfiguration = getStyleHeader()
|
||||
.getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet());
|
||||
this.entries = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, false,
|
||||
entity.getStereotype(), getStyle(), fontConfiguration);
|
||||
} else
|
||||
this.entries = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, false,
|
||||
entity.getStereotype(), null, null);
|
||||
final FontConfiguration fontConfiguration = getStyleHeader()
|
||||
.getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet());
|
||||
this.entries = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, false,
|
||||
entity.getStereotype(), getStyle(), fontConfiguration);
|
||||
|
||||
this.url = entity.getUrl99();
|
||||
|
||||
|
@ -168,27 +156,23 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
|||
final double heightTotal = dimTotal.getHeight();
|
||||
final Shadowable rect = new URectangle(widthTotal, heightTotal).rounded(roundCorner);
|
||||
|
||||
final HColor borderColor;
|
||||
final UStroke stroke;
|
||||
HColor backcolor = getEntity().getColors().getColor(ColorType.BACK);
|
||||
HColor headerBackcolor = getEntity().getColors().getColor(ColorType.HEADER);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyle();
|
||||
borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
final Style style = getStyle();
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
if (headerBackcolor == null)
|
||||
headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor)
|
||||
.asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor;
|
||||
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
rect.setDeltaShadow(style.value(PName.Shadowing).asDouble());
|
||||
stroke = style.getStroke();
|
||||
} else {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype()))
|
||||
rect.setDeltaShadow(4);
|
||||
borderColor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.objectBorder);
|
||||
if (backcolor == null)
|
||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.objectBackground);
|
||||
stroke = getStroke();
|
||||
}
|
||||
|
||||
rect.setDeltaShadow(style.value(PName.Shadowing).asDouble());
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
ug = ug.apply(borderColor).apply(backcolor.bg());
|
||||
|
||||
|
@ -200,6 +184,12 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
|||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
ug.apply(stroke).draw(rect);
|
||||
|
||||
if (roundCorner == 0 && headerBackcolor != null && backcolor.equals(headerBackcolor) == false) {
|
||||
final Shadowable rect2 = new URectangle(widthTotal, dimTitle.getHeight());
|
||||
final UGraphic ugHeader = ug.apply(headerBackcolor.bg());
|
||||
ugHeader.apply(stroke).draw(rect2);
|
||||
}
|
||||
|
||||
final ULayoutGroup header = new ULayoutGroup(new PlacementStrategyY1Y2(ug.getStringBounder()));
|
||||
if (stereo != null)
|
||||
|
@ -218,17 +208,6 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
|||
ug.closeGroup();
|
||||
}
|
||||
|
||||
private UStroke getStroke() {
|
||||
UStroke stroke = lineConfig.getColors().getSpecificLineStroke();
|
||||
if (stroke == null)
|
||||
stroke = getSkinParam().getThickness(LineParam.objectBorder, getStereo());
|
||||
|
||||
if (stroke == null)
|
||||
stroke = new UStroke(1.5);
|
||||
|
||||
return stroke;
|
||||
}
|
||||
|
||||
private double getMethodOrFieldHeight(final Dimension2D dim) {
|
||||
final double fieldsHeight = dim.getHeight();
|
||||
if (fieldsHeight == 0 && this.getEntity().getLeafType() != LeafType.MAP)
|
||||
|
|
|
@ -39,17 +39,13 @@ import java.awt.geom.Rectangle2D;
|
|||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
import net.sourceforge.plantuml.CornerParam;
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineConfigurable;
|
||||
import net.sourceforge.plantuml.LineParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.creole.Stencil;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
|
@ -101,12 +97,8 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
|||
final Stereotype stereotype = entity.getStereotype();
|
||||
this.roundCorner = skinParam.getRoundCorner(CornerParam.DEFAULT, null);
|
||||
|
||||
final FontConfiguration fcHeader;
|
||||
if (UseStyle.useBetaStyle())
|
||||
fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
else
|
||||
fcHeader = FontConfiguration.create(getSkinParam(), FontParam.OBJECT, stereotype);
|
||||
final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
final TextBlock tmp = getUnderlinedName(entity).create(fcHeader, HorizontalAlignment.CENTER, skinParam);
|
||||
this.name = TextBlockUtils.withMargin(tmp, 2, 2);
|
||||
|
@ -170,37 +162,23 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
|||
final double heightTotal = dimTotal.getHeight();
|
||||
final Shadowable rect = new URectangle(widthTotal, heightTotal).rounded(roundCorner);
|
||||
|
||||
final HColor borderColor;
|
||||
final UStroke stroke;
|
||||
|
||||
HColor backcolor = getEntity().getColors().getColor(ColorType.BACK);
|
||||
HColor headerBackcolor = getEntity().getColors().getColor(ColorType.HEADER);
|
||||
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getStyle();
|
||||
borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
final Style style = getStyle();
|
||||
final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
if (headerBackcolor == null)
|
||||
headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor)
|
||||
.asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor;
|
||||
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
if (headerBackcolor == null)
|
||||
headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor)
|
||||
.asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor;
|
||||
|
||||
if (backcolor == null)
|
||||
backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
|
||||
getSkinParam().getIHtmlColorSet());
|
||||
|
||||
rect.setDeltaShadow(style.value(PName.Shadowing).asDouble());
|
||||
stroke = style.getStroke();
|
||||
|
||||
} else {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype()))
|
||||
rect.setDeltaShadow(4);
|
||||
borderColor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.objectBorder);
|
||||
if (backcolor == null)
|
||||
backcolor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.objectBackground);
|
||||
stroke = getStroke();
|
||||
|
||||
}
|
||||
rect.setDeltaShadow(style.value(PName.Shadowing).asDouble());
|
||||
final UStroke stroke = style.getStroke();
|
||||
|
||||
ug = ug.apply(borderColor).apply(backcolor.bg());
|
||||
|
||||
|
@ -213,11 +191,9 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
|||
ug.startGroup(typeIDent);
|
||||
ug.apply(stroke).draw(rect);
|
||||
|
||||
UGraphic ugHeader = ug;
|
||||
if (roundCorner == 0 && headerBackcolor != null && backcolor.equals(headerBackcolor) == false) {
|
||||
final Shadowable rect2 = new URectangle(widthTotal, dimTitle.getHeight());
|
||||
rect2.setDeltaShadow(0);
|
||||
ugHeader = ugHeader.apply(headerBackcolor.bg());
|
||||
final UGraphic ugHeader = ug.apply(headerBackcolor.bg());
|
||||
ugHeader.apply(stroke).draw(rect2);
|
||||
}
|
||||
|
||||
|
@ -242,17 +218,6 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
|||
return header;
|
||||
}
|
||||
|
||||
private UStroke getStroke() {
|
||||
UStroke stroke = lineConfig.getColors().getSpecificLineStroke();
|
||||
if (stroke == null)
|
||||
stroke = getSkinParam().getThickness(LineParam.objectBorder, getStereo());
|
||||
|
||||
if (stroke == null)
|
||||
stroke = new UStroke(1.5);
|
||||
|
||||
return stroke;
|
||||
}
|
||||
|
||||
private double getMethodOrFieldHeight(final Dimension2D dim) {
|
||||
final double fieldsHeight = dim.getHeight();
|
||||
if (fieldsHeight == 0)
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
* (C) Copyright 2009-2023, 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
|
||||
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.tikz;
|
||||
|
@ -120,6 +120,19 @@ public class TikzGraphics {
|
|||
return Objects.requireNonNull(result);
|
||||
}
|
||||
|
||||
private boolean mustApplyFillColor() {
|
||||
if (fillcolor == null)
|
||||
return false;
|
||||
|
||||
if (HColorUtils.isTransparent(fillcolor))
|
||||
return false;
|
||||
|
||||
if (mapper.toColor(fillcolor).getAlpha() == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void appendFillColor(StringBuilder sb, boolean colorBackup) {
|
||||
if (fillcolor == null)
|
||||
return;
|
||||
|
@ -467,18 +480,6 @@ public class TikzGraphics {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean mustApplyFillColor() {
|
||||
if (fillcolor == null)
|
||||
return false;
|
||||
|
||||
if (HColorUtils.isTransparent(fillcolor))
|
||||
return false;
|
||||
|
||||
if (mapper.toColor(fillcolor).getAlpha() == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void rectangleRound(double x, double y, double width, double height, double r) {
|
||||
double[] points = new double[8 * 2];
|
||||
points[0] = x;
|
||||
|
@ -549,7 +550,7 @@ public class TikzGraphics {
|
|||
if (color != null)
|
||||
sb.append("color=" + getColorName(color) + ",");
|
||||
|
||||
if (fillcolor != null && !HColorUtils.isTransparent(fillcolor))
|
||||
if (mustApplyFillColor())
|
||||
sb.append("fill=" + getColorName(fillcolor) + ",");
|
||||
|
||||
sb.append("line width=" + thickness + "pt] " + couple(x, y) + " ellipse (" + format(width) + "pt and "
|
||||
|
@ -563,7 +564,7 @@ public class TikzGraphics {
|
|||
if (color != null)
|
||||
sb.append("color=" + getColorName(color) + ",");
|
||||
|
||||
if (fillcolor != null)
|
||||
if (mustApplyFillColor())
|
||||
sb.append("fill=" + getColorName(fillcolor) + ",");
|
||||
|
||||
sb.append("line width=" + thickness + "pt] " + couple(x, y) + " arc (" + angleStart + ":" + angleEnd + ":"
|
||||
|
|
|
@ -44,7 +44,7 @@ public class Version {
|
|||
private static final int MAJOR_SEPARATOR = 1000000;
|
||||
|
||||
public static int version() {
|
||||
return 1202203;
|
||||
return 1202204;
|
||||
}
|
||||
|
||||
public static int versionPatched() {
|
||||
|
@ -80,7 +80,7 @@ public class Version {
|
|||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 2;
|
||||
final int beta = 0;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class Version {
|
|||
}
|
||||
|
||||
public static long compileTime() {
|
||||
return 1648570257787L;
|
||||
return 1649510957985L;
|
||||
}
|
||||
|
||||
public static String compileTimeString() {
|
||||
|
|
Loading…
Reference in New Issue