1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 10:59:01 +00:00

Start to add Problem Diagrams

This commit is contained in:
Arnaud Roques 2018-05-21 21:24:25 +02:00
parent 1aec937bbe
commit 55390ef1d1
3 changed files with 19 additions and 16 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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());