From 55390ef1d1ea122336de77aa2c4c7b8a58485d28 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 21 May 2018 21:24:25 +0200 Subject: [PATCH] Start to add Problem Diagrams --- src/net/sourceforge/plantuml/ColorParam.java | 21 +++++++++++-------- .../EntityImageDesignedDomain.java | 4 ++-- .../descdiagram/EntityImageRequirement.java | 10 ++++----- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/net/sourceforge/plantuml/ColorParam.java b/src/net/sourceforge/plantuml/ColorParam.java index ae5807581..d35adf14a 100644 --- a/src/net/sourceforge/plantuml/ColorParam.java +++ b/src/net/sourceforge/plantuml/ColorParam.java @@ -167,15 +167,18 @@ public enum ColorParam { arrowLollipop(HtmlColorUtils.WHITE), - domainBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), - domainBorder(HtmlColorUtils.MY_RED, ColorType.LINE), - designedDomainBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), - designedDomainBorder(HtmlColorUtils.MY_RED, ColorType.LINE), - machineBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), - machineBorder(HtmlColorUtils.MY_RED, ColorType.LINE), - requirementBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), - requirementBorder(HtmlColorUtils.MY_RED, ColorType.LINE); - + machineBackground(HtmlColorUtils.WHITE), + machineBorder(HtmlColorUtils.BLACK, ColorType.LINE), + requirementBackground(HtmlColorUtils.WHITE), + requirementBorder(HtmlColorUtils.BLACK, ColorType.LINE), + designedBackground(HtmlColorUtils.WHITE), + designedBorder(HtmlColorUtils.BLACK, ColorType.LINE), + domainBackground(HtmlColorUtils.WHITE), + domainBorder(HtmlColorUtils.BLACK, ColorType.LINE), + lexicalBackground(HtmlColorUtils.WHITE), + lexicalBorder(HtmlColorUtils.BLACK, ColorType.LINE), + biddableBackground(HtmlColorUtils.WHITE), + biddableBorder(HtmlColorUtils.BLACK, ColorType.LINE); private final boolean isBackground; private final HtmlColor defaultValue; diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java index bf526e17b..cc400a0fc 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageDesignedDomain.java @@ -127,10 +127,10 @@ public class EntityImageDesignedDomain extends AbstractEntityImage { final URectangle rect = new URectangle(widthTotal, heightTotal, 0, 0); URectangle rect2 = new URectangle(4, heightTotal, 0, 0); - ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.designedDomainBorder, getStereo()))); + ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.designedBorder, getStereo()))); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { - backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.designedDomainBackground, getStereo()); + backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.designedBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); if (url != null) { diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java index 2c5932efb..c63d0a0bf 100644 --- a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java +++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java @@ -78,14 +78,14 @@ public class EntityImageRequirement extends AbstractEntityImage { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); - final TextBlock tmp = new BodyEnhanced(entity.getDisplay(), FontParam.USECASE, skinParam, + final TextBlock tmp = new BodyEnhanced(entity.getDisplay(), FontParam.REQUIREMENT, skinParam, HorizontalAlignment.CENTER, stereotype, true, false, entity); if (stereotype == null || stereotype.getLabel(false) == null) { this.desc = tmp; } else { final TextBlock stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())) - .create(new FontConfiguration(getSkinParam(), FontParam.USECASE_STEREOTYPE, stereotype), + .create(new FontConfiguration(getSkinParam(), FontParam.REQUIREMENT_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam); this.desc = TextBlockUtils.mergeTB(stereo, tmp, HorizontalAlignment.CENTER); } @@ -94,7 +94,7 @@ public class EntityImageRequirement extends AbstractEntityImage { } private UStroke getStroke() { - UStroke stroke = getSkinParam().getThickness(LineParam.usecaseBorder, getStereo()); + UStroke stroke = getSkinParam().getThickness(LineParam.requirementBorder, getStereo()); if (stroke == null) { stroke = new UStroke(7, 7, 1.5); // stroke = new UStroke(1.5); @@ -120,12 +120,12 @@ public class EntityImageRequirement extends AbstractEntityImage { ug = ug.apply(getStroke()); HtmlColor linecolor = getEntity().getColors(getSkinParam()).getColor(ColorType.LINE); if (linecolor == null) { - linecolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.usecaseBorder, getStereo()); + linecolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.requirementBorder, getStereo()); } ug = ug.apply(new UChangeColor(linecolor)); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { - backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.usecaseBackground, getStereo()); + backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.requirementBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());