diff --git a/skin/plantuml.skin b/skin/plantuml.skin index 8c80165df..c641c48b4 100644 --- a/skin/plantuml.skin +++ b/skin/plantuml.skin @@ -240,7 +240,7 @@ delay { swimlane { - BackGroundColor none + BackGroundColor transparent LineColor black LineThickness 1.5 FontSize 18 @@ -293,9 +293,9 @@ activityDiagram { FontSize 12 RoundCorner 25 } - partition { + composite { LineColor black - BackgroundColor none + BackgroundColor transparent LineThickness 1.5 } diamond { diff --git a/skin/rose.skin b/skin/rose.skin index 4c49eab6c..95b559cb4 100644 --- a/skin/rose.skin +++ b/skin/rose.skin @@ -310,7 +310,7 @@ collections { } swimlane { - BackGroundColor none + BackGroundColor transparent LineColor black LineThickness 2 FontSize 18 @@ -370,9 +370,9 @@ activityDiagram { FontSize 12 RoundCorner 25 } - partition { + composite { LineColor black - BackgroundColor none + BackgroundColor transparent } diamond { FontSize 11 diff --git a/src/jcckit/util/ConfigParameters.java b/src/jcckit/util/ConfigParameters.java index 5f3a2085a..a1c6b2593 100644 --- a/src/jcckit/util/ConfigParameters.java +++ b/src/jcckit/util/ConfigParameters.java @@ -21,8 +21,7 @@ package jcckit.util; import java.awt.Color; import java.util.StringTokenizer; -import net.sourceforge.plantuml.api.ThemeStyle; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColorSet; import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException; @@ -306,7 +305,7 @@ static private HColorSet colors = HColorSet.instance(); private Color decodeInternal(String value) { if (value!=null) { try { - return colors.getColor(ThemeStyle.LIGHT_REGULAR, value).toColor(new ColorMapperIdentity()); + return colors.getColor(value).toColor(ColorMapper.IDENTITY); } catch (NoSuchColorException e) { return Color.WHITE; } diff --git a/src/net/sourceforge/plantuml/AnnotatedWorker.java b/src/net/sourceforge/plantuml/AnnotatedWorker.java index 8cf7e3a09..fe2aff27c 100644 --- a/src/net/sourceforge/plantuml/AnnotatedWorker.java +++ b/src/net/sourceforge/plantuml/AnnotatedWorker.java @@ -101,8 +101,7 @@ public class AnnotatedWorker { 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 HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final SymbolContext symbolContext = new SymbolContext(getBackgroundColor(), borderColor).withShadow(deltaShadow) .withStroke(stroke); diff --git a/src/net/sourceforge/plantuml/BlockUml.java b/src/net/sourceforge/plantuml/BlockUml.java index 6fddffede..826cee06a 100644 --- a/src/net/sourceforge/plantuml/BlockUml.java +++ b/src/net/sourceforge/plantuml/BlockUml.java @@ -48,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.code.AsciiEncoder; import net.sourceforge.plantuml.code.Transcoder; import net.sourceforge.plantuml.code.TranscoderUtil; @@ -72,15 +71,14 @@ public class BlockUml { private final Defines localDefines; private final ISkinSimple skinParam; private final Set included = new HashSet<>(); - private final ThemeStyle style; public Set getIncluded() { return Collections.unmodifiableSet(included); } @Deprecated - BlockUml(ThemeStyle style, String... strings) { - this(style, convert(strings), Defines.createEmpty(), null, null, null); + BlockUml(String... strings) { + this(convert(strings), Defines.createEmpty(), null, null, null); } public String getEncodedUrl() throws IOException { @@ -122,12 +120,11 @@ public class BlockUml { */ @Deprecated public BlockUml(List strings, Defines defines, ISkinSimple skinParam, PreprocessorModeSet mode) { - this(ThemeStyle.LIGHT_REGULAR, strings, defines, skinParam, mode, charsetOrDefault(mode.getCharset())); + this(strings, defines, skinParam, mode, charsetOrDefault(mode.getCharset())); } - public BlockUml(ThemeStyle style, List strings, Defines defines, ISkinSimple skinParam, - PreprocessorModeSet mode, Charset charset) { - this.style = style; + public BlockUml(List strings, Defines defines, ISkinSimple skinParam, PreprocessorModeSet mode, + Charset charset) { this.rawSource = new ArrayList<>(strings); this.localDefines = defines; this.skinParam = skinParam; @@ -179,7 +176,7 @@ public class BlockUml { if (preprocessorError) system = new PSystemErrorPreprocessor(data, debug); else - system = new PSystemBuilder().createPSystem(style, skinParam, data, rawSource); + system = new PSystemBuilder().createPSystem(skinParam, data, rawSource); } return system; } diff --git a/src/net/sourceforge/plantuml/BlockUmlBuilder.java b/src/net/sourceforge/plantuml/BlockUmlBuilder.java index 69936a6a8..acc854c83 100644 --- a/src/net/sourceforge/plantuml/BlockUmlBuilder.java +++ b/src/net/sourceforge/plantuml/BlockUmlBuilder.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.FileWithSuffix; import net.sourceforge.plantuml.preproc.ImportedFiles; @@ -66,7 +65,6 @@ public final class BlockUmlBuilder implements DefinitionsContainer { private final Defines defines; private final ImportedFiles importedFiles; private final Charset charset; - private final ThemeStyle style; /** * @deprecated being kept for backwards compatibility, perhaps other projects @@ -75,7 +73,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer { @Deprecated public BlockUmlBuilder(List config, String charset, Defines defines, Reader readerInit, SFile newCurrentDir, String desc) throws IOException { - this(ThemeStyle.LIGHT_REGULAR, config, charsetOrDefault(charset), defines, readerInit, newCurrentDir, desc); + this(config, charsetOrDefault(charset), defines, readerInit, newCurrentDir, desc); } /** @@ -87,10 +85,9 @@ public final class BlockUmlBuilder implements DefinitionsContainer { this(config, charset, defines, reader, null, null); } - public BlockUmlBuilder(ThemeStyle style, List config, Charset charset, Defines defines, Reader readerInit, - SFile newCurrentDir, String desc) throws IOException { + public BlockUmlBuilder(List config, Charset charset, Defines defines, Reader readerInit, SFile newCurrentDir, + String desc) throws IOException { - this.style = style; this.defines = defines; this.charset = requireNonNull(charset); this.reader = new UncommentReadLine(ReadLineReader.create(readerInit, desc)); @@ -138,7 +135,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer { if (paused) current.add(s); - final BlockUml uml = new BlockUml(style, current, defines.cloneMe(), null, this, charset); + final BlockUml uml = new BlockUml(current, defines.cloneMe(), null, this, charset); usedFiles.addAll(uml.getIncluded()); blocks.add(uml); current = null; diff --git a/src/net/sourceforge/plantuml/EmbeddedDiagram.java b/src/net/sourceforge/plantuml/EmbeddedDiagram.java index eca160417..87c29fe14 100644 --- a/src/net/sourceforge/plantuml/EmbeddedDiagram.java +++ b/src/net/sourceforge/plantuml/EmbeddedDiagram.java @@ -137,8 +137,7 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom { } private Diagram getSystem() throws IOException, InterruptedException { - final BlockUml blockUml = new BlockUml(skinParam.getThemeStyle(), as2, Defines.createEmpty(), skinParam, null, - null); + final BlockUml blockUml = new BlockUml(as2, Defines.createEmpty(), skinParam, null, null); return blockUml.getDiagram(); } diff --git a/src/net/sourceforge/plantuml/EmptyImageBuilder.java b/src/net/sourceforge/plantuml/EmptyImageBuilder.java index 7eea9a260..d394bfd82 100644 --- a/src/net/sourceforge/plantuml/EmptyImageBuilder.java +++ b/src/net/sourceforge/plantuml/EmptyImageBuilder.java @@ -48,7 +48,7 @@ import java.util.List; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UAntiAliasing; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColors; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; @@ -170,7 +170,7 @@ public class EmptyImageBuilder { public UGraphicG2d getUGraphicG2d() { final HColor back = HColors.simple(background); - final UGraphicG2d result = new UGraphicG2d(back, new ColorMapperIdentity(), stringBounder, g2d, 1.0); + final UGraphicG2d result = new UGraphicG2d(back, ColorMapper.IDENTITY, stringBounder, g2d, 1.0); result.setBufferedImage(im); return result; } diff --git a/src/net/sourceforge/plantuml/FileFormatOption.java b/src/net/sourceforge/plantuml/FileFormatOption.java index 11b5712b2..0092c1e08 100644 --- a/src/net/sourceforge/plantuml/FileFormatOption.java +++ b/src/net/sourceforge/plantuml/FileFormatOption.java @@ -40,8 +40,8 @@ import java.io.Serializable; import java.util.Objects; import net.sourceforge.plantuml.annotation.HaxeIgnored; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; /** * A FileFormat with some parameters. @@ -61,7 +61,7 @@ public final class FileFormatOption implements Serializable { private final double scale; private final String preserveAspectRatio; private final String watermark; - private final ThemeStyle style; + private final ColorMapper colorMapper; public double getScaleCoef() { return scale; @@ -69,17 +69,19 @@ public final class FileFormatOption implements Serializable { @HaxeIgnored public FileFormatOption(FileFormat fileFormat) { - this(fileFormat, true, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, ThemeStyle.LIGHT_REGULAR); + this(fileFormat, true, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, + ColorMapper.IDENTITY); } @HaxeIgnored public FileFormatOption(FileFormat fileFormat, boolean withMetadata) { - this(fileFormat, withMetadata, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, ThemeStyle.LIGHT_REGULAR); + this(fileFormat, withMetadata, false, null, false, null, TikzFontDistortion.getDefault(), 1.0, null, null, + ColorMapper.IDENTITY); } private FileFormatOption(FileFormat fileFormat, boolean withMetadata, boolean useRedForError, String svgLinkTarget, boolean debugsvek, String hoverColor, TikzFontDistortion tikzFontDistortion, double scale, - String preserveAspectRatio, String watermark, ThemeStyle style) { + String preserveAspectRatio, String watermark, ColorMapper colorMapper) { this.hoverColor = hoverColor; this.watermark = watermark; this.fileFormat = fileFormat; @@ -90,7 +92,7 @@ public final class FileFormatOption implements Serializable { this.tikzFontDistortion = Objects.requireNonNull(tikzFontDistortion); this.scale = scale; this.preserveAspectRatio = preserveAspectRatio; - this.style = style; + this.colorMapper = colorMapper; } public StringBounder getDefaultStringBounder(SvgCharSizeHack charSizeHack) { @@ -111,42 +113,42 @@ public final class FileFormatOption implements Serializable { public FileFormatOption withUseRedForError() { return new FileFormatOption(fileFormat, withMetadata, true, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withTikzFontDistortion(TikzFontDistortion tikzFontDistortion) { return new FileFormatOption(fileFormat, withMetadata, true, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withSvgLinkTarget(String svgLinkTarget) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withPreserveAspectRatio(String preserveAspectRatio) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withHoverColor(String hoverColor) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withScale(double scale) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } public FileFormatOption withWartermark(String watermark) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } - public FileFormatOption withStyle(ThemeStyle style) { + public FileFormatOption withColorMapper(ColorMapper colorMapper) { return new FileFormatOption(fileFormat, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor, - tikzFontDistortion, scale, preserveAspectRatio, watermark, style); + tikzFontDistortion, scale, preserveAspectRatio, watermark, colorMapper); } @Override @@ -193,8 +195,8 @@ public final class FileFormatOption implements Serializable { return watermark; } - public ThemeStyle getStyle() { - return style; + public ColorMapper getColorMapper() { + return colorMapper; } } diff --git a/src/net/sourceforge/plantuml/ISkinParam.java b/src/net/sourceforge/plantuml/ISkinParam.java index f3736ff56..cc8f2e5fd 100644 --- a/src/net/sourceforge/plantuml/ISkinParam.java +++ b/src/net/sourceforge/plantuml/ISkinParam.java @@ -190,7 +190,4 @@ public interface ISkinParam extends ISkinSimple { public void setSvgSize(String origin, String sizeToUse); public LengthAdjust getlengthAdjust(); - - // public void assumeTransparent(ThemeStyle style); - } diff --git a/src/net/sourceforge/plantuml/ISkinSimple.java b/src/net/sourceforge/plantuml/ISkinSimple.java index 97c8333c9..42818233e 100644 --- a/src/net/sourceforge/plantuml/ISkinSimple.java +++ b/src/net/sourceforge/plantuml/ISkinSimple.java @@ -37,7 +37,6 @@ package net.sourceforge.plantuml; import java.util.Map; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.ugraphic.color.HColorSet; public interface ISkinSimple extends SpriteContainer { @@ -61,7 +60,5 @@ public interface ISkinSimple extends SpriteContainer { public void copyAllFrom(ISkinSimple other); public double minClassWidth(); - - public ThemeStyle getThemeStyle(); } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index 80f1747e9..ed86ac724 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -43,7 +43,6 @@ import net.sourceforge.plantuml.acearth.PSystemXearthFactory; import net.sourceforge.plantuml.activitydiagram.ActivityDiagramFactory; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagramFactory3; import net.sourceforge.plantuml.api.PSystemFactory; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.board.BoardDiagramFactory; import net.sourceforge.plantuml.bpm.BpmDiagramFactory; import net.sourceforge.plantuml.classdiagram.ClassDiagramFactory; @@ -106,8 +105,7 @@ public class PSystemBuilder { public static final long startTime = System.currentTimeMillis(); - final public Diagram createPSystem(ThemeStyle style, ISkinSimple skinParam, List source, - List rawSource) { + final public Diagram createPSystem(ISkinSimple skinParam, List source, List rawSource) { final long now = System.currentTimeMillis(); @@ -133,7 +131,7 @@ public class PSystemBuilder { if (diagramType != systemFactory.getDiagramType()) continue; - final Diagram sys = systemFactory.createSystem(style, umlSource, skinParam); + final Diagram sys = systemFactory.createSystem(umlSource, skinParam); if (isOk(sys)) { result = sys; return sys; diff --git a/src/net/sourceforge/plantuml/SkinParam.java b/src/net/sourceforge/plantuml/SkinParam.java index 0a14330e6..f80682155 100644 --- a/src/net/sourceforge/plantuml/SkinParam.java +++ b/src/net/sourceforge/plantuml/SkinParam.java @@ -52,7 +52,6 @@ import java.util.Set; import java.util.TreeSet; import java.util.regex.Pattern; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; @@ -81,11 +80,6 @@ import net.sourceforge.plantuml.svg.LengthAdjust; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperForceDark; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperLightnessInverse; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperMonochrome; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperReverse; import net.sourceforge.plantuml.ugraphic.color.ColorOrder; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -100,11 +94,8 @@ public class SkinParam implements ISkinParam { // private String skin = "debug.skin"; private String skin = "plantuml.skin"; private StyleBuilder styleBuilder; - // private ThemeStyle themeStyle = ThemeStyle.LIGHT_REGULAR; - private final ThemeStyle themeStyle; - private SkinParam(UmlDiagramType type, ThemeStyle style) { - this.themeStyle = style; + private SkinParam(UmlDiagramType type) { this.type = type; } @@ -195,12 +186,12 @@ public class SkinParam implements ISkinParam { paramsPendingForStyleMigration.clear(); } - public static SkinParam create(UmlDiagramType type, ThemeStyle style) { - return new SkinParam(type, style); + public static SkinParam create(UmlDiagramType type) { + return new SkinParam(type); } - public static SkinParam noShadowing(UmlDiagramType type, ThemeStyle style) { - final SkinParam result = new SkinParam(type, style); + public static SkinParam noShadowing(UmlDiagramType type) { + final SkinParam result = new SkinParam(type); result.setParam("shadowing", "false"); return result; } @@ -218,7 +209,8 @@ public class SkinParam implements ISkinParam { private static final Pattern patternCleanUnderscoreDot = Pattern.compile("_|\\."); private static final Pattern patternCleanSequence = Pattern.compile("sequence(participant|actor)"); - private static final Pattern patternCleanArrow = Pattern.compile("(activity|class|component|object|sequence|state|usecase)arrow"); + private static final Pattern patternCleanArrow = Pattern + .compile("(activity|class|component|object|sequence|state|usecase)arrow"); private static final Pattern patternCleanAlign = Pattern.compile("align$"); List cleanForKeySlow(String key) { @@ -297,8 +289,8 @@ public class SkinParam implements ISkinParam { checkStereotype(stereotype); for (String s : stereotype.getMultipleLabels()) { final String value2 = getValue(param.name() + "color" + "<<" + s + ">>"); - if (value2 != null && getIHtmlColorSet().getColorOrWhite(themeStyle, value2) != null) - return getIHtmlColorSet().getColorOrWhite(themeStyle, value2); + if (value2 != null && getIHtmlColorSet().getColorOrWhite(value2) != null) + return getIHtmlColorSet().getColorOrWhite(value2); } } @@ -311,11 +303,11 @@ public class SkinParam implements ISkinParam { return HColors.transparent(); if (param == ColorParam.background) - return getIHtmlColorSet().getColorOrWhite(themeStyle, value); + return getIHtmlColorSet().getColorOrWhite(value); assert param != ColorParam.background; - return getIHtmlColorSet().getColorOrWhite(themeStyle, value); + return getIHtmlColorSet().getColorOrWhite(value); } public char getCircledCharacter(Stereotype stereotype) { @@ -332,14 +324,14 @@ public class SkinParam implements ISkinParam { checkStereotype(stereotype); final String value2 = getValue(param.name() + "color" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); if (value2 != null) - return new Colors(themeStyle, value2, getIHtmlColorSet(), param.getColorType()); + return new Colors(value2, getIHtmlColorSet(), param.getColorType()); } final String value = getValue(getParamName(param, false)); if (value == null) return Colors.empty(); - return new Colors(themeStyle, value, getIHtmlColorSet(), param.getColorType()); + return new Colors(value, getIHtmlColorSet(), param.getColorType()); } private String getParamName(ColorParam param, boolean clickable) { @@ -421,7 +413,7 @@ public class SkinParam implements ISkinParam { if (value == null) return null; - return getIHtmlColorSet().getColorOrWhite(themeStyle, value); + return getIHtmlColorSet().getColorOrWhite(value); } private String getFirstValueNonNullWithSuffix(String suffix, FontParam... param) { @@ -669,28 +661,28 @@ public class SkinParam implements ISkinParam { } public ColorMapper getColorMapper() { - if (themeStyle == ThemeStyle.DARK) - return new ColorMapperForceDark(); + if ("dark".equalsIgnoreCase(getValue("mode"))) + return ColorMapper.FORCE_DARK; final String monochrome = getValue("monochrome"); if ("true".equals(monochrome)) - return new ColorMapperMonochrome(false); + return ColorMapper.MONOCHROME; if ("reverse".equals(monochrome)) - return new ColorMapperMonochrome(true); + return ColorMapper.MONOCHROME_REVERSE; final String value = getValue("reversecolor"); if (value == null) - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; if ("dark".equalsIgnoreCase(value)) - return new ColorMapperLightnessInverse(); + return ColorMapper.LIGTHNESS_INVERSE; final ColorOrder order = ColorOrder.fromString(value); if (order == null) - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; - return new ColorMapperReverse(order); + return ColorMapper.reverse(order); } public boolean shadowing(Stereotype stereotype) { @@ -1005,8 +997,8 @@ public class SkinParam implements ISkinParam { public SplitParam getSplitParam() { final String border = getValue("pageBorderColor"); final String external = getValue("pageExternalColor"); - final HColor borderColor = border == null ? null : getIHtmlColorSet().getColorOrWhite(themeStyle, border); - final HColor externalColor = external == null ? null : getIHtmlColorSet().getColorOrWhite(themeStyle, external); + final HColor borderColor = border == null ? null : getIHtmlColorSet().getColorOrWhite(border); + final HColor externalColor = external == null ? null : getIHtmlColorSet().getColorOrWhite(external); int margin = getAsInt("pageMargin", 0); return new SplitParam(borderColor, externalColor, margin); } @@ -1031,7 +1023,7 @@ public class SkinParam implements ISkinParam { if (value == null) return null; - return getIHtmlColorSet().getColorOrWhite(themeStyle, value); + return getIHtmlColorSet().getColorOrWhite(value); } public double getPadding() { @@ -1101,9 +1093,8 @@ public class SkinParam implements ISkinParam { if (padding == 0 && margin == 0 && borderColor == null && backgroundColor == null) return Padder.NONE; - final HColor border = borderColor == null ? null : getIHtmlColorSet().getColorOrWhite(themeStyle, borderColor); - final HColor background = backgroundColor == null ? null - : getIHtmlColorSet().getColorOrWhite(themeStyle, backgroundColor); + final HColor border = borderColor == null ? null : getIHtmlColorSet().getColorOrWhite(borderColor); + final HColor background = backgroundColor == null ? null : getIHtmlColorSet().getColorOrWhite(backgroundColor); final double roundCorner = getRoundCorner(CornerParam.DEFAULT, null); return Padder.NONE.withMargin(margin).withPadding(padding).withBackgroundColor(background) .withBorderColor(border).withRoundCorner(roundCorner); @@ -1146,12 +1137,4 @@ public class SkinParam implements ISkinParam { return LengthAdjust.defaultValue(); } -// public void assumeTransparent(ThemeStyle style) { -// this.themeStyle = style; -// } - - public ThemeStyle getThemeStyle() { - return themeStyle; - } - } diff --git a/src/net/sourceforge/plantuml/SkinParamDelegator.java b/src/net/sourceforge/plantuml/SkinParamDelegator.java index e8d0bd79a..b6a064c0c 100644 --- a/src/net/sourceforge/plantuml/SkinParamDelegator.java +++ b/src/net/sourceforge/plantuml/SkinParamDelegator.java @@ -38,7 +38,6 @@ package net.sourceforge.plantuml; import java.util.Collection; import java.util.Map; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; @@ -450,14 +449,4 @@ public class SkinParamDelegator implements ISkinParam { return skinParam.getlengthAdjust(); } -// @Override -// public void assumeTransparent(ThemeStyle style) { -// skinParam.assumeTransparent(style); -// } - - @Override - public ThemeStyle getThemeStyle() { - return skinParam.getThemeStyle(); - } - } diff --git a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java index 53efb184d..82459c229 100644 --- a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java +++ b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java @@ -85,8 +85,8 @@ public abstract class SourceFileReaderAbstract implements ISourceFileReader { this.file = file; this.fileFormatOption = fileFormatOption; - this.builder = new BlockUmlBuilder(fileFormatOption.getStyle(), config, charset, defines, getReader(charset), - SFile.fromFile(file.getAbsoluteFile().getParentFile()), FileWithSuffix.getFileName(file)); + this.builder = new BlockUmlBuilder(config, charset, defines, getReader(charset), SFile.fromFile(file.getAbsoluteFile().getParentFile()), + FileWithSuffix.getFileName(file)); } public void setCheckMetadata(boolean checkMetadata) { diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java index c3d1f0b56..50e4d331d 100644 --- a/src/net/sourceforge/plantuml/SourceStringReader.java +++ b/src/net/sourceforge/plantuml/SourceStringReader.java @@ -48,7 +48,6 @@ import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.annotation.HaxeIgnored; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -61,7 +60,6 @@ import net.sourceforge.plantuml.svek.TextBlockBackcolored; public class SourceStringReader { final private List blocks; - final private ThemeStyle style; public SourceStringReader(String source) { this(Defines.createEmpty(), source, Collections.emptyList()); @@ -98,15 +96,9 @@ public class SourceStringReader { public SourceStringReader(Defines defines, String source, Charset charset, List config, SFile newCurrentDir) { - this(defines, source, charset, config, newCurrentDir, ThemeStyle.LIGHT_REGULAR); - } - - public SourceStringReader(Defines defines, String source, Charset charset, List config, SFile newCurrentDir, - ThemeStyle style) { - this.style = style; try { - final BlockUmlBuilder builder = new BlockUmlBuilder(style, config, charset, defines, - new StringReader(source), newCurrentDir, "string"); + final BlockUmlBuilder builder = new BlockUmlBuilder(config, charset, defines, new StringReader(source), + newCurrentDir, "string"); this.blocks = builder.getBlockUmls(); } catch (IOException e) { Log.error("error " + e); @@ -136,11 +128,11 @@ public class SourceStringReader { @Deprecated public String generateImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { - return outputImage(os, fileFormatOption.withStyle(style)).getDescription(); + return outputImage(os, fileFormatOption).getDescription(); } public DiagramDescription outputImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { - return outputImage(os, 0, fileFormatOption.withStyle(style)); + return outputImage(os, 0, fileFormatOption); } @Deprecated @@ -154,12 +146,12 @@ public class SourceStringReader { @Deprecated public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { - return outputImage(os, numImage, fileFormatOption.withStyle(style)).getDescription(); + return outputImage(os, numImage, fileFormatOption).getDescription(); } public DiagramDescription outputImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { - fileFormatOption = fileFormatOption.withStyle(style); + fileFormatOption = fileFormatOption; if (blocks.size() == 0) { noStartumlFound(os, fileFormatOption); return null; @@ -184,7 +176,7 @@ public class SourceStringReader { } public DiagramDescription generateDiagramDescription(int numImage, FileFormatOption fileFormatOption) { - fileFormatOption = fileFormatOption.withStyle(style); + fileFormatOption = fileFormatOption; if (blocks.size() == 0) { return null; } @@ -211,15 +203,15 @@ public class SourceStringReader { } public DiagramDescription generateDiagramDescription(FileFormatOption fileFormatOption) { - return generateDiagramDescription(0, fileFormatOption.withStyle(style)); + return generateDiagramDescription(0, fileFormatOption); } public DiagramDescription generateDiagramDescription(int numImage) { - return generateDiagramDescription(numImage, new FileFormatOption(FileFormat.PNG).withStyle(style)); + return generateDiagramDescription(numImage, new FileFormatOption(FileFormat.PNG)); } public String getCMapData(int numImage, FileFormatOption fileFormatOption) throws IOException { - fileFormatOption = fileFormatOption.withStyle(style); + fileFormatOption = fileFormatOption; if (blocks.size() == 0) { return null; } @@ -240,7 +232,7 @@ public class SourceStringReader { } public ImageData noStartumlFound(OutputStream os, FileFormatOption fileFormatOption) throws IOException { - fileFormatOption = fileFormatOption.withStyle(style); + fileFormatOption = fileFormatOption; final TextBlockBackcolored error = GraphicStrings.createForError(Arrays.asList("No @startuml/@enduml found"), fileFormatOption.isUseRedForError()); diff --git a/src/net/sourceforge/plantuml/SplitParam.java b/src/net/sourceforge/plantuml/SplitParam.java index 6b8366204..623eeb199 100644 --- a/src/net/sourceforge/plantuml/SplitParam.java +++ b/src/net/sourceforge/plantuml/SplitParam.java @@ -71,14 +71,14 @@ public class SplitParam { if (borderColor == null) return null; - return ((HColorSimple) borderColor).getColor999(); + return ((HColorSimple) borderColor).getAwtColor(); } public Color getExternalColor() { if (externalColor == null) return null; - return ((HColorSimple) externalColor).getColor999(); + return ((HColorSimple) externalColor).getAwtColor(); } } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/SpriteContainer.java b/src/net/sourceforge/plantuml/SpriteContainer.java index 977fa05d1..1044add16 100644 --- a/src/net/sourceforge/plantuml/SpriteContainer.java +++ b/src/net/sourceforge/plantuml/SpriteContainer.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; @@ -45,8 +44,6 @@ public interface SpriteContainer extends SvgCharSizeHack { public Guillemet guillemet(); - public ThemeStyle getThemeStyle(); - public ColorMapper getColorMapper(); } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/SpriteContainerEmpty.java b/src/net/sourceforge/plantuml/SpriteContainerEmpty.java index 610fa5435..fea39e1a5 100644 --- a/src/net/sourceforge/plantuml/SpriteContainerEmpty.java +++ b/src/net/sourceforge/plantuml/SpriteContainerEmpty.java @@ -37,12 +37,10 @@ package net.sourceforge.plantuml; import java.util.Map; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.creole.Parser; import net.sourceforge.plantuml.sprite.Sprite; import net.sourceforge.plantuml.sprite.SpriteImage; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColorSet; public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple { @@ -84,7 +82,7 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple { } public ColorMapper getColorMapper() { - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; } public void copyAllFrom(ISkinSimple other) { @@ -103,8 +101,4 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple { return s; } - public ThemeStyle getThemeStyle() { - return ThemeStyle.LIGHT_REGULAR; - } - } \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/TitledDiagram.java b/src/net/sourceforge/plantuml/TitledDiagram.java index 9838ccec9..6c36202c3 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -41,7 +41,6 @@ import java.io.InputStream; import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.anim.AnimationDecoder; import net.sourceforge.plantuml.api.ApiStable; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.UmlSource; @@ -87,10 +86,10 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, return pragma; } - public TitledDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) { + public TitledDiagram(UmlSource source, UmlDiagramType type, ISkinSimple orig) { super(source); this.type = type; - this.skinParam = SkinParam.create(type, style); + this.skinParam = SkinParam.create(type); if (orig != null) this.skinParam.copyAllFrom(orig); @@ -272,8 +271,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, 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()); + HColor backgroundColor = style.value(PName.BackGroundColor).asColor(this.getSkinParam().getIHtmlColorSet()); if (backgroundColor == null) backgroundColor = HColors.transparent(); diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java index 33e346632..0d6bd5ebe 100644 --- a/src/net/sourceforge/plantuml/UmlDiagram.java +++ b/src/net/sourceforge/plantuml/UmlDiagram.java @@ -51,7 +51,6 @@ import java.io.PrintWriter; import java.util.List; import net.sourceforge.plantuml.api.ImageDataSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; @@ -92,8 +91,8 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot // super(style, source, type); // } - public UmlDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) { - super(style, source, type, orig); + public UmlDiagram(UmlSource source, UmlDiagramType type, ISkinSimple orig) { + super(source, type, orig); } final public int getMinwidth() { diff --git a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java index a783eabe5..6e25e5bf9 100644 --- a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java +++ b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java @@ -41,7 +41,6 @@ import java.util.List; import java.util.Map; import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; @@ -57,7 +56,7 @@ public class PSystemXearthFactory extends PSystemBasicFactory { private int height; @Override - public PSystemXearth initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemXearth initDiagram(UmlSource source, String startLine) { this.width = 512; this.height = 512; this.config.clear(); @@ -76,7 +75,7 @@ public class PSystemXearthFactory extends PSystemBasicFactory { } @Override - public PSystemXearth executeLine(ThemeStyle style, UmlSource source, PSystemXearth system, String line) { + public PSystemXearth executeLine(UmlSource source, PSystemXearth system, String line) { if (system == null && line.startsWith("xearth")) { extractDimension(line); system = new PSystemXearth(source, width, height, config, markers); diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java index c267c9e12..5519bb6e1 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java @@ -42,7 +42,6 @@ import java.util.Objects; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Code; @@ -62,8 +61,8 @@ public class ActivityDiagram extends CucaDiagram { private IEntity lastEntityBrancheConsulted; private ConditionalContext currentContext; - public ActivityDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.ACTIVITY, skinParam); + public ActivityDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.ACTIVITY, skinParam); setNamespaceSeparator(null); } diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java index 2647ae6ff..1b9b723e0 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java @@ -46,7 +46,6 @@ import net.sourceforge.plantuml.activitydiagram.command.CommandIf; import net.sourceforge.plantuml.activitydiagram.command.CommandLinkActivity; import net.sourceforge.plantuml.activitydiagram.command.CommandLinkLongActivity; import net.sourceforge.plantuml.activitydiagram.command.CommandPartition; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandFootboxIgnored; @@ -60,8 +59,8 @@ import net.sourceforge.plantuml.core.UmlSource; public class ActivityDiagramFactory extends PSystemCommandFactory { @Override - public ActivityDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new ActivityDiagram(style, source, skinParam); + public ActivityDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new ActivityDiagram(source, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java index b363944b2..776ab3bfb 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java @@ -135,7 +135,7 @@ public class CommandIf extends SingleLineCommand2 { } - link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0)); + link.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); diagram.addLink(link); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java index 3b451e1d4..7aebbd1f2 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java @@ -135,7 +135,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { if (arg.get("BACKCOLOR", 0) != null) { String s = arg.get("BACKCOLOR", 0); entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } final IEntity entity2 = getEntity(diagram, arg, false); @@ -145,7 +145,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { if (arg.get("BACKCOLOR2", 0) != null) { String s = arg.get("BACKCOLOR2", 0); entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } if (arg.get("STEREOTYPE2", 0) != null) entity2.setStereotype(Stereotype.build(arg.get("STEREOTYPE2", 0))); @@ -180,7 +180,7 @@ public class CommandLinkActivity extends SingleLineCommand2 { link.setUrl(urlLink); } - link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0)); + link.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); diagram.addLink(link); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java index fb8fdfa88..89581d73e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java @@ -131,7 +131,7 @@ public class CommandLinkLongActivity extends CommandMultilines2 final String stringColor = line0.get("BACKCOLOR", 0); if (stringColor != null) { entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet() - .getColor(diagram.getSkinParam().getThemeStyle(), stringColor)); + .getColor(stringColor)); } final StringBuilder sb = new StringBuilder(); @@ -199,7 +199,7 @@ public class CommandLinkLongActivity extends CommandMultilines2 if (lineLast.get(4) != null) { String s = lineLast.get(4); entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } final String arrowBody1 = CommandLinkClass.notNull(line0.get("ARROW_BODY1", 0)); @@ -228,7 +228,7 @@ public class CommandLinkLongActivity extends CommandMultilines2 link.setUrl(urlLink); } - link.applyStyle(diagram.getSkinParam().getThemeStyle(), line0.getLazzy("ARROW_STYLE", 0)); + link.applyStyle(line0.getLazzy("ARROW_STYLE", 0)); diagram.addLink(link); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java index 7b178c9df..13d37b66e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java +++ b/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java @@ -95,8 +95,7 @@ public class CommandPartition extends SingleLineCommand2 { NamespaceStrategy.SINGLE); final IEntity p = diagram.getCurrentGroup(); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); if (colors.isEmpty() == false) { p.setColors(colors); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java index 708126ea4..14c5fa470 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java @@ -46,7 +46,6 @@ import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -75,8 +74,8 @@ public class ActivityDiagram3 extends UmlDiagram { private final Swimlanes swinlanes = new Swimlanes(getSkinParam(), getPragma()); - public ActivityDiagram3(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.ACTIVITY, skinParam); + public ActivityDiagram3(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.ACTIVITY, skinParam); } private void manageSwimlaneStrategy() { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java index d77578643..7fab4e167 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java @@ -60,7 +60,6 @@ import net.sourceforge.plantuml.activitydiagram3.command.CommandFork3; import net.sourceforge.plantuml.activitydiagram3.command.CommandForkAgain3; import net.sourceforge.plantuml.activitydiagram3.command.CommandForkEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandGoto; -import net.sourceforge.plantuml.activitydiagram3.command.CommandGroup3; import net.sourceforge.plantuml.activitydiagram3.command.CommandGroupEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandIf2; import net.sourceforge.plantuml.activitydiagram3.command.CommandIf4; @@ -84,7 +83,6 @@ import net.sourceforge.plantuml.activitydiagram3.command.CommandSwimlane2; import net.sourceforge.plantuml.activitydiagram3.command.CommandSwitch; import net.sourceforge.plantuml.activitydiagram3.command.CommandWhile3; import net.sourceforge.plantuml.activitydiagram3.command.CommandWhileEnd3; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandDecoratorMultine; import net.sourceforge.plantuml.command.CommandFootboxIgnored; @@ -105,7 +103,7 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory { cmds.add(new CommandSwimlane2()); cmds.add(new CommandPartition3()); cmds.add(new CommandEndPartition3()); - cmds.add(new CommandGroup3()); + // cmds.add(new CommandGroup3()); cmds.add(new CommandGroupEnd3()); cmds.add(new CommandArrow3()); cmds.add(new CommandArrowLong3()); @@ -162,8 +160,8 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory { } @Override - public ActivityDiagram3 createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new ActivityDiagram3(style, source, skinParam); + public ActivityDiagram3 createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new ActivityDiagram3(source, skinParam); } } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java index fd13f44af..f232bebe9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java @@ -100,7 +100,7 @@ public class Branch { final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(styleBuilder); this.color = color == null ? style.value(PName.BackGroundColor).asColor( - styleBuilder.getSkinParam().getThemeStyle(), styleBuilder.getSkinParam().getIHtmlColorSet()) : color; + styleBuilder.getSkinParam().getIHtmlColorSet()) : color; this.list = new InstructionList(swimlane); } @@ -243,8 +243,7 @@ public class Branch { final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); final LineBreakStrategy lineBreak = style.wrapWidth(); - final FontConfiguration fcArrow = style.getFontConfiguration(skinParam().getThemeStyle(), - skinParam().getIHtmlColorSet()); + final FontConfiguration fcArrow = style.getFontConfiguration(skinParam().getIHtmlColorSet()); return display.create0(fcArrow, HorizontalAlignment.LEFT, skinParam(), lineBreak, CreoleMode.SIMPLE_LINE, null, null); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java index 627337ff9..877f464f9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java @@ -113,8 +113,7 @@ public class CommandActivity3 extends SingleLineCommand2 { url = urlBuilder.getUrl(arg.get("URL", 0)); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String stereo = arg.get("STEREO", 0); Stereotype stereotype = null; if (stereo != null) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java index 975b4ac0c..9fa7f9a9c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java @@ -77,8 +77,7 @@ public class CommandActivityLong3 extends CommandMultilines2 { protected CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) throws NoSuchColorException { lines = lines.removeEmptyColumns(); final RegexResult line0 = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString()); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), line0, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); final BoxStyle style = BoxStyle.fromChar(lines.getLastChar()); lines = lines.removeStartingAndEnding(line0.get("DATA", 0), 1); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java index 6c619908f..265be11b3 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java @@ -66,7 +66,7 @@ public class CommandCircleSpot3 extends SingleLineCommand2 { throws NoSuchColorException { String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); diagram.addSpot(arg.get("SPOT", 0), color); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseIf2.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseIf2.java index 1dfc3b4be..4779560e1 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseIf2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseIf2.java @@ -100,7 +100,7 @@ public class CommandElseIf2 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); if (test.length() == 0) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java deleted file mode 100644 index 42dd47b67..000000000 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java +++ /dev/null @@ -1,70 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2013, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.activitydiagram3.command; - -import net.sourceforge.plantuml.LineLocation; -import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; -import net.sourceforge.plantuml.command.CommandExecutionResult; -import net.sourceforge.plantuml.command.SingleLineCommand2; -import net.sourceforge.plantuml.command.regex.IRegex; -import net.sourceforge.plantuml.command.regex.RegexConcat; -import net.sourceforge.plantuml.command.regex.RegexLeaf; -import net.sourceforge.plantuml.command.regex.RegexResult; -import net.sourceforge.plantuml.cucadiagram.Display; -import net.sourceforge.plantuml.graphic.USymbols; - -public class CommandGroup3 extends SingleLineCommand2 { - - public CommandGroup3() { - super(getRegexConcat()); - } - - static IRegex getRegexConcat() { - return RegexConcat.build(CommandGroup3.class.getName(), RegexLeaf.start(), // - new RegexLeaf("group"), // - RegexLeaf.spaceZeroOrMore(), // - new RegexLeaf("NAME", "(.*)"), // - new RegexLeaf(";?"), // - RegexLeaf.end()); - } - - @Override - protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { - diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null, USymbols.FRAME, 0); - return CommandExecutionResult.ok(); - } - -} diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java index aa146b53d..4ab1dddf9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java @@ -83,7 +83,7 @@ public class CommandIf2 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); if (test.length() == 0) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java index fefb88201..06b539a31 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java @@ -80,7 +80,7 @@ public class CommandIf4 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); if (test.length() == 0) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLink3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLink3.java index fc84d8f60..40467d0ce 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLink3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLink3.java @@ -67,7 +67,7 @@ public class CommandLink3 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (color != null) { diagram.setColorNextArrow(Rainbow.fromColor(color, null)); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNote3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNote3.java index b3014b912..6d5b17901 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNote3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNote3.java @@ -78,8 +78,7 @@ public class CommandNote3 extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) throws NoSuchColorException { - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final Display note = Display.getWithNewlines(arg.get("NOTE", 0)); final NotePosition position = NotePosition.defaultLeft(arg.get("POSITION", 0)); final NoteType type = NoteType.defaultType(arg.get("TYPE", 0)); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java index 2129d2936..c1b9f3275 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java @@ -78,8 +78,7 @@ public class CommandNoteLong3 extends CommandMultilines2 { final NotePosition position = NotePosition.defaultLeft(line0.get("POSITION", 0)); final NoteType type = NoteType.defaultType(line0.get("TYPE", 0)); final Display note = lines.toDisplay(); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), line0, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); return diagram.addNote(note, position, type, colors); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java index 4fa50891c..be80ce705 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java @@ -38,6 +38,7 @@ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.IRegex; @@ -68,13 +69,13 @@ public class CommandPartition3 extends SingleLineCommand2 { static IRegex getRegexConcat() { return RegexConcat.build(CommandPartition3.class.getName(), RegexLeaf.start(), // - new RegexLeaf("TYPE", "(partition|package|rectangle|card)"), // + new RegexLeaf("TYPE", "(partition|package|rectangle|card|group)"), // RegexLeaf.spaceOneOrMore(), // new RegexOptional(// new RegexConcat( // color("BACK1").getRegex(), // RegexLeaf.spaceOneOrMore())), // - new RegexLeaf("NAME", "([%g][^%g]+[%g]|\\S+)"), // + new RegexLeaf("NAME", "([%g][^%g]+[%g]|.*?)"), // new RegexOptional(// new RegexConcat( // RegexLeaf.spaceOneOrMore(), // @@ -87,8 +88,8 @@ public class CommandPartition3 extends SingleLineCommand2 { } private USymbol getUSymbol(String type) { - if ("card".equalsIgnoreCase(type)) - return USymbols.CARD; + if ("partition".equalsIgnoreCase(type)) + return USymbols.PARTITION; if ("package".equalsIgnoreCase(type)) return USymbols.PACKAGE; @@ -96,27 +97,27 @@ public class CommandPartition3 extends SingleLineCommand2 { if ("rectangle".equalsIgnoreCase(type)) return USymbols.RECTANGLE; - return USymbols.FRAME; + if ("card".equalsIgnoreCase(type)) + return USymbols.CARD; + + if ("group".equalsIgnoreCase(type)) + return USymbols.GROUP; + + throw new IllegalArgumentException(); } private static ColorParser color(String id) { return ColorParser.simpleColor(ColorType.BACK, id); } - private StyleSignatureBasic getDefaultStyleDefinitionPartition(USymbol symbol) { - if (symbol == USymbols.RECTANGLE) - return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.rectangle); - return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition); - } - @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) throws NoSuchColorException { final String partitionTitle = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0)); final String b1 = arg.get("BACK1", 0); - final Colors colors = color(b1 == null ? "BACK2" : "BACK1").getColor(diagram.getSkinParam().getThemeStyle(), - arg, diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color(b1 == null ? "BACK2" : "BACK1").getColor(arg, + diagram.getSkinParam().getIHtmlColorSet()); final USymbol symbol = getUSymbol(arg.get("TYPE", 0)); final String stereo = arg.get("STEREO", 0); @@ -124,14 +125,12 @@ public class CommandPartition3 extends SingleLineCommand2 { // Warning : titleColor unused in FTileGroupW - final Style stylePartition = getDefaultStyleDefinitionPartition(symbol).withTOBECHANGED(stereotype) + final Style stylePartition = FtileGroup.getStyleSignature(symbol).withTOBECHANGED(stereotype) .getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()); - final HColor borderColor = stylePartition.value(PName.LineColor).asColor(diagram.getSkinParam().getThemeStyle(), - diagram.getSkinParam().getIHtmlColorSet()); + final HColor borderColor = stylePartition.value(PName.LineColor).asColor(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 = stylePartition.value(PName.BackGroundColor).asColor(diagram.getSkinParam().getIHtmlColorSet()); final HColor titleColor = HColors.BLUE;// stylePartition.value(PName.FontColor).asColor(diagram.getSkinParam().getIHtmlColorSet()); final double roundCorner = stylePartition.value(PName.RoundCorner).asDouble(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java index 770ffc22a..3df82a139 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java @@ -81,7 +81,7 @@ public class CommandRepeat3 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); final BoxStyle boxStyle; final String styleString = arg.get("STYLE", 0); @@ -90,8 +90,7 @@ public class CommandRepeat3 extends SingleLineCommand2 { } else { boxStyle = BoxStyle.fromChar(styleString.charAt(0)); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String stereo = arg.get("STEREO", 0); if (stereo != null) { final Stereotype stereotype = Stereotype.build(stereo); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane.java index 4b8c9c6d7..efe374dda 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane.java @@ -69,7 +69,7 @@ public class CommandSwimlane extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); final String name = arg.get("SWIMLANE", 0); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.swimlane(name, color, label); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane2.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane2.java index 0e8d3972e..a6174b9e3 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane2.java @@ -77,7 +77,7 @@ public class CommandSwimlane2 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); final String name = arg.get("SWIMLANE", 0); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.swimlane(name, color, label); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwitch.java index d567d03d1..ef65b1a21 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwitch.java @@ -71,7 +71,7 @@ public class CommandSwitch extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); String test = arg.get("TEST", 0); if (test.length() == 0) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhile3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhile3.java index c1080d4ac..f8b4cda4f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhile3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhile3.java @@ -77,7 +77,7 @@ public class CommandWhile3 extends SingleLineCommand2 { throws NoSuchColorException { final String s = arg.get("COLOR", 0); final HColor color = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); diagram.doWhile(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("YES", 0)), color); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java index 6b8344d38..5caf11415 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java @@ -86,13 +86,13 @@ public class FtileFactoryDelegator implements FtileFactory { final LinkRendering linkRendering = tile.getInLinkRendering(); if (linkRendering == null) { final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + return Rainbow.build(style, skinParam().getIHtmlColorSet()); } else { color = linkRendering.getRainbow(); } if (color.size() == 0) { final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - return Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + return Rainbow.build(style, skinParam().getIHtmlColorSet()); } return color; } @@ -103,8 +103,7 @@ public class FtileFactoryDelegator implements FtileFactory { return null; final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), - skinParam().getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getIHtmlColorSet()); return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/LaneDivider.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/LaneDivider.java index 8df923c1b..a17c8d202 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/LaneDivider.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/LaneDivider.java @@ -88,8 +88,7 @@ public class LaneDivider extends AbstractTextBlock { final UShape back = new UEmpty(x1 + x2, 1); ug.draw(back); - final HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final UStroke thickness = getStyle().getStroke(); ug.apply(UTranslate.dx(x1)).apply(thickness).apply(color).draw(ULine.vline(height)); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java index 5ae25a8cd..f05c4f908 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java @@ -255,8 +255,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable private TextBlock getTitle(Swimlane swimlane) { final HorizontalAlignment horizontalAlignment = HorizontalAlignment.LEFT; - final FontConfiguration fontConfiguration = getStyle().getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = getStyle().getFontConfiguration(skinParam.getIHtmlColorSet()); LineBreakStrategy wrap = getWrap(); if (wrap.isAuto()) @@ -327,8 +326,7 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable } private void drawTitlesBackground(UGraphic ug) { - final HColor color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); if (color != null) { final double titleHeight = getTitlesHeight(ug.getStringBounder()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java index a6da13c06..efbf54904 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java @@ -133,8 +133,7 @@ public abstract class AbstractParallelFtilesBuilder { return null; final Style style = getStyleSignatureArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), - skinParam().getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getIHtmlColorSet()); return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java index 9774556ff..ef980f27a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java @@ -69,10 +69,8 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc .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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final UStroke stroke = style.getStroke(); final double shadowing = style.value(PName.Shadowing).asDouble(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java index 4ba7a60e1..36d3bdb4c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java @@ -74,16 +74,12 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator { 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 borderColor = styleDiamond.value(PName.LineColor).asColor(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()); + .asColor(skinParam().getIHtmlColorSet()) : branch0.getColor(); + final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet()); + final FontConfiguration fcTest = styleDiamond.getFontConfiguration(skinParam().getIHtmlColorSet()); + final FontConfiguration fcArrow = styleArrow.getFontConfiguration(skinParam().getIHtmlColorSet()); if (thens.size() > 1) { if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java index 5176462a2..3ee674950 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java @@ -79,16 +79,11 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator { 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 HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); + final HColor diamondColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()); + final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet()); + final FontConfiguration fcDiamond = styleDiamond.getFontConfiguration(skinParam().getIHtmlColorSet()); + final FontConfiguration fcArrow = styleArrow.getFontConfiguration(skinParam().getIHtmlColorSet()); final LinkRendering endRepeatLinkRendering = repeat.getOutLinkRendering(); final Rainbow endRepeatLinkColor = endRepeatLinkRendering == null ? null : endRepeatLinkRendering.getRainbow(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java index b9e5ea0bd..cd164f35e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java @@ -110,7 +110,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { } final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Rainbow arrowColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow arrowColor = Rainbow.build(style, skinParam().getIHtmlColorSet()); if (ftiles.size() == 1) { final FtileSwitchWithOneLink result = new FtileSwitchWithOneLink(ftiles, branches, swimlane, diamond1, @@ -129,12 +129,10 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { 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 FontConfiguration fcDiamond = style.getFontConfiguration(skinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); final HColor backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor) - .asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor(); + .asColor(skinParam().getIHtmlColorSet()) : branch0.getColor(); final TextBlock tbTest; if (Display.isNull(test) || test.isWhite()) @@ -149,10 +147,9 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { private Ftile getDiamond2(Swimlane swimlane, Branch branch0) { final Style style = getDefaultStyleDefinitionDiamond().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(), - skinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); final HColor backColor = branch0.getColor() == null ? style.value(PName.BackGroundColor) - .asColor(skinParam().getThemeStyle(), skinParam().getIHtmlColorSet()) : branch0.getColor(); + .asColor(skinParam().getIHtmlColorSet()) : branch0.getColor(); return new FtileDiamondInside(TextBlockUtils.empty(0, 0), branch0.skinParam(), backColor, borderColor, swimlane); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java index da5a8847f..20bfddbec 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java @@ -76,16 +76,11 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { 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()); + final HColor borderColor = styleDiamond.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); + final HColor backColor = styleDiamond.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()); + final Rainbow arrowColor = Rainbow.build(styleArrow, skinParam().getIHtmlColorSet()); + final FontConfiguration fontArrow = styleArrow.getFontConfiguration(skinParam().getIHtmlColorSet()); + final FontConfiguration fcTest = styleDiamond.getFontConfiguration(skinParam().getIHtmlColorSet()); incoming1 = ensureColor(incoming1, arrowColor); incoming2 = ensureColor(incoming2, arrowColor); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java index 71d3c6039..851ddf868 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java @@ -83,7 +83,12 @@ public class FtileGroup extends AbstractFtile { private final double roundCorner; final public StyleSignatureBasic getStyleSignature() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition); + return getStyleSignature(type); + } + + final static public StyleSignatureBasic getStyleSignature(USymbol symbol) { + return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, symbol.getSName(), + SName.composite); } public FtileGroup(Ftile inner, Display title, HColor backColor, HColor titleColor, ISkinParam skinParam, @@ -94,13 +99,13 @@ public class FtileGroup extends AbstractFtile { this.inner = FtileUtils.addHorizontalMargin(inner, 10); final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); this.backColor = backColor == null - ? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet()) + ? style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()) : backColor; this.borderColor = borderColor == null - ? style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getIHtmlColorSet()) + ? style.value(PName.LineColor).asColor(getIHtmlColorSet()) : borderColor; final UStroke thickness = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java index 6cf5e422d..59badd61a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java @@ -104,9 +104,8 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable this.withOutPoint = withOutPoint; 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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); final LineBreakStrategy wrapWidth = style.wrapWidth(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java index 782bb6bcb..f62f46318 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java @@ -137,10 +137,9 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea 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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); final LineBreakStrategy wrapWidth = style.wrapWidth(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java index 3c5b0048f..c63f6952f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java @@ -109,11 +109,9 @@ public class FtileWithNotes extends AbstractFtile { 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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); final LineBreakStrategy wrapWidth = style.wrapWidth(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java index 4755c1373..eb5b0420a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java @@ -133,7 +133,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { double x = 0; for (Ftile tmp : list99) { final XDimension2D dim = tmp.calculateDimension(getStringBounder()); - final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet()); final Rainbow rainbow = tmp.getInLinkRendering().getRainbow(def); conns.add(new ConnectionIn(black, tmp, x, rainbow)); x += dim.getWidth(); @@ -192,7 +192,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { double x = 0; for (Ftile tmp : list99) { final XDimension2D dim = tmp.calculateDimension(getStringBounder()); - final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet()); final Rainbow rainbow = tmp.getOutLinkRendering().getRainbow(def); if (tmp.calculateDimension(getStringBounder()).hasPointOut()) conns.add(new ConnectionOut(tmp, out, x, rainbow, getJustBeforeBar2(middle, getStringBounder()))); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java index a5d54a7e4..baa379d00 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java @@ -78,7 +78,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { for (Ftile tmp : list99) { final XDimension2D dim = tmp.calculateDimension(getStringBounder()); Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet()); final Rainbow rainbow = tmp.getInLinkRendering().getRainbow(def); conns.add(new ConnectionIn(black, tmp, x, rainbow)); x += dim.getWidth(); @@ -95,10 +95,8 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { protected Ftile doStep2(Ftile inner, Ftile result) { final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); - 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 HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getIHtmlColorSet()); + final HColor backColor = style.value(PName.BackGroundColor).asColor(skinParam().getIHtmlColorSet()); final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2()); result = new FtileAssemblySimple(result, out); @@ -109,7 +107,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { for (Ftile tmp : list99) { final XDimension2D dim = tmp.calculateDimension(getStringBounder()); final UTranslate translate0 = new UTranslate(x, barHeight); - final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow def = Rainbow.build(style, skinParam().getIHtmlColorSet()); final Rainbow rainbow = tmp.getOutLinkRendering().getRainbow(def); if (tmp.calculateDimension(getStringBounder()).hasPointOut()) conns.add(new ConnectionHorizontalThenVertical(tmp, out, rainbow, translate0, diamondTranslate)); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java index 33d1ee690..80d133fb2 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java @@ -78,7 +78,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { Ftile result = inner; final List conns = new ArrayList<>(); final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final Rainbow thinColor = Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle()); + final Rainbow thinColor = Rainbow.build(style, skinParam().getIHtmlColorSet()); final Ftile thin = new FtileThinSplit(skinParam(), getThin1Color(thinColor), list99.get(0).getSwimlaneIn()); double x = 0; @@ -93,7 +93,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { final LinkRendering inLinkRendering = tmp.getInLinkRendering(); final Rainbow rainbow = inLinkRendering - .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle())); + .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet())); conns.add(new ConnectionIn(thin, tmp, x, rainbow)); x += dim.getWidth(); @@ -117,7 +117,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { for (Ftile tmp : list99) { final LinkRendering inLinkRendering = tmp.getInLinkRendering(); final Rainbow rainbow = inLinkRendering - .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle())); + .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet())); if (rainbow.isInvisible() == false) return thinColor.getColor(); @@ -144,7 +144,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { final Style style = getStyleSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); final LinkRendering inLinkRendering = result.getInLinkRendering(); final Rainbow thinColor = inLinkRendering - .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle())); + .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet())); final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlaneOutForStep2()); result = new FtileAssemblySimple(result, out); @@ -164,7 +164,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { final LinkRendering outLinkRendering = tmp.getOutLinkRendering(); final Rainbow rainbow = outLinkRendering - .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet(), skinParam().getThemeStyle())); + .getRainbow(Rainbow.build(style, skinParam().getIHtmlColorSet())); if (tmp.calculateDimension(getStringBounder()).hasPointOut()) conns.add(new ConnectionOut(translate0, tmp, out, x, rainbow, getHeightOfMiddle(inner))); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index 0829fe4da..674b5eece 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -111,16 +111,14 @@ public class VCompactFactory implements FtileFactory { public Ftile start(Swimlane swimlane) { final Style style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); return new FtileCircleStart(skinParam(), color, swimlane, style); } public Ftile stop(Swimlane swimlane) { final Style style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final HColor backgroundColor = skinParam.getBackgroundColor(); return new FtileCircleStop(skinParam(), backgroundColor, borderColor, swimlane, style); } @@ -134,8 +132,7 @@ public class VCompactFactory implements FtileFactory { public Ftile end(Swimlane swimlane) { final Style style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final HColor backgroundColor = skinParam.getBackgroundColor(); return new FtileCircleEnd(skinParam(), backgroundColor, borderColor, swimlane, style); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java index 3dd4b1920..a76b6203b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java @@ -115,8 +115,8 @@ public class ConditionalBuilder { 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.fontTest = styleDiamond.getFontConfiguration(skinParam.getIHtmlColorSet()); + this.fontArrow = styleArrow.getFontConfiguration(skinParam.getIHtmlColorSet()); this.diamondLineBreak = styleDiamond.wrapWidth(); this.labelLineBreak = styleArrow.wrapWidth(); this.borderColor = borderColor; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java index 56eecc11e..0544faa89 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java @@ -101,8 +101,7 @@ public class FtileBlackBlock extends AbstractFtile { final Style style = getSignature().getMergedStyle(skinParam().getCurrentStyleBuilder()); final double shadowing = style.value(PName.Shadowing).asDouble(); rect.setDeltaShadow(shadowing); - final HColor colorBar = style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), - getIHtmlColorSet()); + final HColor colorBar = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); ug.apply(colorBar).apply(colorBar.bg()).draw(rect); final XDimension2D dimLabel = label.calculateDimension(ug.getStringBounder()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java index 7c9877fa7..ec19bc0cf 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java @@ -150,16 +150,16 @@ public class FtileBox extends AbstractFtile { this.swimlane = swimlane; this.inRendering = LinkRendering - .create(Rainbow.build(styleArrow, getIHtmlColorSet(), skinParam.getThemeStyle())); + .create(Rainbow.build(styleArrow, getIHtmlColorSet())); 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()); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.horizontalAlignment = style.getHorizontalAlignment(); this.padding = style.getPadding(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox2.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox2.java index 2e571b247..2df1a94ec 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox2.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox2.java @@ -156,11 +156,11 @@ public class FtileBox2 extends AbstractFtile { this.swimlane = swimlane; 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()); + .create(Rainbow.build(styleArrow, getIHtmlColorSet())); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.horizontalAlignment = style.getHorizontalAlignment(); this.padding = style.getPadding(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBoxOld.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBoxOld.java index 4b8fa41c2..9fb6c25ad 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBoxOld.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBoxOld.java @@ -155,10 +155,10 @@ public class FtileBoxOld extends AbstractFtile { this.swimlane = swimlane; 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()); + .create(Rainbow.build(styleArrow, getIHtmlColorSet())); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.horizontalAlignment = style.getHorizontalAlignment(); // this.padding = style.getPadding(); this.roundCorner = style.value(PName.RoundCorner).asDouble(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java index 07659439f..7876c7f67 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java @@ -74,8 +74,8 @@ public class FtileCircleEnd extends AbstractFtile { this.backColor = backColor; this.swimlane = swimlane; 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()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java index fc73779d8..9d7643aa8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java @@ -100,10 +100,9 @@ public class FtileCircleSpot extends AbstractFtile { final UEllipse circle = new UEllipse(SIZE, SIZE); final HColor backColor = this.backColor == null - ? style.value(PName.BackGroundColor).asColor(skinParam().getThemeStyle(), getIHtmlColorSet()) + ? style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()) : this.backColor; - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam().getThemeStyle(), - getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); final double shadow = style.value(PName.Shadowing).asDouble(); circle.setDeltaShadow(shadow); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java index a2c4bf22c..a292390b5 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java @@ -67,8 +67,8 @@ public class FtileCircleStart extends AbstractFtile { this.backColor = backColor; this.borderColor = HColors.none(); 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()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java index c755e7979..7926624c9 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java @@ -73,8 +73,8 @@ public class FtileCircleStop extends AbstractFtile { this.backColor = backColor; this.swimlane = swimlane; 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()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GAbstractConnection.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GAbstractConnection.java index 687d72427..0fcdde162 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GAbstractConnection.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GAbstractConnection.java @@ -98,7 +98,7 @@ public abstract class GAbstractConnection implements GConnection { final protected Rainbow getInLinkRenderingColor() { final ISkinParam skinParam = gpoint1.getGtile().skinParam(); final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final Rainbow color = Rainbow.build(style, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle()); + final Rainbow color = Rainbow.build(style, skinParam.getIHtmlColorSet()); // final LinkRendering linkRendering = tile.getInLinkRendering(); // if (linkRendering == null) { // if (UseStyle.useBetaStyle()) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileAssembly.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileAssembly.java index b50e67a0e..f16da7dfe 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileAssembly.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileAssembly.java @@ -86,8 +86,7 @@ public class GtileAssembly extends GtileTopDown { return TextBlockUtils.EMPTY_TEXT_BLOCK; final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam().getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getThemeStyle(), - skinParam().getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam().getIHtmlColorSet()); return display.create7(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileBox.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileBox.java index 5d074e70e..154f3578c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileBox.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileBox.java @@ -134,10 +134,10 @@ public class GtileBox extends AbstractGtile { this.boxStyle = boxStyle; 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()); + .create(Rainbow.build(styleArrow, getIHtmlColorSet())); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.horizontalAlignment = style.getHorizontalAlignment(); this.padding = style.getPadding(); this.margin = style.getMargin(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileGroup.java index e7994f3e5..0d0ee1450 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileGroup.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileGroup.java @@ -44,6 +44,7 @@ import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FloatingNote; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; @@ -54,7 +55,6 @@ import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.style.PName; -import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.ugraphic.UGraphic; @@ -77,8 +77,8 @@ public class GtileGroup extends AbstractGtileRoot { private final USymbol type; private final double roundCorner; - final public StyleSignatureBasic getDefaultStyleDefinitionPartition() { - return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.partition); + final public StyleSignatureBasic getStyleSignature() { + return FtileGroup.getStyleSignature(type); } private double suppWidth(StringBounder stringBounder) { @@ -99,9 +99,8 @@ public class GtileGroup extends AbstractGtileRoot { this.inner = inner; this.borderColor = borderColor == null ? HColors.BLACK : borderColor; - final Style style = getDefaultStyleDefinitionPartition().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); + final FontConfiguration fc = style.getFontConfiguration(skinParam.getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); if (title == null) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileHexagonInside.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileHexagonInside.java index b8bf27a47..4c450adf1 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileHexagonInside.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileHexagonInside.java @@ -86,8 +86,8 @@ public class GtileHexagonInside extends AbstractGtile { super(stringBounder, skinParam, swimlane); 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.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); this.label = label; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNoteOpale.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNoteOpale.java index 0958ee4cd..b0138051f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNoteOpale.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNoteOpale.java @@ -108,10 +108,9 @@ public class GtileWithNoteOpale extends AbstractGtile implements Stencil, Stylea 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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); final LineBreakStrategy wrapWidth = style.wrapWidth(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNotes.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNotes.java index 385c00434..0583eca93 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNotes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/GtileWithNotes.java @@ -109,11 +109,9 @@ public class GtileWithNotes extends AbstractGtile { 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 HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); final LineBreakStrategy wrapWidth = style.wrapWidth(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtiles.java b/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtiles.java index 5c930c70f..1d66ff588 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtiles.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/gtile/Gtiles.java @@ -62,13 +62,11 @@ public class Gtiles { StyleSignatureBasic styleSignature, HColor color, Display label) { final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final HColor backColor = color == null - ? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()) + ? style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()) : color; - final FontConfiguration fcTest = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fcTest = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final Sheet sheet = Parser .build(fcTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL) @@ -83,10 +81,9 @@ public class Gtiles { StyleSignatureBasic styleSignature, HColor color) { final Style style = styleSignature.getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final HColor backColor = color == null - ? style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()) + ? style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()) : color; return new GtileHexagonInside(stringBounder, TextBlockUtils.EMPTY_TEXT_BLOCK, skinParam, backColor, borderColor, diff --git a/src/net/sourceforge/plantuml/api/PSystemFactory.java b/src/net/sourceforge/plantuml/api/PSystemFactory.java index 4eb3f1688..3cc474f84 100644 --- a/src/net/sourceforge/plantuml/api/PSystemFactory.java +++ b/src/net/sourceforge/plantuml/api/PSystemFactory.java @@ -42,7 +42,7 @@ import net.sourceforge.plantuml.core.UmlSource; public interface PSystemFactory { - Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam); + Diagram createSystem(UmlSource source, ISkinSimple skinParam); DiagramType getDiagramType(); diff --git a/src/net/sourceforge/plantuml/api/ThemeStyle.java b/src/net/sourceforge/plantuml/api/ThemeStyle.java deleted file mode 100644 index 2210392c7..000000000 --- a/src/net/sourceforge/plantuml/api/ThemeStyle.java +++ /dev/null @@ -1,42 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.api; - -public enum ThemeStyle { - - LIGHT_REGULAR, DARK - -} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/board/BoardDiagram.java b/src/net/sourceforge/plantuml/board/BoardDiagram.java index 2ccabaab4..d9ce8c4d3 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagram.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagram.java @@ -43,7 +43,6 @@ import java.util.List; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -69,8 +68,8 @@ public class BoardDiagram extends UmlDiagram { return new DiagramDescription("Board"); } - public BoardDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.BOARD, null); + public BoardDiagram(UmlSource source) { + super(source, UmlDiagramType.BOARD, null); } @Override diff --git a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java index abec7849f..e511b3089 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -69,8 +68,8 @@ public class BoardDiagramFactory extends PSystemCommandFactory { } @Override - public BoardDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new BoardDiagram(style, source); + public BoardDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new BoardDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java index 68c582592..661eed5d6 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -75,8 +74,8 @@ public class BpmDiagram extends UmlDiagram { return new DiagramDescription("(Bpm Diagram)"); } - public BpmDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.BPM, null); + public BpmDiagram(UmlSource source) { + super(source, UmlDiagramType.BPM, null); } @Override @@ -94,7 +93,7 @@ public class BpmDiagram extends UmlDiagram { private UDrawable getUDrawable() { final Grid grid = createGrid(); cleanGrid(grid); - final GridArray gridArray = grid.toArray(SkinParam.create(getUmlDiagramType(), ThemeStyle.LIGHT_REGULAR)); + final GridArray gridArray = grid.toArray(SkinParam.create(getUmlDiagramType())); // gridArray.addEdges(edges); // System.err.println("gridArray=" + gridArray); return gridArray; diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java b/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java index d65097a98..c0ed61a28 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java @@ -40,7 +40,6 @@ import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.DiagramType; @@ -66,8 +65,8 @@ public class BpmDiagramFactory extends PSystemCommandFactory { } @Override - public AbstractPSystem createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new BpmDiagram(style, source); + public AbstractPSystem createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new BpmDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/braille/BrailleDrawer.java b/src/net/sourceforge/plantuml/braille/BrailleDrawer.java index 587f5e354..917e2ab68 100644 --- a/src/net/sourceforge/plantuml/braille/BrailleDrawer.java +++ b/src/net/sourceforge/plantuml/braille/BrailleDrawer.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.braille; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; @@ -55,7 +54,7 @@ public class BrailleDrawer implements UDrawable { } public void drawU(UGraphic ug) { - ug = ug.apply(HColorSet.instance().getColorOrWhite(ThemeStyle.LIGHT_REGULAR, "#F0F0F0")); + ug = ug.apply(HColorSet.instance().getColorOrWhite("#F0F0F0")); for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) { ug.apply(UTranslate.dx(x * step + spotSize + 1)) .draw(ULine.vline((grid.getMaxY() - grid.getMinY()) * step)); diff --git a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java index 6e22b372d..33a3e03c5 100644 --- a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java @@ -42,15 +42,14 @@ import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; public abstract class AbstractEntityDiagram extends CucaDiagram { - public AbstractEntityDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) { - super(style, source, type, orig); + public AbstractEntityDiagram(UmlSource source, UmlDiagramType type, ISkinSimple orig) { + super(source, type, orig); } final protected List getDotStrings() { diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java index c2cf8cea3..2558e64e4 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java @@ -42,7 +42,6 @@ import java.util.Objects; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.creole.CreoleMode; @@ -62,8 +61,8 @@ import net.sourceforge.plantuml.svek.image.EntityImageClass; public class ClassDiagram extends AbstractClassOrObjectDiagram { - public ClassDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.CLASS, skinParam); + public ClassDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.CLASS, skinParam); } private Code getShortName1972(Code code) { diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java index 6c25d36ef..db41a7844 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java @@ -40,7 +40,6 @@ import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.command.CommandAddMethod; import net.sourceforge.plantuml.classdiagram.command.CommandAllowMixing; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClass; @@ -87,8 +86,8 @@ import net.sourceforge.plantuml.objectdiagram.command.CommandCreateMap; public class ClassDiagramFactory extends PSystemCommandFactory { @Override - public ClassDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new ClassDiagram(style, source, skinParam); + public ClassDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new ClassDiagram(source, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java index f80d844c0..a56655002 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java @@ -174,12 +174,11 @@ public class CommandCreateClass extends SingleLineCommand2 { } entity.setCodeLine(location); - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String s = arg.get("LINECOLOR", 1); final HColor lineColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (lineColor != null) colors = colors.add(ColorType.LINE, lineColor); diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java index 9f9341a91..c17db60de 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java @@ -279,12 +279,11 @@ public class CommandCreateClassMultilines extends CommandMultilines2 final String s = arg.get("COLOR", 0); entity.setSpecificColorTOBEREMOVED(ColorType.BACK, s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java index 13b7ead59..f7b8d481a 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java @@ -252,9 +252,8 @@ final public class CommandLinkClass extends SingleLineCommand2 { final String color = arg.get("COLOR", 0); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), color)); + diagram.getSkinParam().getIHtmlColorSet().getColor(color)); } return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/command/CommandNamespace2.java b/src/net/sourceforge/plantuml/command/CommandNamespace2.java index 4ee6028af..5cd46cfb7 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespace2.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespace2.java @@ -111,7 +111,7 @@ public class CommandNamespace2 extends SingleLineCommand2 { final String color = arg.get("COLOR", 0); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), color)); + diagram.getSkinParam().getIHtmlColorSet().getColor(color)); } return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java index 1fd7f945e..ab148f935 100644 --- a/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java +++ b/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java @@ -105,7 +105,7 @@ public class CommandNamespaceEmpty extends SingleLineCommand2 { final String color = arg.get("COLOR", 0); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), color)); + diagram.getSkinParam().getIHtmlColorSet().getColor(color)); } diagram.endGroup(); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/command/CommandPackage.java b/src/net/sourceforge/plantuml/command/CommandPackage.java index c55c5c215..44b701827 100644 --- a/src/net/sourceforge/plantuml/command/CommandPackage.java +++ b/src/net/sourceforge/plantuml/command/CommandPackage.java @@ -155,8 +155,7 @@ public class CommandPackage extends SingleLineCommand2 { p.addUrl(url); } - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); p.setColors(colors); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java b/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java index 3ba9c5d64..b75c1639e 100644 --- a/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java +++ b/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java @@ -106,7 +106,7 @@ public class CommandPackageEmpty extends SingleLineCommand2 extends PSy this(DiagramType.UML); } - public abstract P executeLine(ThemeStyle style, UmlSource source, P system, String line); + public abstract P executeLine(UmlSource source, P system, String line); - public abstract P initDiagram(ThemeStyle style, UmlSource source, String startLine); + public abstract P initDiagram(UmlSource source, String startLine); private boolean isEmptyLine(StringLocated result) { return result.getTrimmed().getString().length() == 0; } @Override - final public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + final public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { source = source.removeInitialSkinparam(); final IteratorCounter2 it = source.iterator2(); final StringLocated startLine = it.next(); - P system = initDiagram(style, source, startLine.getString()); + P system = initDiagram(source, startLine.getString()); boolean first = true; while (it.hasNext()) { final StringLocated s = it.next(); @@ -87,7 +86,7 @@ public abstract class PSystemBasicFactory

extends PSy } return system; } - system = executeLine(style, source, system, s.getString()); + system = executeLine(source, system, s.getString()); if (system == null) { final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?", 0, s.getLocation()); // return PSystemErrorUtils.buildV1(source, err, null); diff --git a/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java b/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java index 2138049e4..e5b94af29 100644 --- a/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java +++ b/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.StringLocated; import net.sourceforge.plantuml.annotation.HaxeIgnored; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -59,7 +58,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory { protected abstract List createCommands(); - public abstract AbstractPSystem createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam); + public abstract AbstractPSystem createEmptyDiagram(UmlSource source, ISkinSimple skinParam); @HaxeIgnored protected PSystemCommandFactory() { @@ -71,7 +70,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory { } @Override - final public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + final public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { final IteratorCounter2 it = source.iterator2(); final StringLocated startLine = it.next(); if (StartUtils.isArobaseStartDiagram(startLine.getString()) == false) @@ -83,7 +82,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory { return buildEmptyError(source, startLine.getLocation(), it.getTrace()); } - AbstractPSystem sys = createEmptyDiagram(style, source, skinParam); + AbstractPSystem sys = createEmptyDiagram(source, skinParam); while (it.hasNext()) { if (StartUtils.isArobaseEndDiagram(it.peek().getString())) { diff --git a/src/net/sourceforge/plantuml/command/PSystemSingleLineFactory.java b/src/net/sourceforge/plantuml/command/PSystemSingleLineFactory.java index 765e8aeb1..d0c0afacf 100644 --- a/src/net/sourceforge/plantuml/command/PSystemSingleLineFactory.java +++ b/src/net/sourceforge/plantuml/command/PSystemSingleLineFactory.java @@ -41,7 +41,6 @@ import net.sourceforge.plantuml.ErrorUmlType; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.StringLocated; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -58,7 +57,7 @@ public abstract class PSystemSingleLineFactory extends PSystemAbstractFactory { } @Override - final public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + final public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { if (source.getTotalLineCount() != 3) return null; diff --git a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java index afc51bd5c..1f35678e7 100644 --- a/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java +++ b/src/net/sourceforge/plantuml/command/note/CommandFactoryNote.java @@ -140,7 +140,7 @@ public final class CommandFactoryNote implements SingleMultiFactoryCommand { } @Override - public PSystemCreole initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemCreole initDiagram(UmlSource source, String startLine) { if (getDiagramType() == DiagramType.CREOLE) return new PSystemCreole(source); @@ -55,7 +54,7 @@ public class PSystemCreoleFactory extends PSystemBasicFactory { } @Override - public PSystemCreole executeLine(ThemeStyle style, UmlSource source, PSystemCreole system, String line) { + public PSystemCreole executeLine(UmlSource source, PSystemCreole system, String line) { system.doCommandLine(line); return system; } diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java index 9ce3d26de..d400bf21a 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java @@ -276,7 +276,7 @@ public class StripeSimple implements Stripe { col = fontConfiguration.getColor(); else try { - col = skinParam.getIHtmlColorSet().getColor(skinParam.getThemeStyle(), forcedColor); + col = skinParam.getIHtmlColorSet().getColor(forcedColor); } catch (NoSuchColorException e) { col = null; } diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java b/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java index b2ad3c0ee..6654e9712 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java @@ -107,7 +107,7 @@ public class StripeTable implements Stripe { final String[] color = line.substring(idx1, idx2).split(","); if (idx < color.length) { final String s = color[idx]; - return s == null ? null : skinParam.getIHtmlColorSet().getColorOrWhite(skinParam.getThemeStyle(), s); + return s == null ? null : skinParam.getIHtmlColorSet().getColorOrWhite(s); } } return null; diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java index 86f8de84a..be08e9f51 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java @@ -76,7 +76,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi BodyEnhanced1(HorizontalAlignment align, List rawBody, ISkinParam skinParam, ILeaf entity, Style style) { super(align, - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet(), entity.getColors()), + style.getFontConfiguration(skinParam.getIHtmlColorSet(), entity.getColors()), style); this.style = style; this.rawBody2 = Display.create(rawBody); @@ -91,7 +91,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi BodyEnhanced1(HorizontalAlignment align, Display display, ISkinParam skinParam, ILeaf entity, Style style) { super(align, - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet(), entity.getColors()), + style.getFontConfiguration(skinParam.getIHtmlColorSet(), entity.getColors()), style); this.style = style; @@ -166,8 +166,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi title = null; display = null; final List allTree = buildTreeOrTable(s, it); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); TextBlock bloc = Display.create(allTree).create7(fontConfiguration, align, skinParam, CreoleMode.FULL); if (isTable) diff --git a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java index 6abc9997d..e047bf146 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java +++ b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java @@ -54,7 +54,6 @@ import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.api.ImageDataSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; @@ -122,8 +121,8 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return ident; } - public CucaDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) { - super(style, source, type, orig); + public CucaDiagram(UmlSource source, UmlDiagramType type, ISkinSimple orig) { + super(source, type, orig); this.stacks2.add(Ident.empty()); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java index 9a97fbe1b..5a51fa7c0 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java +++ b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java @@ -272,11 +272,10 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlock, }; } final Style style = modifier.getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final boolean isField = modifier.isField(); final HColor backColor = isField ? null - : style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + : style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); final TextBlock uBlock = modifier.getUBlock(skinParam.classAttributeIconSize(), borderColor, backColor, url != null); diff --git a/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java b/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java index 76e276a08..f53a7a2b3 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java +++ b/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java @@ -40,7 +40,6 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UStroke; @@ -115,7 +114,7 @@ public abstract class WithLinkType { return single; } - public void applyStyle(ThemeStyle themeStyle, String arrowStyle) { + public void applyStyle(String arrowStyle) { if (arrowStyle == null) { return; } @@ -123,12 +122,12 @@ public abstract class WithLinkType { int i = 0; while (st.hasMoreTokens()) { final String s = st.nextToken(); - applyOneStyle(themeStyle, s, i); + applyOneStyle(s, i); i++; } } - private void applyOneStyle(ThemeStyle themeStyle, String arrowStyle, int i) { + private void applyOneStyle(String arrowStyle, int i) { final StringTokenizer st = new StringTokenizer(arrowStyle, ","); while (st.hasMoreTokens()) { final String s = st.nextToken(); @@ -149,7 +148,7 @@ public abstract class WithLinkType { } else if (s.startsWith("thickness=")) { this.goThickness(Double.parseDouble(s.substring("thickness=".length()))); } else { - final HColor tmp = HColorSet.instance().getColorOrWhite(themeStyle, s); + final HColor tmp = HColorSet.instance().getColorOrWhite(s); setSpecificColor(tmp, i); } } diff --git a/src/net/sourceforge/plantuml/definition/PSystemDefinitionFactory.java b/src/net/sourceforge/plantuml/definition/PSystemDefinitionFactory.java index b3290047b..2190e7715 100644 --- a/src/net/sourceforge/plantuml/definition/PSystemDefinitionFactory.java +++ b/src/net/sourceforge/plantuml/definition/PSystemDefinitionFactory.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.definition; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -47,7 +46,7 @@ public class PSystemDefinitionFactory extends PSystemBasicFactory } final String s = arg.get("COLOR", 0); entity.setSpecificColorTOBEREMOVED(ColorType.BACK, s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s)); if (type.equalsIgnoreCase("domain")) { if (stereotype != null && stereotype.equalsIgnoreCase("<>")) { type = "machine"; diff --git a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java index fab79f0f6..a10e0515e 100644 --- a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java @@ -40,7 +40,6 @@ import java.util.Objects; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Code; @@ -52,8 +51,8 @@ import net.sourceforge.plantuml.graphic.USymbols; public class DescriptionDiagram extends AbstractEntityDiagram { - public DescriptionDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.DESCRIPTION, skinParam); + public DescriptionDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.DESCRIPTION, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java index 1467e1688..72554d6fa 100644 --- a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java +++ b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2; import net.sourceforge.plantuml.classdiagram.command.CommandNamespaceSeparator; import net.sourceforge.plantuml.classdiagram.command.CommandRemoveRestore; @@ -70,8 +69,8 @@ import net.sourceforge.plantuml.objectdiagram.command.CommandCreateMap; public class DescriptionDiagramFactory extends PSystemCommandFactory { @Override - public DescriptionDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new DescriptionDiagram(style, source, skinParam); + public DescriptionDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new DescriptionDiagram(source, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java index 3baa89a19..84d9a48b6 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java @@ -147,8 +147,7 @@ public class CommandArchimate extends SingleLineCommand2 { diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet())); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); entity.setColors(colors); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java index a47d363be..21ea42a27 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java @@ -124,8 +124,7 @@ public class CommandArchimateMultilines extends CommandMultilines2 { 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)); + link.setColors(color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet())); + link.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); if (arg.get("STEREOTYPE", 0) != null) { final Stereotype stereotype = Stereotype.build(arg.get("STEREOTYPE", 0)); link.setStereotype(stereotype); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandNewpage.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandNewpage.java index cad4360d2..c2ffbf885 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandNewpage.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandNewpage.java @@ -63,8 +63,8 @@ public class CommandNewpage extends SingleLineCommand2 { @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, LineLocation location, RegexResult arg) { final int dpi = diagram.getSkinParam().getDpi(); - final UmlDiagram emptyDiagram = (UmlDiagram) factory.createEmptyDiagram(diagram.getSkinParam().getThemeStyle(), - diagram.getSource(), diagram.getSkinParam()); + final UmlDiagram emptyDiagram = (UmlDiagram) factory.createEmptyDiagram(diagram.getSource(), + diagram.getSkinParam()); if (dpi != 96) emptyDiagram.setParam("dpi", "" + dpi); diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java index 28e235f3b..db2bd60b8 100644 --- a/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java +++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java @@ -174,8 +174,7 @@ public class CommandPackageWithUSymbol extends SingleLineCommand2 { } @Override - public PSystemDot initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemDot initDiagram(UmlSource source, String startLine) { data = null; return null; } @Override - public PSystemDot executeLine(ThemeStyle style, UmlSource source, PSystemDot system, String line) { + public PSystemDot executeLine(UmlSource source, PSystemDot system, String line) { if (system == null && line.matches("(strict\\s+)?(di)?graph\\s+\"?[-\\w]+\"?\\s*\\{")) { data = new StringBuilder(line); data.append("\n"); diff --git a/src/net/sourceforge/plantuml/ditaa/PSystemDitaaFactory.java b/src/net/sourceforge/plantuml/ditaa/PSystemDitaaFactory.java index b5f578686..c2f8206a2 100644 --- a/src/net/sourceforge/plantuml/ditaa/PSystemDitaaFactory.java +++ b/src/net/sourceforge/plantuml/ditaa/PSystemDitaaFactory.java @@ -38,7 +38,6 @@ import java.awt.Font; import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -57,7 +56,7 @@ public class PSystemDitaaFactory extends PSystemBasicFactory { } @Override - public PSystemDitaa initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemDitaa initDiagram(UmlSource source, String startLine) { boolean performSeparationOfCommonEdges = true; if (startLine != null && (startLine.contains("-E") || startLine.contains("--no-separation"))) performSeparationOfCommonEdges = false; @@ -90,7 +89,7 @@ public class PSystemDitaaFactory extends PSystemBasicFactory { } @Override - public PSystemDitaa executeLine(ThemeStyle style, UmlSource source, PSystemDitaa system, String line) { + public PSystemDitaa executeLine(UmlSource source, PSystemDitaa system, String line) { if (system == null && (line.equals("ditaa") || line.startsWith("ditaa("))) { boolean performSeparationOfCommonEdges = true; if (line.contains("-E") || line.contains("--no-separation")) diff --git a/src/net/sourceforge/plantuml/eggs/PSystemPath.java b/src/net/sourceforge/plantuml/eggs/PSystemPath.java index 520ff3181..05da248fe 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemPath.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemPath.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; public class PSystemPath extends AbstractPSystem { @@ -51,7 +51,7 @@ public class PSystemPath extends AbstractPSystem { public PSystemPath(UmlSource source, String s) { super(source); - this.path = new GraphicsPath(new ColorMapperIdentity(), s); + this.path = new GraphicsPath(ColorMapper.IDENTITY, s); } @Override diff --git a/src/net/sourceforge/plantuml/eggs/PSystemWelcomeFactory.java b/src/net/sourceforge/plantuml/eggs/PSystemWelcomeFactory.java index 5d94982be..30f7567e8 100644 --- a/src/net/sourceforge/plantuml/eggs/PSystemWelcomeFactory.java +++ b/src/net/sourceforge/plantuml/eggs/PSystemWelcomeFactory.java @@ -37,7 +37,6 @@ package net.sourceforge.plantuml.eggs; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.api.PSystemFactory; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -46,7 +45,7 @@ import net.sourceforge.plantuml.graphic.GraphicPosition; public class PSystemWelcomeFactory implements PSystemFactory { @Override - public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { if (source.getTotalLineCount() == 2) return new PSystemWelcome(source, GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT); diff --git a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java index e037afeb1..9cb976b58 100644 --- a/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java +++ b/src/net/sourceforge/plantuml/elk/CucaDiagramFileMakerElk.java @@ -265,8 +265,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker { HColor backColor = getBackColor(umlDiagramType); backColor = Cluster.getBackColor(backColor, group.getStereotype(), umlDiagramType.getStyleName(), - group.getUSymbol(), skinParam.getCurrentStyleBuilder(), skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + group.getUSymbol(), skinParam.getCurrentStyleBuilder(), skinParam.getIHtmlColorSet()); final double roundCorner = style.value(PName.RoundCorner).asDouble(); // final double roundCorner = group.getUSymbol() == null ? 0 diff --git a/src/net/sourceforge/plantuml/elk/ElkPath.java b/src/net/sourceforge/plantuml/elk/ElkPath.java index 5cf5c2490..a34ac1419 100644 --- a/src/net/sourceforge/plantuml/elk/ElkPath.java +++ b/src/net/sourceforge/plantuml/elk/ElkPath.java @@ -124,8 +124,7 @@ public class ElkPath implements UDrawable { final ISkinParam skinParam = diagram.getSkinParam(); - HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + HColor color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); if (this.link.getColors() != null) { final HColor newColor = this.link.getColors().getColor(ColorType.ARROW, ColorType.LINE); diff --git a/src/net/sourceforge/plantuml/emoji/SpriteSvgNanoParser.java b/src/net/sourceforge/plantuml/emoji/SpriteSvgNanoParser.java index 9f563c737..087a7f38c 100644 --- a/src/net/sourceforge/plantuml/emoji/SpriteSvgNanoParser.java +++ b/src/net/sourceforge/plantuml/emoji/SpriteSvgNanoParser.java @@ -52,7 +52,6 @@ import net.sourceforge.plantuml.ugraphic.PixelImage; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperMonochrome; import net.sourceforge.plantuml.ugraphic.color.HColor; public class SpriteSvgNanoParser implements Sprite { @@ -67,7 +66,7 @@ public class SpriteSvgNanoParser implements Sprite { return new AbstractTextBlock() { public void drawU(UGraphic ug) { - if (colorMapper instanceof ColorMapperMonochrome) { + if (colorMapper == ColorMapper.MONOCHROME) { ug.draw(img.monochrome().scale(scale)); } else if (color == null) ug.draw(img.scale(scale)); diff --git a/src/net/sourceforge/plantuml/emoji/SvgNanoParser.java b/src/net/sourceforge/plantuml/emoji/SvgNanoParser.java index a59e789b7..96f7a3826 100644 --- a/src/net/sourceforge/plantuml/emoji/SvgNanoParser.java +++ b/src/net/sourceforge/plantuml/emoji/SvgNanoParser.java @@ -22,7 +22,6 @@ import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperMonochrome; import net.sourceforge.plantuml.ugraphic.color.ColorUtils; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -121,7 +120,7 @@ public class SvgNanoParser implements Sprite { } private int getGray(HColor col) { - final Color tmp = ColorUtils.getGrayScaleColor(col.toColor(new ColorMapperMonochrome(false))); + final Color tmp = ColorUtils.getGrayScaleColor(col.toColor(ColorMapper.MONOCHROME)); return tmp.getGreen(); } diff --git a/src/net/sourceforge/plantuml/error/PSystemError.java b/src/net/sourceforge/plantuml/error/PSystemError.java index 824eba1b8..3434dc9d6 100644 --- a/src/net/sourceforge/plantuml/error/PSystemError.java +++ b/src/net/sourceforge/plantuml/error/PSystemError.java @@ -347,7 +347,7 @@ public abstract class PSystemError extends PlainDiagram { final HColorSimple backColor = (HColorSimple) HColorSet.instance().getColorOrWhite("#eae2c9"); final BufferedImage qrcode = smaller( - utils.exportFlashcode("http://plantuml.com/dedication", Color.BLACK, backColor.getColor999())); + utils.exportFlashcode("http://plantuml.com/dedication", Color.BLACK, backColor.getAwtColor())); final Display disp = Display.create("Add your own dedication into PlantUML", " ", "For just $5 per month!", "Details on [[https://plantuml.com/dedication]]"); diff --git a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java index dc2fda179..93ce0d50f 100644 --- a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java +++ b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java @@ -45,7 +45,6 @@ import java.util.Map; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; @@ -89,8 +88,8 @@ public class FlowDiagram extends UmlDiagram implements TextBlock { return new DiagramDescription("Flow Diagram"); } - public FlowDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.FLOW, null); + public FlowDiagram(UmlSource source) { + super(source, UmlDiagramType.FLOW, null); } public void lineSimple(TileGeometry orientation, String idDest, String label) { diff --git a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagramFactory.java b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagramFactory.java index aef437305..fee7e2317 100644 --- a/src/net/sourceforge/plantuml/flowdiagram/FlowDiagramFactory.java +++ b/src/net/sourceforge/plantuml/flowdiagram/FlowDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.DiagramType; @@ -52,8 +51,8 @@ public class FlowDiagramFactory extends PSystemCommandFactory { } @Override - public FlowDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new FlowDiagram(style, source); + public FlowDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new FlowDiagram(source); } @Override diff --git a/src/net/sourceforge/plantuml/gitlog/GitDiagram.java b/src/net/sourceforge/plantuml/gitlog/GitDiagram.java index c70cc91e1..d2589ce03 100644 --- a/src/net/sourceforge/plantuml/gitlog/GitDiagram.java +++ b/src/net/sourceforge/plantuml/gitlog/GitDiagram.java @@ -41,7 +41,6 @@ import java.util.Collection; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.core.DiagramDescription; @@ -58,8 +57,8 @@ public class GitDiagram extends UmlDiagram { private final Collection gnodes; - public GitDiagram(ThemeStyle style, UmlSource source, GitTextArea textArea) { - super(style, source, UmlDiagramType.GIT, null); + public GitDiagram(UmlSource source, GitTextArea textArea) { + super(source, UmlDiagramType.GIT, null); this.gnodes = new GNodeBuilder(textArea.getAllCommits()).getAllNodes(); new GNodeBuilder(textArea.getAllCommits()); } diff --git a/src/net/sourceforge/plantuml/gitlog/GitDiagramFactory.java b/src/net/sourceforge/plantuml/gitlog/GitDiagramFactory.java index cba058091..fcbba94e6 100644 --- a/src/net/sourceforge/plantuml/gitlog/GitDiagramFactory.java +++ b/src/net/sourceforge/plantuml/gitlog/GitDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.Iterator; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringLocated; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemAbstractFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; @@ -52,7 +51,7 @@ public class GitDiagramFactory extends PSystemAbstractFactory { } @Override - public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { final GitTextArea textArea = new GitTextArea(); final Iterator it = source.iterator2(); @@ -64,7 +63,7 @@ public class GitDiagramFactory extends PSystemAbstractFactory { textArea.add(line); } - return new GitDiagram(style, source, textArea); + return new GitDiagram(source, textArea); } } diff --git a/src/net/sourceforge/plantuml/gitlog/MagicBox.java b/src/net/sourceforge/plantuml/gitlog/MagicBox.java index 5e4c22ae7..ca1d73afd 100644 --- a/src/net/sourceforge/plantuml/gitlog/MagicBox.java +++ b/src/net/sourceforge/plantuml/gitlog/MagicBox.java @@ -64,7 +64,7 @@ public class MagicBox { this.node = node; final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.gitDiagram) .getMergedStyle(skinParam.getCurrentStyleBuilder()); - this.fontColor = style.value(PName.FontColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + this.fontColor = style.value(PName.FontColor).asColor(skinParam.getIHtmlColorSet()); } private TextBlock getSmallBlock() { diff --git a/src/net/sourceforge/plantuml/gitlog/SmetanaForGit.java b/src/net/sourceforge/plantuml/gitlog/SmetanaForGit.java index fe2fefe48..f96d2777b 100644 --- a/src/net/sourceforge/plantuml/gitlog/SmetanaForGit.java +++ b/src/net/sourceforge/plantuml/gitlog/SmetanaForGit.java @@ -84,7 +84,7 @@ public class SmetanaForGit { public SmetanaForGit(UGraphic ug, ISkinParam skinParam) { this.stringBounder = ug.getStringBounder(); this.skinParam = skinParam; - this.ug = getStyle().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle()); + this.ug = getStyle().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet()); } private Style getStyle() { @@ -93,7 +93,7 @@ public class SmetanaForGit { } private HColor arrowColor() { - return getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } public void drawMe(Collection gnodes) { diff --git a/src/net/sourceforge/plantuml/graphic/ColorAndSizeChange.java b/src/net/sourceforge/plantuml/graphic/ColorAndSizeChange.java index de3b91c04..b91a51b0a 100644 --- a/src/net/sourceforge/plantuml/graphic/ColorAndSizeChange.java +++ b/src/net/sourceforge/plantuml/graphic/ColorAndSizeChange.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.graphic; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; @@ -51,11 +50,11 @@ class ColorAndSizeChange implements FontChange { private final HColor color; private final Integer size; - ColorAndSizeChange(ThemeStyle themeStyle, String s) { + ColorAndSizeChange(String s) { final Matcher2 matcherColor = colorPattern.matcher(s); if (matcherColor.find()) { final String s1 = matcherColor.group(1); - color = HColorSet.instance().getColorOrWhite(themeStyle, s1); + color = HColorSet.instance().getColorOrWhite(s1); } else { color = null; } diff --git a/src/net/sourceforge/plantuml/graphic/ColorChange.java b/src/net/sourceforge/plantuml/graphic/ColorChange.java index be09d31d6..0c0ffa77d 100644 --- a/src/net/sourceforge/plantuml/graphic/ColorChange.java +++ b/src/net/sourceforge/plantuml/graphic/ColorChange.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.graphic; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; @@ -48,13 +47,13 @@ class ColorChange implements FontChange { private final HColor color; - ColorChange(ThemeStyle themeStyle, String s) { + ColorChange(String s) { final Matcher2 matcherColor = colorPattern.matcher(s); if (matcherColor.find() == false) { throw new IllegalArgumentException(); } final String s1 = matcherColor.group(1); - this.color = HColorSet.instance().getColorOrWhite(themeStyle, s1); + this.color = HColorSet.instance().getColorOrWhite(s1); } HColor getColor() { diff --git a/src/net/sourceforge/plantuml/graphic/FontConfiguration.java b/src/net/sourceforge/plantuml/graphic/FontConfiguration.java index a4f9126e2..c5823d2bb 100644 --- a/src/net/sourceforge/plantuml/graphic/FontConfiguration.java +++ b/src/net/sourceforge/plantuml/graphic/FontConfiguration.java @@ -96,12 +96,11 @@ public class FontConfiguration { } public static FontConfiguration create(ISkinParam skinParam, Style style, Colors colors) { - final HColor hyperlinkColor = style.value(PName.HyperLinkColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor hyperlinkColor = style.value(PName.HyperLinkColor).asColor(skinParam.getIHtmlColorSet()); final boolean useUnderlineForHyperlink = skinParam.useUnderlineForHyperlink(); HColor color = colors == null ? null : colors.getColor(ColorType.TEXT); if (color == null) - color = style.value(PName.FontColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + color = style.value(PName.FontColor).asColor(skinParam.getIHtmlColorSet()); return create(style.getUFont(), color, hyperlinkColor, useUnderlineForHyperlink, skinParam.getTabSize()); } diff --git a/src/net/sourceforge/plantuml/graphic/HtmlColorAndStyle.java b/src/net/sourceforge/plantuml/graphic/HtmlColorAndStyle.java index 96435324a..cb4f89219 100644 --- a/src/net/sourceforge/plantuml/graphic/HtmlColorAndStyle.java +++ b/src/net/sourceforge/plantuml/graphic/HtmlColorAndStyle.java @@ -87,8 +87,7 @@ public class HtmlColorAndStyle { public static HtmlColorAndStyle build(ISkinParam skinParam, String definition) throws NoSuchColorException { final Style style = getDefaultStyleDefinitionArrow().getMergedStyle(skinParam.getCurrentStyleBuilder()); - HColor arrowColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + HColor arrowColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final HColor arrowHeadColor = null; LinkStyle linkStyle = LinkStyle.NORMAL(); @@ -99,7 +98,7 @@ public class HtmlColorAndStyle { linkStyle = tmpStyle; continue; } - final HColor tmpColor = s == null ? null : set.getColor(skinParam.getThemeStyle(), s); + final HColor tmpColor = s == null ? null : set.getColor(s); if (tmpColor != null) arrowColor = tmpColor; diff --git a/src/net/sourceforge/plantuml/graphic/HtmlCommandFactory.java b/src/net/sourceforge/plantuml/graphic/HtmlCommandFactory.java index 94ba9746d..37b83e9e0 100644 --- a/src/net/sourceforge/plantuml/graphic/HtmlCommandFactory.java +++ b/src/net/sourceforge/plantuml/graphic/HtmlCommandFactory.java @@ -40,7 +40,6 @@ import java.util.EnumSet; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlMode; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; @@ -68,7 +67,7 @@ class HtmlCommandFactory { private Pattern2 htmlTag = MyPattern.cmpile(Splitter.htmlTag); - HtmlCommand getHtmlCommand(ThemeStyle themeStyle, String s) { + HtmlCommand getHtmlCommand(String s) { if (htmlTag.matcher(s).matches() == false) { return new Text(s); } @@ -88,11 +87,11 @@ class HtmlCommandFactory { } if (MyPattern.mtches(s, Splitter.fontPattern)) { - return new ColorAndSizeChange(themeStyle, s); + return new ColorAndSizeChange(s); } if (MyPattern.mtches(s, Splitter.fontColorPattern2)) { - return new ColorChange(themeStyle, s); + return new ColorChange(s); } if (MyPattern.mtches(s, Splitter.fontSizePattern2)) { diff --git a/src/net/sourceforge/plantuml/graphic/Rainbow.java b/src/net/sourceforge/plantuml/graphic/Rainbow.java index bd876f96f..7ae6a0644 100644 --- a/src/net/sourceforge/plantuml/graphic/Rainbow.java +++ b/src/net/sourceforge/plantuml/graphic/Rainbow.java @@ -41,7 +41,6 @@ import java.util.List; import java.util.Objects; import net.sourceforge.plantuml.ISkinParam; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Value; @@ -81,14 +80,14 @@ public class Rainbow { throw new IllegalStateException(); } - public static Rainbow build(Style style, HColorSet set, ThemeStyle themeStyle) { - final HColor color = style.value(PName.LineColor).asColor(themeStyle, set); + public static Rainbow build(Style style, HColorSet set) { + final HColor color = style.value(PName.LineColor).asColor(set); final Value head = style.value(PName.HeadColor); HColor colorHead; if (head instanceof ValueNull) colorHead = color; else - colorHead = head.asColor(themeStyle, set); + colorHead = head.asColor(set); if (colorHead == null) colorHead = HColors.transparent(); return fromColor(color, colorHead); diff --git a/src/net/sourceforge/plantuml/graphic/SingleLine.java b/src/net/sourceforge/plantuml/graphic/SingleLine.java index 56a0ac306..9b8c075b5 100644 --- a/src/net/sourceforge/plantuml/graphic/SingleLine.java +++ b/src/net/sourceforge/plantuml/graphic/SingleLine.java @@ -59,7 +59,7 @@ class SingleLine extends AbstractTextBlock implements Line { final Splitter lineSplitter = new Splitter(text); - for (HtmlCommand cmd : lineSplitter.getHtmlCommands(spriteContainer.getThemeStyle(), false)) { + for (HtmlCommand cmd : lineSplitter.getHtmlCommands(false)) { if (cmd instanceof Text) { final String s = ((Text) cmd).getText(); result.blocs.add(new TileText(s, fontConfiguration, null)); diff --git a/src/net/sourceforge/plantuml/graphic/Splitter.java b/src/net/sourceforge/plantuml/graphic/Splitter.java index 6f3d55d56..ddf4b0a82 100644 --- a/src/net/sourceforge/plantuml/graphic/Splitter.java +++ b/src/net/sourceforge/plantuml/graphic/Splitter.java @@ -42,7 +42,6 @@ import java.util.EnumSet; import java.util.List; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; @@ -147,11 +146,11 @@ public class Splitter { return s.replaceAll(htmlTag, ""); } - public List getHtmlCommands(ThemeStyle themeStyle, boolean newLineAlone) { + public List getHtmlCommands(boolean newLineAlone) { final HtmlCommandFactory factory = new HtmlCommandFactory(); final List result = new ArrayList<>(); for (String s : getSplittedInternal()) { - final HtmlCommand cmd = factory.getHtmlCommand(themeStyle, s); + final HtmlCommand cmd = factory.getHtmlCommand(s); if (newLineAlone && cmd instanceof Text) { result.addAll(splitText((Text) cmd)); } else { diff --git a/src/net/sourceforge/plantuml/graphic/USymbolFrame.java b/src/net/sourceforge/plantuml/graphic/USymbolFrame.java index 42d2f00d2..e5648b064 100644 --- a/src/net/sourceforge/plantuml/graphic/USymbolFrame.java +++ b/src/net/sourceforge/plantuml/graphic/USymbolFrame.java @@ -49,7 +49,13 @@ class USymbolFrame extends USymbol { @Override public SName getSName() { - return SName.frame; + return sname; + } + + private final SName sname; + + public USymbolFrame(SName sname) { + this.sname = sname; } private void drawFrame(UGraphic ug, double width, double height, XDimension2D dimTitle, double shadowing, @@ -103,8 +109,8 @@ class USymbolFrame extends USymbol { final XDimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, dim); ug = symbolContext.apply(ug); - drawFrame(ug, dim.getWidth(), dim.getHeight(), new XDimension2D(0, 0), - symbolContext.getDeltaShadow(), symbolContext.getRoundCorner()); + drawFrame(ug, dim.getWidth(), dim.getHeight(), new XDimension2D(0, 0), symbolContext.getDeltaShadow(), + symbolContext.getRoundCorner()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); diff --git a/src/net/sourceforge/plantuml/graphic/USymbols.java b/src/net/sourceforge/plantuml/graphic/USymbols.java index 7e2925034..b8133aa4f 100644 --- a/src/net/sourceforge/plantuml/graphic/USymbols.java +++ b/src/net/sourceforge/plantuml/graphic/USymbols.java @@ -61,7 +61,9 @@ public abstract class USymbols { public final static USymbol DATABASE = record("DATABASE", new USymbolDatabase()); public final static USymbol CLOUD = record("CLOUD", new USymbolCloud()); public final static USymbol CARD = record("CARD", new USymbolCard()); - public final static USymbol FRAME = record("FRAME", new USymbolFrame()); + public final static USymbol FRAME = record("FRAME", new USymbolFrame(SName.frame)); + public final static USymbol PARTITION = record("PARTITION", new USymbolFrame(SName.partition)); + public final static USymbol GROUP = record("GROUP", new USymbolFrame(SName.group)); public final static USymbol NODE = record("NODE", new USymbolNode()); public final static USymbol ARTIFACT = record("ARTIFACT", new USymbolArtifact()); public final static USymbol PACKAGE = record("PACKAGE", new USymbolFolder(SName.package_, true)); diff --git a/src/net/sourceforge/plantuml/graphic/color/ColorParser.java b/src/net/sourceforge/plantuml/graphic/color/ColorParser.java index e5770106f..c481ffa7d 100644 --- a/src/net/sourceforge/plantuml/graphic/color/ColorParser.java +++ b/src/net/sourceforge/plantuml/graphic/color/ColorParser.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.graphic.color; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -58,7 +57,7 @@ public class ColorParser { this.mainType = mainType; } - public Colors getColor(ThemeStyle themeStyle, RegexResult arg, HColorSet set) throws NoSuchColorException { + public Colors getColor(RegexResult arg, HColorSet set) throws NoSuchColorException { if (mainType == null) { throw new IllegalStateException(); } @@ -66,7 +65,7 @@ public class ColorParser { if (data == null) { return Colors.empty(); } - return new Colors(themeStyle, data, set, mainType); + return new Colors(data, set, mainType); } // New Parsers diff --git a/src/net/sourceforge/plantuml/graphic/color/Colors.java b/src/net/sourceforge/plantuml/graphic/color/Colors.java index a418af574..54bcc5581 100644 --- a/src/net/sourceforge/plantuml/graphic/color/Colors.java +++ b/src/net/sourceforge/plantuml/graphic/color/Colors.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamColors; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.ugraphic.UGraphic; @@ -82,7 +81,7 @@ public class Colors { private Colors() { } - public Colors(ThemeStyle themeStyle, String data, HColorSet set, ColorType mainType) throws NoSuchColorException { + public Colors(String data, HColorSet set, ColorType mainType) throws NoSuchColorException { data = StringUtils.goLowerCase(data); for (final StringTokenizer st = new StringTokenizer(data, "#;"); st.hasMoreTokens();) { @@ -90,7 +89,7 @@ public class Colors { final int x = s.indexOf(':'); if (x == -1) { if (s.contains(".") == false) - map.put(mainType, set.getColor(themeStyle, s)); + map.put(mainType, set.getColor(s)); } else { final String name = s.substring(0, x); @@ -99,7 +98,7 @@ public class Colors { this.shadowing = value.equalsIgnoreCase("true"); } else { final ColorType key = ColorType.getType(name); - final HColor color = set.getColor(themeStyle, value); + final HColor color = set.getColor(value); map.put(key, color); } } diff --git a/src/net/sourceforge/plantuml/hcl/HclDiagramFactory.java b/src/net/sourceforge/plantuml/hcl/HclDiagramFactory.java index dd9cd1562..745f1b373 100644 --- a/src/net/sourceforge/plantuml/hcl/HclDiagramFactory.java +++ b/src/net/sourceforge/plantuml/hcl/HclDiagramFactory.java @@ -41,7 +41,6 @@ import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemAbstractFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; @@ -58,7 +57,7 @@ public class HclDiagramFactory extends PSystemAbstractFactory { } @Override - public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { final List highlighted = new ArrayList<>(); JsonValue data = null; StyleExtractor styleExtractor = null; @@ -79,7 +78,7 @@ public class HclDiagramFactory extends PSystemAbstractFactory { } catch (Exception e) { Logme.error(e); } - final JsonDiagram result = new JsonDiagram(style, source, UmlDiagramType.HCL, data, highlighted); + final JsonDiagram result = new JsonDiagram(source, UmlDiagramType.HCL, data, highlighted); // if (styleExtractor != null) { // styleExtractor.applyStyles(result.getSkinParam()); // final String title = styleExtractor.getTitle(); diff --git a/src/net/sourceforge/plantuml/help/Help.java b/src/net/sourceforge/plantuml/help/Help.java index b089c0973..4694b57de 100644 --- a/src/net/sourceforge/plantuml/help/Help.java +++ b/src/net/sourceforge/plantuml/help/Help.java @@ -43,7 +43,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; @@ -66,8 +65,8 @@ public class Help extends UmlDiagram { return new DiagramDescription("(Help)"); } - public Help(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.HELP, null); + public Help(UmlSource source) { + super(source, UmlDiagramType.HELP, null); } @Override diff --git a/src/net/sourceforge/plantuml/help/HelpFactory.java b/src/net/sourceforge/plantuml/help/HelpFactory.java index 1eda822d3..2bd9959ed 100644 --- a/src/net/sourceforge/plantuml/help/HelpFactory.java +++ b/src/net/sourceforge/plantuml/help/HelpFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.UmlSource; @@ -47,8 +46,8 @@ import net.sourceforge.plantuml.core.UmlSource; public class HelpFactory extends PSystemCommandFactory { @Override - public Help createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new Help(style, source); + public Help createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new Help(source); } @Override diff --git a/src/net/sourceforge/plantuml/jcckit/PSystemJcckitFactory.java b/src/net/sourceforge/plantuml/jcckit/PSystemJcckitFactory.java index f0652cb7a..0b3e00aee 100644 --- a/src/net/sourceforge/plantuml/jcckit/PSystemJcckitFactory.java +++ b/src/net/sourceforge/plantuml/jcckit/PSystemJcckitFactory.java @@ -42,7 +42,6 @@ import java.util.Properties; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; @@ -62,7 +61,7 @@ public class PSystemJcckitFactory extends PSystemBasicFactory { } @Override - public PSystemJcckit initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemJcckit initDiagram(UmlSource source, String startLine) { this.data = null; this.width = 640; this.height = 400; @@ -109,7 +108,7 @@ public class PSystemJcckitFactory extends PSystemBasicFactory { } @Override - public PSystemJcckit executeLine(ThemeStyle style, UmlSource source, PSystemJcckit system, String line) { + public PSystemJcckit executeLine(UmlSource source, PSystemJcckit system, String line) { if (system == null && line.startsWith("jcckit")) { data = new StringBuilder(); extractDimension(line); diff --git a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java index f55dd166e..e55acd106 100644 --- a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java +++ b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagram.java @@ -41,7 +41,6 @@ import java.util.List; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.TitledDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.core.DiagramDescription; @@ -67,9 +66,8 @@ public class JsonDiagram extends TitledDiagram { private final JsonValue root; private final List highlighted; - public JsonDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, JsonValue json, - List highlighted) { - super(style, source, type, null); + public JsonDiagram(UmlSource source, UmlDiagramType type, JsonValue json, List highlighted) { + super(source, type, null); if (json != null && (json.isString() || json.isBoolean() || json.isNumber())) { this.root = new JsonArray(); ((JsonArray) this.root).add(json); diff --git a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagramFactory.java b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagramFactory.java index 9c9167bd5..8663ebe86 100644 --- a/src/net/sourceforge/plantuml/jsondiagram/JsonDiagramFactory.java +++ b/src/net/sourceforge/plantuml/jsondiagram/JsonDiagramFactory.java @@ -42,7 +42,6 @@ import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemAbstractFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; @@ -58,7 +57,7 @@ public class JsonDiagramFactory extends PSystemAbstractFactory { } @Override - public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { final List highlighted = new ArrayList<>(); StyleExtractor styleExtractor = null; JsonValue json; @@ -86,7 +85,7 @@ public class JsonDiagramFactory extends PSystemAbstractFactory { } catch (ParseException e) { json = null; } - final JsonDiagram result = new JsonDiagram(style, source, UmlDiagramType.JSON, json, highlighted); + final JsonDiagram result = new JsonDiagram(source, UmlDiagramType.JSON, json, highlighted); if (styleExtractor != null) styleExtractor.applyStyles(result.getSkinParam()); diff --git a/src/net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java b/src/net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java index 0823473f5..b69d513fe 100644 --- a/src/net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java +++ b/src/net/sourceforge/plantuml/jsondiagram/SmetanaForJson.java @@ -185,18 +185,16 @@ public class SmetanaForJson { for (InternalNode node : nodes) { node.block.drawU( - getStyleNode().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle()) + getStyleNode().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet()) .apply(getPosition(node.node))); } - final HColor color = getStyleArrow().value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = getStyleArrow().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); for (ST_Agedge_s edge : edges) { final JsonCurve curve = getCurve(edge, 13); - curve.drawCurve(color, getStyleArrow().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), - skinParam.getThemeStyle())); + curve.drawCurve(color, getStyleArrow().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet())); curve.drawSpot( - getStyleArrow().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), skinParam.getThemeStyle()) + getStyleArrow().applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet()) .apply(color.bg())); } } diff --git a/src/net/sourceforge/plantuml/jsondiagram/TextBlockJson.java b/src/net/sourceforge/plantuml/jsondiagram/TextBlockJson.java index f2fe5bdba..fd75aba58 100644 --- a/src/net/sourceforge/plantuml/jsondiagram/TextBlockJson.java +++ b/src/net/sourceforge/plantuml/jsondiagram/TextBlockJson.java @@ -103,8 +103,7 @@ public class TextBlockJson extends AbstractTextBlock implements TextBlockBackcol } private HColor getBackColor() { - return styleNodeHightlight.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + return styleNodeHightlight.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); } TextBlockJson(ISkinParam skinParam, JsonValue root, List allHighlighteds, Style styleNode, @@ -261,8 +260,7 @@ public class TextBlockJson extends AbstractTextBlock implements TextBlockBackcol final double widthColB = getWidthColB(stringBounder); double y = 0; - final UGraphic ugNode = styleNode.applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), - skinParam.getThemeStyle()); + final UGraphic ugNode = styleNode.applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet()); for (Line line : lines) { final double heightOfRow = line.getHeightOfRow(stringBounder); y += heightOfRow; @@ -274,14 +272,12 @@ public class TextBlockJson extends AbstractTextBlock implements TextBlockBackcol final double round = styleNode.value(PName.RoundCorner).asDouble(); final URectangle fullNodeRectangle = new URectangle(trueWidth, y).rounded(round); - final HColor backColor = styleNode.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor backColor = styleNode.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); ugNode.apply(backColor.bg()).apply(backColor).draw(fullNodeRectangle); final Style styleSeparator = styleNode.getSignature().add(SName.separator) .getMergedStyle(skinParam.getCurrentStyleBuilder()); - final UGraphic ugSeparator = styleSeparator.applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet(), - skinParam.getThemeStyle()); + final UGraphic ugSeparator = styleSeparator.applyStrokeAndLineColor(ug, skinParam.getIHtmlColorSet()); y = 0; for (Line line : lines) { @@ -320,8 +316,7 @@ public class TextBlockJson extends AbstractTextBlock implements TextBlockBackcol private TextBlock getTextBlock(Style style, String key) { final Display display = Display.getWithNewlines(key); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final LineBreakStrategy wrap = style.wrapWidth(); final HorizontalAlignment horizontalAlignment = style.getHorizontalAlignment(); TextBlock result = display.create0(fontConfiguration, horizontalAlignment, skinParam, wrap, diff --git a/src/net/sourceforge/plantuml/logo/PSystemLogo.java b/src/net/sourceforge/plantuml/logo/PSystemLogo.java index 4eed117b2..68bc89055 100644 --- a/src/net/sourceforge/plantuml/logo/PSystemLogo.java +++ b/src/net/sourceforge/plantuml/logo/PSystemLogo.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColors; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; @@ -73,7 +73,7 @@ public class PSystemLogo extends AbstractPSystem { final StringBounder stringBounder = FileFormat.PNG.getDefaultStringBounder(); final EmptyImageBuilder builder = new EmptyImageBuilder(fileFormat.getWatermark(), width, height, Color.WHITE, stringBounder); final BufferedImage im = builder.getBufferedImage(); - final UGraphic ug = new UGraphicG2d(HColors.WHITE, new ColorMapperIdentity(), stringBounder, builder.getGraphics2D(), 1.0); + final UGraphic ug = new UGraphicG2d(HColors.WHITE, ColorMapper.IDENTITY, stringBounder, builder.getGraphics2D(), 1.0); ((UGraphicG2d) ug).setBufferedImage(im); final TurtleGraphicsPane turtleGraphicsPane = new TurtleGraphicsPane(width, height); diff --git a/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java b/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java index 2dc42af78..04045678b 100644 --- a/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java +++ b/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java @@ -35,19 +35,18 @@ */ package net.sourceforge.plantuml.logo; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemLogoFactory extends PSystemBasicFactory { @Override - public PSystemLogo initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemLogo initDiagram(UmlSource source, String startLine) { return null; } @Override - public PSystemLogo executeLine(ThemeStyle style, UmlSource source, PSystemLogo system, String line) { + public PSystemLogo executeLine(UmlSource source, PSystemLogo system, String line) { if (system == null && line.equalsIgnoreCase("logo")) { return new PSystemLogo(source); } diff --git a/src/net/sourceforge/plantuml/math/PSystemLatex.java b/src/net/sourceforge/plantuml/math/PSystemLatex.java index 5583d3180..1f5d6d8cc 100644 --- a/src/net/sourceforge/plantuml/math/PSystemLatex.java +++ b/src/net/sourceforge/plantuml/math/PSystemLatex.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.log.Logme; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -113,7 +113,7 @@ public class PSystemLatex extends AbstractPSystem { private Color getColor(final String col) { final HColor col2 = col == null ? null : HColorSet.instance().getColorOrWhite(col); - final Color col3 = col2.toColor(new ColorMapperIdentity()); + final Color col3 = col2.toColor(ColorMapper.IDENTITY); return col3; } diff --git a/src/net/sourceforge/plantuml/math/PSystemLatexFactory.java b/src/net/sourceforge/plantuml/math/PSystemLatexFactory.java index e21a40b31..a4d2e7a78 100644 --- a/src/net/sourceforge/plantuml/math/PSystemLatexFactory.java +++ b/src/net/sourceforge/plantuml/math/PSystemLatexFactory.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.math; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -47,7 +46,7 @@ public class PSystemLatexFactory extends PSystemBasicFactory { } @Override - public PSystemLatex initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemLatex initDiagram(UmlSource source, String startLine) { if (getDiagramType() == DiagramType.LATEX) return new PSystemLatex(source); @@ -55,7 +54,7 @@ public class PSystemLatexFactory extends PSystemBasicFactory { } @Override - public PSystemLatex executeLine(ThemeStyle style, UmlSource source, PSystemLatex system, String line) { + public PSystemLatex executeLine(UmlSource source, PSystemLatex system, String line) { system.doCommandLine(line); return system; } diff --git a/src/net/sourceforge/plantuml/math/PSystemMath.java b/src/net/sourceforge/plantuml/math/PSystemMath.java index fef023fd0..6d63b3520 100644 --- a/src/net/sourceforge/plantuml/math/PSystemMath.java +++ b/src/net/sourceforge/plantuml/math/PSystemMath.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.log.Logme; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -114,7 +114,7 @@ public class PSystemMath extends AbstractPSystem { private Color getColor(final String col) { final HColor col2 = col == null ? null : HColorSet.instance().getColorOrWhite(col); - final Color col3 = col2.toColor(new ColorMapperIdentity()); + final Color col3 = col2.toColor(ColorMapper.IDENTITY); return col3; } diff --git a/src/net/sourceforge/plantuml/math/PSystemMathFactory.java b/src/net/sourceforge/plantuml/math/PSystemMathFactory.java index f50bb9f45..585f21a8d 100644 --- a/src/net/sourceforge/plantuml/math/PSystemMathFactory.java +++ b/src/net/sourceforge/plantuml/math/PSystemMathFactory.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.math; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -47,7 +46,7 @@ public class PSystemMathFactory extends PSystemBasicFactory { } @Override - public PSystemMath initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemMath initDiagram(UmlSource source, String startLine) { if (getDiagramType() == DiagramType.MATH) return new PSystemMath(source); @@ -55,7 +54,7 @@ public class PSystemMathFactory extends PSystemBasicFactory { } @Override - public PSystemMath executeLine(ThemeStyle style, UmlSource source, PSystemMath system, String line) { + public PSystemMath executeLine(UmlSource source, PSystemMath system, String line) { system.doCommandLine(line); return system; } diff --git a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java index b31ee663d..0ffcdd0f1 100644 --- a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java +++ b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmode.java @@ -70,8 +70,7 @@ public class CommandMindMapOrgmode extends SingleLineCommand2 { final String stringColor = arg.get("BACKCOLOR", 0); HColor backColor = null; if (stringColor != null) { - backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), - stringColor); + backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(stringColor); } return diagram.addIdea(backColor, diagram.getSmartLevel(type), Display.getWithNewlines(label), IdeaShape.fromDesc(arg.get("SHAPE", 0))); diff --git a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java index 1f52363df..fcd044919 100644 --- a/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java +++ b/src/net/sourceforge/plantuml/mindmap/CommandMindMapOrgmodeMultiline.java @@ -89,8 +89,7 @@ public class CommandMindMapOrgmodeMultiline extends CommandMultilines2 { final String stringColor = arg.get("BACKCOLOR", 0); HColor backColor = null; if (stringColor != null) { - backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), - stringColor); + backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(stringColor); } final boolean direction = type.contains("-") ? false : true; return diagram.addIdea(backColor, type.length() - 1, Display.getWithNewlines(label), diff --git a/src/net/sourceforge/plantuml/mindmap/FingerImpl.java b/src/net/sourceforge/plantuml/mindmap/FingerImpl.java index b9becd8bd..62c4549fb 100644 --- a/src/net/sourceforge/plantuml/mindmap/FingerImpl.java +++ b/src/net/sourceforge/plantuml/mindmap/FingerImpl.java @@ -137,7 +137,7 @@ public class FingerImpl implements Finger, UDrawable { private HColor getLinkColor() { final Style styleArrow = getStyleArrow(); - return styleArrow.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return styleArrow.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } private UStroke getUStroke() { @@ -234,7 +234,7 @@ public class FingerImpl implements Finger, UDrawable { assert idea.getShape() == IdeaShape.NONE; final TextBlock text = idea.getLabel().create0( - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), + style.getFontConfiguration(skinParam.getIHtmlColorSet()), style.getHorizontalAlignment(), skinParam, style.wrapWidth(), CreoleMode.FULL, null, null); if (direction == 1) return TextBlockUtils.withMargin(text, 3, 0, 1, 1); diff --git a/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java b/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java index ec3f12ac0..15a8e910f 100644 --- a/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java +++ b/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -76,8 +75,8 @@ public class MindMapDiagram extends UmlDiagram { return new DiagramDescription("MindMap"); } - public MindMapDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.MINDMAP, null); + public MindMapDiagram(UmlSource source) { + super(source, UmlDiagramType.MINDMAP, null); ((SkinParam) getSkinParam()).setRankdir(Rankdir.LEFT_TO_RIGHT); this.mindmaps.add(new MindMap(getSkinParam())); } diff --git a/src/net/sourceforge/plantuml/mindmap/MindMapDiagramFactory.java b/src/net/sourceforge/plantuml/mindmap/MindMapDiagramFactory.java index 15b66005d..c40c86893 100644 --- a/src/net/sourceforge/plantuml/mindmap/MindMapDiagramFactory.java +++ b/src/net/sourceforge/plantuml/mindmap/MindMapDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandRankDir; import net.sourceforge.plantuml.command.CommonCommands; @@ -70,8 +69,8 @@ public class MindMapDiagramFactory extends PSystemCommandFactory { } @Override - public MindMapDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new MindMapDiagram(style, source); + public MindMapDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new MindMapDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java index 128064490..f7db08448 100644 --- a/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java +++ b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java @@ -48,7 +48,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -97,8 +96,8 @@ public class NwDiagram extends UmlDiagram { return new DiagramDescription("(Nwdiag)"); } - public NwDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.NWDIAG, null); + public NwDiagram(UmlSource source) { + super(source, UmlDiagramType.NWDIAG, null); } public void init() { @@ -286,8 +285,7 @@ public class NwDiagram extends UmlDiagram { final StyleBuilder styleBuilder = getSkinParam().getCurrentStyleBuilder(); final Style style = getStyleDefinitionNetwork(SName.network).getMergedStyle(styleBuilder); - final FontConfiguration fontConfiguration = style.getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(getSkinParam().getIHtmlColorSet()); return Display.getWithNewlines(name).create(fontConfiguration, HorizontalAlignment.RIGHT, new SpriteContainerEmpty()); } @@ -402,7 +400,7 @@ public class NwDiagram extends UmlDiagram { if ("color".equalsIgnoreCase(property)) { final HColor color = value == null ? null - : getSkinParam().getIHtmlColorSet().getColorOrWhite(getSkinParam().getThemeStyle(), value); + : getSkinParam().getIHtmlColorSet().getColorOrWhite(value); if (currentGroup != null) currentGroup.setColor(color); else if (lastNetwork() != null) diff --git a/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java b/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java index 887d727ff..678a630cd 100644 --- a/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java +++ b/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommonCommands; @@ -54,8 +53,8 @@ public class NwDiagramFactory extends PSystemCommandFactory { } @Override - public NwDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new NwDiagram(style, source); + public NwDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new NwDiagram(source); } @Override diff --git a/src/net/sourceforge/plantuml/nwdiag/core/NServer.java b/src/net/sourceforge/plantuml/nwdiag/core/NServer.java index 6a491a576..045b2dd44 100644 --- a/src/net/sourceforge/plantuml/nwdiag/core/NServer.java +++ b/src/net/sourceforge/plantuml/nwdiag/core/NServer.java @@ -104,14 +104,14 @@ public class NServer { private FontConfiguration getFontConfiguration(ISkinParam skinParam, SName sname) { final StyleBuilder styleBuilder = skinParam.getCurrentStyleBuilder(); final Style style = getStyleDefinition(sname).getMergedStyle(styleBuilder); - return style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.getFontConfiguration(skinParam.getIHtmlColorSet()); } public LinkedElement getLinkedElement(double topMargin, Map conns, List networks, ISkinParam skinParam) { final StyleBuilder styleBuilder = skinParam.getCurrentStyleBuilder(); final SymbolContext symbolContext = getStyleDefinition(SName.server).getMergedStyle(styleBuilder) - .getSymbolContext(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + .getSymbolContext(skinParam.getIHtmlColorSet()); final Map conns2 = new LinkedHashMap(); for (Entry ent : conns.entrySet()) diff --git a/src/net/sourceforge/plantuml/nwdiag/core/NwGroup.java b/src/net/sourceforge/plantuml/nwdiag/core/NwGroup.java index b2cec763c..b129e2d54 100644 --- a/src/net/sourceforge/plantuml/nwdiag/core/NwGroup.java +++ b/src/net/sourceforge/plantuml/nwdiag/core/NwGroup.java @@ -151,7 +151,7 @@ public class NwGroup implements NStackable { } HColor color = getColor(); if (color == null) - color = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + color = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); size.draw(ug, color); @@ -167,7 +167,7 @@ public class NwGroup implements NStackable { final StyleBuilder styleBuilder = skinParam.getCurrentStyleBuilder(); final Style style = getStyleDefinition().getMergedStyle(styleBuilder); return Display.getWithNewlines(getDescription()).create( - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), + style.getFontConfiguration(skinParam.getIHtmlColorSet()), HorizontalAlignment.LEFT, skinParam); } diff --git a/src/net/sourceforge/plantuml/nwdiag/next/GridTextBlockDecorated.java b/src/net/sourceforge/plantuml/nwdiag/next/GridTextBlockDecorated.java index 108a78d55..9975a3bf6 100644 --- a/src/net/sourceforge/plantuml/nwdiag/next/GridTextBlockDecorated.java +++ b/src/net/sourceforge/plantuml/nwdiag/next/GridTextBlockDecorated.java @@ -77,8 +77,7 @@ public class GridTextBlockDecorated extends GridTextBlockSimple { private void drawLinks(UGraphic ug, StyleBuilder styleBuilder) { final Style style = getStyleDefinitionNetwork(SName.arrow).getMergedStyle(styleBuilder); - final HColor lineColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor lineColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(lineColor); @@ -151,10 +150,9 @@ public class GridTextBlockDecorated extends GridTextBlockSimple { final StyleBuilder styleBuilder = getSkinParam().getCurrentStyleBuilder(); final Style style = getStyleDefinitionNetwork(SName.network).getMergedStyle(styleBuilder); final double deltaShadow = style.value(PName.Shadowing).asDouble(); - ug2 = ug2.apply(style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet())); + ug2 = ug2.apply(style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet())); ug2 = ug2.apply(style.value(PName.BackGroundColor) - .asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()).bg()); + .asColor(getSkinParam().getIHtmlColorSet()).bg()); rect.setDeltaShadow(deltaShadow); if (network != null && network.getColor() != null) diff --git a/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java b/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java index 2442b2e7d..d970cefe5 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java +++ b/src/net/sourceforge/plantuml/objectdiagram/AbstractClassOrObjectDiagram.java @@ -40,7 +40,6 @@ import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.UmlSource; @@ -60,8 +59,8 @@ import net.sourceforge.plantuml.cucadiagram.NoteLinkStrategy; public abstract class AbstractClassOrObjectDiagram extends AbstractEntityDiagram { - public AbstractClassOrObjectDiagram(ThemeStyle style, UmlSource source, UmlDiagramType type, ISkinSimple orig) { - super(style, source, type, orig); + public AbstractClassOrObjectDiagram(UmlSource source, UmlDiagramType type, ISkinSimple orig) { + super(source, type, orig); } @Override diff --git a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java index f0362ef87..47f65b612 100644 --- a/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java +++ b/src/net/sourceforge/plantuml/objectdiagram/command/CommandCreateEntityObject.java @@ -102,7 +102,7 @@ public class CommandCreateEntityObject extends SingleLineCommand2 diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet())); - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), line0, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); final String s = line0.get("LINECOLOR", 1); final HColor lineColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (lineColor != null) colors = colors.add(ColorType.LINE, lineColor); diff --git a/src/net/sourceforge/plantuml/oregon/PSystemOregonFactory.java b/src/net/sourceforge/plantuml/oregon/PSystemOregonFactory.java index 72e7a548e..63b15619c 100644 --- a/src/net/sourceforge/plantuml/oregon/PSystemOregonFactory.java +++ b/src/net/sourceforge/plantuml/oregon/PSystemOregonFactory.java @@ -35,19 +35,18 @@ */ package net.sourceforge.plantuml.oregon; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.UmlSource; public class PSystemOregonFactory extends PSystemBasicFactory { @Override - public PSystemOregon initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemOregon initDiagram(UmlSource source, String startLine) { return null; } @Override - public PSystemOregon executeLine(ThemeStyle style, UmlSource source, PSystemOregon system, String line) { + public PSystemOregon executeLine(UmlSource source, PSystemOregon system, String line) { if (system == null && line.equalsIgnoreCase("run oregon trail")) return new PSystemOregon(source); diff --git a/src/net/sourceforge/plantuml/project/GanttArrow.java b/src/net/sourceforge/plantuml/project/GanttArrow.java index 4499dbf72..a6cf284b8 100644 --- a/src/net/sourceforge/plantuml/project/GanttArrow.java +++ b/src/net/sourceforge/plantuml/project/GanttArrow.java @@ -109,7 +109,7 @@ public class GanttArrow implements UDrawable { } public void drawU(UGraphic ug) { - ug = style.applyStrokeAndLineColor(ug, colorSet, styleBuilder.getSkinParam().getThemeStyle()); + ug = style.applyStrokeAndLineColor(ug, colorSet); final TaskDraw start = getSource(); final TaskDraw end = getDestination(); @@ -153,7 +153,7 @@ public class GanttArrow implements UDrawable { } ug = ug.apply(new UStroke(1.5)).apply( - style.value(PName.LineColor).asColor(styleBuilder.getSkinParam().getThemeStyle(), colorSet).bg()); + style.value(PName.LineColor).asColor(colorSet).bg()); ug.apply(new UTranslate(x2, y2)).draw(Arrows.asTo(atEnd)); } diff --git a/src/net/sourceforge/plantuml/project/GanttDiagram.java b/src/net/sourceforge/plantuml/project/GanttDiagram.java index d877b4c88..fd0a67d80 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagram.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagram.java @@ -55,7 +55,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.TitledDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.WithSprite; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -163,8 +162,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit this.weekNumberStrategy = new WeekNumberStrategy(firstDayOfWeek, minimalDaysInFirstWeek); } - public GanttDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.GANTT, null); + public GanttDiagram(UmlSource source) { + super(source, UmlDiagramType.GANTT, null); } public final int getDpi(FileFormatOption fileFormatOption) { @@ -225,7 +224,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit .getMergedStyle(getCurrentStyleBuilder()); final HColor back = timelineStyle.value(PName.BackGroundColor) - .asColor(getSkinParam().getThemeStyle(), getIHtmlColorSet()); + .asColor(getIHtmlColorSet()); if (back.isTransparent() == false) { final URectangle rect1 = new URectangle(calculateDimension(ug.getStringBounder()).getWidth(), timeHeader.getTimeHeaderHeight()); @@ -316,9 +315,8 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit } private TimeHeaderParameters thParam() { - return new TimeHeaderParameters(colorDays(), getSkinParam().getThemeStyle(), getFactorScale(), min, max, - getIHtmlColorSet(), getTimelineStyle(), getClosedStyle(), locale, openClose, colorDaysOfWeek, - verticalSeparatorBefore); + return new TimeHeaderParameters(colorDays(), getFactorScale(), min, max, getIHtmlColorSet(), + getTimelineStyle(), getClosedStyle(), locale, openClose, colorDaysOfWeek, verticalSeparatorBefore); } private Map colorDays() { diff --git a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java index b378158fa..51fe95e3b 100644 --- a/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java +++ b/src/net/sourceforge/plantuml/project/GanttDiagramFactory.java @@ -41,7 +41,6 @@ import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandNope; import net.sourceforge.plantuml.command.CommonCommands; @@ -166,8 +165,8 @@ public class GanttDiagramFactory extends PSystemCommandFactory { } @Override - public GanttDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new GanttDiagram(style, source); + public GanttDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new GanttDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java index 19d9af37c..c18f48984 100644 --- a/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java +++ b/src/net/sourceforge/plantuml/project/TimeHeaderParameters.java @@ -39,7 +39,6 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.project.time.Day; import net.sourceforge.plantuml.project.time.DayOfWeek; import net.sourceforge.plantuml.style.Style; @@ -49,7 +48,6 @@ import net.sourceforge.plantuml.ugraphic.color.HColorSet; public class TimeHeaderParameters { private final Map colorDays; - private final ThemeStyle themeStyle; private final double scale; private final Day min; private final Day max; @@ -61,11 +59,10 @@ public class TimeHeaderParameters { private final Map colorDaysOfWeek; private final Set verticalSeparatorBefore; - public TimeHeaderParameters(Map colorDays, ThemeStyle themeStyle, double scale, Day min, Day max, - HColorSet colorSet, Style timelineStyle, Style closedStyle, Locale locale, OpenClose openClose, - Map colorDaysOfWeek, Set verticalSeparatorBefore) { + public TimeHeaderParameters(Map colorDays, double scale, Day min, Day max, HColorSet colorSet, + Style timelineStyle, Style closedStyle, Locale locale, OpenClose openClose, Map colorDaysOfWeek, + Set verticalSeparatorBefore) { this.colorDays = colorDays; - this.themeStyle = themeStyle; this.scale = scale; this.min = min; this.max = max; @@ -86,10 +83,6 @@ public class TimeHeaderParameters { return colorDaysOfWeek.get(dayOfWeek); } - public ThemeStyle getThemeStyle() { - return themeStyle; - } - public final double getScale() { return scale; } diff --git a/src/net/sourceforge/plantuml/project/command/CommandColorTask.java b/src/net/sourceforge/plantuml/project/command/CommandColorTask.java index 5b922052a..7325e696d 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandColorTask.java +++ b/src/net/sourceforge/plantuml/project/command/CommandColorTask.java @@ -75,9 +75,9 @@ public class CommandColorTask extends SingleLineCommand2 { final String color1 = arg.get("COLORS", 0); final String color2 = arg.get("COLORS", 1); final HColor col1 = color1 == null ? null - : diagram.getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), color1); + : diagram.getIHtmlColorSet().getColor(color1); final HColor col2 = color2 == null ? null - : diagram.getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), color2); + : diagram.getIHtmlColorSet().getColor(color2); task.setColors(new CenterBorderColor(col1, col2)); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java index 492971139..b8ee2a897 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java +++ b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow.java @@ -81,7 +81,7 @@ public class CommandGanttArrow extends SingleLineCommand2 { } final GanttConstraint link = diagram.forceTaskOrder(task1, task2); - link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.get("ARROW_STYLE", 0)); + link.applyStyle(arg.get("ARROW_STYLE", 0)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow2.java b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow2.java index a2b839bcb..f86d6b645 100644 --- a/src/net/sourceforge/plantuml/project/command/CommandGanttArrow2.java +++ b/src/net/sourceforge/plantuml/project/command/CommandGanttArrow2.java @@ -80,7 +80,7 @@ public class CommandGanttArrow2 extends SingleLineCommand2 { final Task task2 = diagram.getOrCreateTask(name2, null, false); final GanttConstraint link = diagram.forceTaskOrder(task1, task2); - link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.get("ARROW_STYLE", 0)); + link.applyStyle(arg.get("ARROW_STYLE", 0)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java b/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java index 909723e7b..9836eb74e 100644 --- a/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java +++ b/src/net/sourceforge/plantuml/project/draw/AbstractTaskDraw.java @@ -104,22 +104,22 @@ public abstract class AbstractTaskDraw implements TaskDraw { final protected HColor getLineColor() { final HColor unstarted = getStyleSignatureUnstarted().getMergedStyle(styleBuilder).value(PName.LineColor) - .asColor(getStyleBuilder().getSkinParam().getThemeStyle(), getColorSet()); + .asColor(getColorSet()); final HColor regular = getStyle().value(PName.LineColor) - .asColor(getStyleBuilder().getSkinParam().getThemeStyle(), getColorSet()); + .asColor(getColorSet()); return HColors.unlinear(unstarted, regular, completion); } final protected HColor getBackgroundColor() { final HColor unstarted = getStyleSignatureUnstarted().getMergedStyle(styleBuilder).value(PName.BackGroundColor) - .asColor(getStyleBuilder().getSkinParam().getThemeStyle(), getColorSet()); + .asColor(getColorSet()); final HColor regular = getStyle().value(PName.BackGroundColor) - .asColor(getStyleBuilder().getSkinParam().getThemeStyle(), getColorSet()); + .asColor(getColorSet()); return HColors.unlinear(unstarted, regular, completion); } final protected FontConfiguration getFontConfiguration() { - return getStyle().getFontConfiguration(styleBuilder.getSkinParam().getThemeStyle(), getColorSet()); + return getStyle().getFontConfiguration(getColorSet()); } final protected Style getStyle() { diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java index 36a9da575..bfd9a8028 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawRegular.java @@ -201,16 +201,15 @@ public class TaskDrawRegular extends AbstractTaskDraw { final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.note) .getMergedStyle(getStyleBuilder()); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), getColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getColorSet()); final HorizontalAlignment horizontalAlignment = style.value(PName.HorizontalAlignment).asHorizontalAlignment(); final Sheet sheet = Parser.build(fc, horizontalAlignment, skinParam, CreoleMode.FULL).createSheet(note); final double padding = style.value(PName.Padding).asDouble(); final SheetBlock1 sheet1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, padding); - final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - getColorSet()); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), getColorSet()); + final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); return new Opale(shadowing, borderColor, noteBackgroundColor, sheet1, false, style.getStroke()); @@ -283,7 +282,7 @@ public class TaskDrawRegular extends AbstractTaskDraw { final HColor backUndone = StyleSignatureBasic.of(SName.root, SName.element, SName.ganttDiagram, SName.undone) .getMergedStyle(getStyleBuilder()).value(PName.BackGroundColor) - .asColor(skinParam.getThemeStyle(), getColorSet()); + .asColor(getColorSet()); final RectangleTask rectangleTask = new RectangleTask(startPos, endPos, round, getCompletion(), off); diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawSeparator.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawSeparator.java index 175dade9f..0065f1646 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawSeparator.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawSeparator.java @@ -123,7 +123,7 @@ public class TaskDrawSeparator implements TaskDraw { } private FontConfiguration getFontConfiguration() { - return getStyle().getFontConfiguration(styleBuilder.getSkinParam().getThemeStyle(), colorSet); + return getStyle().getFontConfiguration(colorSet); } @Override @@ -139,7 +139,7 @@ public class TaskDrawSeparator implements TaskDraw { ug = ug.apply(new UTranslate(0, margin.getTop())); final HColor backColor = getStyle().value(PName.BackGroundColor) - .asColor(styleBuilder.getSkinParam().getThemeStyle(), colorSet); + .asColor(colorSet); if (backColor.isTransparent() == false) { final double height = padding.getTop() + getTextHeight(stringBounder) + padding.getBottom(); @@ -149,8 +149,7 @@ public class TaskDrawSeparator implements TaskDraw { } } - final HColor lineColor = getStyle().value(PName.LineColor).asColor(styleBuilder.getSkinParam().getThemeStyle(), - colorSet); + final HColor lineColor = getStyle().value(PName.LineColor).asColor(colorSet); ug = ug.apply(lineColor); ug = ug.apply(UTranslate.dy(padding.getTop() + getTextHeight(stringBounder) / 2)); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java index a97d7f55e..1a7a29de8 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeader.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeader.java @@ -38,7 +38,6 @@ package net.sourceforge.plantuml.project.draw; import java.util.Objects; import net.sourceforge.plantuml.SpriteContainerEmpty; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; @@ -72,36 +71,33 @@ public abstract class TimeHeader { private final Style timelineStyle; private final HColorSet colorSet; - private final ThemeStyle themeStyle; protected final Day min; protected final Day max; - public TimeHeader(Style timelineStyle, Style closedStyle, Day min, Day max, TimeScale timeScale, HColorSet colorSet, - ThemeStyle themeStyle) { + public TimeHeader(Style timelineStyle, Style closedStyle, Day min, Day max, TimeScale timeScale, HColorSet colorSet) { this.timeScale = timeScale; this.min = min; this.max = max; this.closedStyle = Objects.requireNonNull(closedStyle); this.timelineStyle = Objects.requireNonNull(timelineStyle); this.colorSet = colorSet; - this.themeStyle = themeStyle; } protected final HColor closedBackgroundColor() { - return closedStyle.value(PName.BackGroundColor).asColor(themeStyle, colorSet); + return closedStyle.value(PName.BackGroundColor).asColor(colorSet); } protected final HColor closedFontColor() { - return closedStyle.value(PName.FontColor).asColor(themeStyle, colorSet); + return closedStyle.value(PName.FontColor).asColor(colorSet); } protected final HColor openFontColor() { - return timelineStyle.value(PName.FontColor).asColor(themeStyle, colorSet); + return timelineStyle.value(PName.FontColor).asColor(colorSet); } protected final HColor getBarColor() { - return timelineStyle.value(PName.LineColor).asColor(themeStyle, colorSet); + return timelineStyle.value(PName.LineColor).asColor(colorSet); } public abstract double getTimeHeaderHeight(); diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java index 94c0aa3cf..e3de7ce9b 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderCalendar.java @@ -49,7 +49,7 @@ public abstract class TimeHeaderCalendar extends TimeHeader { public TimeHeaderCalendar(TimeHeaderParameters thParam, TimeScale timeScale) { super(thParam.getTimelineStyle(), thParam.getClosedStyle(), thParam.getMin(), thParam.getMax(), timeScale, - thParam.getColorSet(), thParam.getThemeStyle()); + thParam.getColorSet()); this.thParam = thParam; } diff --git a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java index 98d512213..c7ec2f1e0 100644 --- a/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java +++ b/src/net/sourceforge/plantuml/project/draw/TimeHeaderSimple.java @@ -76,7 +76,7 @@ public class TimeHeaderSimple extends TimeHeader { public TimeHeaderSimple(TimeHeaderParameters thParam, PrintScale printScale) { super(thParam.getTimelineStyle(), thParam.getClosedStyle(), thParam.getMin(), thParam.getMax(), - new TimeScaleWink(thParam.getScale(), printScale), thParam.getColorSet(), thParam.getThemeStyle()); + new TimeScaleWink(thParam.getScale(), printScale), thParam.getColorSet()); this.colorDays = thParam; this.printScale = printScale; this.verticalSeparators = thParam.getVerticalSeparatorBefore(); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java index 929739536..3de479be6 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColors.java @@ -52,9 +52,9 @@ public class ComplementInColors implements Something { final String color1 = arg.get("COMPLEMENT" + suffix, 0); final String color2 = arg.get("COMPLEMENT" + suffix, 1); final HColor col1 = color1 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), color1); + : diagram.getIHtmlColorSet().getColorOrWhite(color1); final HColor col2 = color2 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), color2); + : diagram.getIHtmlColorSet().getColorOrWhite(color2); return Failable.ok(new CenterBorderColor(col1, col2)); } } diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java index a057ac504..1cec5f531 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColors2.java @@ -52,9 +52,9 @@ public class ComplementInColors2 implements Something { final String color1 = arg.get("COMPLEMENT" + suffix, 0); final String color2 = arg.get("COMPLEMENT" + suffix, 1); final HColor col1 = color1 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), color1); + : diagram.getIHtmlColorSet().getColorOrWhite(color1); final HColor col2 = color2 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), color2); + : diagram.getIHtmlColorSet().getColorOrWhite(color2); return Failable.ok(new CenterBorderColor(col1, col2)); } diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java b/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java index ac38aef3e..a59a6527e 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementInColorsFromTo.java @@ -55,13 +55,13 @@ public class ComplementInColorsFromTo implements Something { final String arg2 = arg.get("COMPLEMENT" + suffix, 2); final String arg3 = arg.get("COMPLEMENT" + suffix, 3); final HColor from0 = arg0 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), arg0); + : diagram.getIHtmlColorSet().getColorOrWhite(arg0); final HColor from1 = arg1 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), arg1); + : diagram.getIHtmlColorSet().getColorOrWhite(arg1); final HColor to0 = arg2 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), arg2); + : diagram.getIHtmlColorSet().getColorOrWhite(arg2); final HColor to1 = arg3 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), arg3); + : diagram.getIHtmlColorSet().getColorOrWhite(arg3); final CenterBorderColor result[] = new CenterBorderColor[] { new CenterBorderColor(from0, from1), new CenterBorderColor(to0, to1) }; return Failable.ok(result); diff --git a/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java b/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java index eee90fe78..82e5c099e 100644 --- a/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java +++ b/src/net/sourceforge/plantuml/project/lang/ComplementWithColorLink.java @@ -55,7 +55,7 @@ public class ComplementWithColorLink implements Something { final String color1 = arg.get("COMPLEMENT" + suffix, 1); final String style2 = arg.get("COMPLEMENT" + suffix, 2); final HColor col1 = color1 == null ? null - : diagram.getIHtmlColorSet().getColorOrWhite(diagram.getSkinParam().getThemeStyle(), color1); + : diagram.getIHtmlColorSet().getColorOrWhite(color1); final String style = style0 == null ? style2 : style0; return Failable.ok(new CenterBorderColor(col1, col1, style)); } diff --git a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java index f60cea8bd..ed9c75f72 100644 --- a/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java +++ b/src/net/sourceforge/plantuml/project/lang/SentenceTaskStartsWithColor.java @@ -64,7 +64,7 @@ public class SentenceTaskStartsWithColor extends SentenceSimple { final HColor color = complement22.getCenter(); final GanttConstraint link = new GanttConstraint(diagram.getIHtmlColorSet(), diagram.getCurrentStyleBuilder(), when, new TaskInstant(task, TaskAttribute.START), color); - link.applyStyle(diagram.getSkinParam().getThemeStyle(), complement22.getStyle()); + link.applyStyle(complement22.getStyle()); diagram.addContraint(link); } return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/salt/Dictionary.java b/src/net/sourceforge/plantuml/salt/Dictionary.java index 842dc9da1..ad4028c66 100644 --- a/src/net/sourceforge/plantuml/salt/Dictionary.java +++ b/src/net/sourceforge/plantuml/salt/Dictionary.java @@ -43,13 +43,11 @@ import net.sourceforge.plantuml.Guillemet; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.SpriteContainer; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.creole.Parser; import net.sourceforge.plantuml.salt.element.Element; import net.sourceforge.plantuml.salt.element.WrappedElement; import net.sourceforge.plantuml.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColorSet; public class Dictionary implements SpriteContainer, ISkinSimple { @@ -109,7 +107,7 @@ public class Dictionary implements SpriteContainer, ISkinSimple { } public ColorMapper getColorMapper() { - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; } public void copyAllFrom(ISkinSimple other) { @@ -128,8 +126,4 @@ public class Dictionary implements SpriteContainer, ISkinSimple { return s; } - public ThemeStyle getThemeStyle() { - return ThemeStyle.LIGHT_REGULAR; - } - } diff --git a/src/net/sourceforge/plantuml/salt/PSystemSalt.java b/src/net/sourceforge/plantuml/salt/PSystemSalt.java index b915445ca..06c9a4f22 100644 --- a/src/net/sourceforge/plantuml/salt/PSystemSalt.java +++ b/src/net/sourceforge/plantuml/salt/PSystemSalt.java @@ -50,7 +50,6 @@ import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.WithSprite; import net.sourceforge.plantuml.api.ImageDataSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.BlocLines; @@ -98,13 +97,13 @@ public class PSystemSalt extends TitledDiagram implements WithSprite { private final Dictionary dictionary = new Dictionary(); @Deprecated - public PSystemSalt(ThemeStyle style, UmlSource source, List data) { - super(style, source, UmlDiagramType.SALT, null); + public PSystemSalt(UmlSource source, List data) { + super(source, UmlDiagramType.SALT, null); this.data = data; } - public PSystemSalt(ThemeStyle style, UmlSource source) { - this(style, source, new ArrayList()); + public PSystemSalt(UmlSource source) { + this(source, new ArrayList()); } public void add(String s) { diff --git a/src/net/sourceforge/plantuml/salt/PSystemSaltFactory.java b/src/net/sourceforge/plantuml/salt/PSystemSaltFactory.java index 7818827c2..4d8442655 100644 --- a/src/net/sourceforge/plantuml/salt/PSystemSaltFactory.java +++ b/src/net/sourceforge/plantuml/salt/PSystemSaltFactory.java @@ -36,7 +36,6 @@ package net.sourceforge.plantuml.salt; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; @@ -48,11 +47,11 @@ public class PSystemSaltFactory extends PSystemBasicFactory { } @Override - public PSystemSalt initDiagram(ThemeStyle style, UmlSource source, String startLine) { + public PSystemSalt initDiagram(UmlSource source, String startLine) { if (getDiagramType() == DiagramType.UML) { return null; } else if (getDiagramType() == DiagramType.SALT) { - return new PSystemSalt(style, source); + return new PSystemSalt(source); } else { throw new IllegalStateException(getDiagramType().name()); } @@ -60,9 +59,9 @@ public class PSystemSaltFactory extends PSystemBasicFactory { } @Override - public PSystemSalt executeLine(ThemeStyle style, UmlSource source, PSystemSalt system, String line) { + public PSystemSalt executeLine(UmlSource source, PSystemSalt system, String line) { if (system == null && line.replace('\t', ' ').trim().equals("salt")) { - return new PSystemSalt(style, source); + return new PSystemSalt(source); } if (system == null) { return null; diff --git a/src/net/sourceforge/plantuml/salt/PSystemSaltFactory2.java b/src/net/sourceforge/plantuml/salt/PSystemSaltFactory2.java index bf579170f..2e2bfb470 100644 --- a/src/net/sourceforge/plantuml/salt/PSystemSaltFactory2.java +++ b/src/net/sourceforge/plantuml/salt/PSystemSaltFactory2.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -67,8 +66,8 @@ public class PSystemSaltFactory2 extends PSystemCommandFactory { } @Override - public PSystemSalt createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - final PSystemSalt result = new PSystemSalt(style, source); + public PSystemSalt createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + final PSystemSalt result = new PSystemSalt(source); if (getDiagramType() == DiagramType.SALT) { result.setIamSalt(true); } diff --git a/src/net/sourceforge/plantuml/salt/element/AbstractElement.java b/src/net/sourceforge/plantuml/salt/element/AbstractElement.java index f65cd4400..b584cf75f 100644 --- a/src/net/sourceforge/plantuml/salt/element/AbstractElement.java +++ b/src/net/sourceforge/plantuml/salt/element/AbstractElement.java @@ -72,8 +72,8 @@ public abstract class AbstractElement implements Element { } private HColor buildColor(String color1, String color2) { - final HColor tmp1 = HColorSet.instance().getColorOrWhite(null, color1); - final HColor tmp2 = HColorSet.instance().getColorOrWhite(null, color2); + final HColor tmp1 = HColorSet.instance().getColorOrWhite(color1); + final HColor tmp2 = HColorSet.instance().getColorOrWhite(color2); return tmp1.withDark(tmp2); } diff --git a/src/net/sourceforge/plantuml/sdot/SmetanaPath.java b/src/net/sourceforge/plantuml/sdot/SmetanaPath.java index adb39a71a..6d65468dc 100644 --- a/src/net/sourceforge/plantuml/sdot/SmetanaPath.java +++ b/src/net/sourceforge/plantuml/sdot/SmetanaPath.java @@ -94,7 +94,7 @@ public class SmetanaPath implements UDrawable { HColor color = StyleSignatureBasic .of(SName.root, SName.element, diagram.getUmlDiagramType().getStyleName(), SName.arrow) .getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()).value(PName.LineColor) - .asColor(diagram.getSkinParam().getThemeStyle(), diagram.getSkinParam().getIHtmlColorSet()); + .asColor(diagram.getSkinParam().getIHtmlColorSet()); if (this.link.getColors() != null) { final HColor newColor = this.link.getColors().getColor(ColorType.ARROW, ColorType.LINE); diff --git a/src/net/sourceforge/plantuml/sequencediagram/LinkAnchor.java b/src/net/sourceforge/plantuml/sequencediagram/LinkAnchor.java index e89a73483..bb5b93f15 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/LinkAnchor.java +++ b/src/net/sourceforge/plantuml/sequencediagram/LinkAnchor.java @@ -94,8 +94,7 @@ public class LinkAnchor { SName.arrow); final Style style = signature.getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final FontConfiguration fontConfiguration = FontConfiguration.create(skinParam, style); final Rainbow rainbow = Rainbow.fromColor(color, null); diff --git a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java index de0e7ec5a..3fee4df56 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java +++ b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java @@ -55,7 +55,6 @@ import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -95,8 +94,8 @@ public class SequenceDiagram extends UmlDiagram { private final Rose skin2 = new Rose(); - public SequenceDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.SEQUENCE, skinParam); + public SequenceDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.SEQUENCE, skinParam); } @Deprecated diff --git a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagramFactory.java b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagramFactory.java index d2d19e64f..750ff0843 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagramFactory.java +++ b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -85,8 +84,8 @@ import net.sourceforge.plantuml.sequencediagram.command.CommandUrl; public class SequenceDiagramFactory extends PSystemCommandFactory { @Override - public SequenceDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new SequenceDiagram(style, source, skinParam); + public SequenceDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new SequenceDiagram(source, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate.java index c62d4629d..ccedcf7e7 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate.java @@ -78,10 +78,10 @@ public class CommandActivate extends SingleLineCommand2 { .getOrCreateParticipant(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("WHO", 0))); final String back = arg.get("BACK", 0); final HColor backColor = back == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), back); + : diagram.getSkinParam().getIHtmlColorSet().getColor(back); final String line = arg.get("LINE", 0); final HColor lineColor = line == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), line); + : diagram.getSkinParam().getIHtmlColorSet().getColor(line); final String error = diagram.activate(p, type, backColor, lineColor); if (error == null) { return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate2.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate2.java index 75681d6dc..1e1d59380 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate2.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandActivate2.java @@ -70,7 +70,7 @@ public class CommandActivate2 extends SingleLineCommand2 { final Participant p = diagram.getOrCreateParticipant(arg.get("NAME", 0)); final String s = arg.get("COLOR", 0); final String error = diagram.activate(p, type, s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s)); if (error == null) { return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java index 6ba4b34e5..e3575fbfb 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlMode; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; @@ -287,7 +286,7 @@ public class CommandArrow extends SingleLineCommand2 { if (reverseDefine) config = config.reverseDefine(); - config = applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0), config); + config = applyStyle(arg.getLazzy("ARROW_STYLE", 0), config); config = config.withInclination(inclination1 + inclination2); @@ -327,7 +326,7 @@ public class CommandArrow extends SingleLineCommand2 { final String s = arg.get("LIFECOLOR", 0); final HColor activationColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (activationSpec != null) return manageActivations(activationSpec, diagram, p1, p2, activationColor); @@ -379,7 +378,7 @@ public class CommandArrow extends SingleLineCommand2 { return sa.length() + sb.length(); } - public static ArrowConfiguration applyStyle(ThemeStyle themeStyle, String arrowStyle, ArrowConfiguration config) + public static ArrowConfiguration applyStyle(String arrowStyle, ArrowConfiguration config) throws NoSuchColorException { if (arrowStyle == null) return config; @@ -395,7 +394,7 @@ public class CommandArrow extends SingleLineCommand2 { } else if (s.equalsIgnoreCase("hidden")) { config = config.withBody(ArrowBody.HIDDEN); } else { - config = config.withColor(HColorSet.instance().getColor(themeStyle, s)); + config = config.withColor(HColorSet.instance().getColor(s)); } } return config; diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java index 02d292399..c06b313b0 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandBoxStart.java @@ -95,8 +95,7 @@ public class CommandBoxStart extends SingleLineCommand2 { stereotype = Stereotype.build(stereo); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String title = argTitle == null ? "" : argTitle; diagram.boxStart(Display.getWithNewlines(title), colors.getColor(ColorType.BACK), stereotype); return CommandExecutionResult.ok(); diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandExoArrowAny.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandExoArrowAny.java index d31b73d57..0ba31ab2f 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandExoArrowAny.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandExoArrowAny.java @@ -97,8 +97,7 @@ abstract class CommandExoArrowAny extends SingleLineCommand2 { final MessageExoType messageExoType = getMessageExoType(arg); config = config.withPart(getArrowPart(dressing, messageExoType)); - config = CommandArrow.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0), - config); + config = CommandArrow.applyStyle(arg.getLazzy("ARROW_STYLE", 0), config); final String activationSpec = arg.get("ACTIVATION", 0); @@ -156,7 +155,7 @@ abstract class CommandExoArrowAny extends SingleLineCommand2 { final String s = arg.get("LIFECOLOR", 0); final HColor activationColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (activationSpec != null) { switch (activationSpec.charAt(0)) { diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandGrouping.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandGrouping.java index 7815b7a28..dbf1e1824 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandGrouping.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandGrouping.java @@ -79,12 +79,12 @@ public class CommandGrouping extends SingleLineCommand2 { final HColorSet colorSet = diagram.getSkinParam().getIHtmlColorSet(); HColor backColorElement = null; if (s != null) { - backColorElement = colorSet.getColor(diagram.getSkinParam().getThemeStyle(), s); + backColorElement = colorSet.getColor(s); } final String s2 = arg.get("COLORS", 1); HColor backColorGeneral = null; if (s2 != null) { - backColorGeneral = colorSet.getColor(diagram.getSkinParam().getThemeStyle(), s2); + backColorGeneral = colorSet.getColor(s2); } String comment = arg.get("COMMENT", 0); final GroupingType groupingType = GroupingType.getType(type); diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipant.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipant.java index 24959e81c..a5812ff0f 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipant.java +++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandParticipant.java @@ -124,7 +124,7 @@ public abstract class CommandParticipant extends SingleLineCommand2 { ArrowConfiguration arrow = message1.getArrowConfiguration().withBody(ArrowBody.DOTTED); final String color = arg.get("COLOR", 0); if (color != null) - arrow = arrow.withColor(HColorSet.instance().getColor(diagram.getSkinParam().getThemeStyle(), color)); + arrow = arrow.withColor(HColorSet.instance().getColor(color)); final Display display = Display.getWithNewlines(arg.get("MESSAGE", 0)); final AbstractMessage message2; diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileNoteBottomTopAbstract.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileNoteBottomTopAbstract.java index 616f20656..c11c8b534 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileNoteBottomTopAbstract.java +++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileNoteBottomTopAbstract.java @@ -126,8 +126,7 @@ public abstract class CommunicationTileNoteBottomTopAbstract extends AbstractTil final Style style = StyleSignatureBasic.of(SName.root, SName.element, SName.sequenceDiagram) .getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final double dx = x2 - x1; final double dy = y2 - y1; diff --git a/src/net/sourceforge/plantuml/skin/AbstractTextualComponent.java b/src/net/sourceforge/plantuml/skin/AbstractTextualComponent.java index 5388cdef5..13db396a7 100644 --- a/src/net/sourceforge/plantuml/skin/AbstractTextualComponent.java +++ b/src/net/sourceforge/plantuml/skin/AbstractTextualComponent.java @@ -82,13 +82,12 @@ public abstract class AbstractTextualComponent extends AbstractComponent { super(style); this.spriteContainer = spriteContainer; - final FontConfiguration fc = style.getFontConfiguration(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(getIHtmlColorSet()); this.font = style.getUFont(); - this.fontColor = style.value(PName.FontColor).asColor(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + this.fontColor = style.value(PName.FontColor).asColor(getIHtmlColorSet()); final HorizontalAlignment horizontalAlignment = style.getHorizontalAlignment(); final UFont fontForStereotype = stereo.getUFont(); - final HColor htmlColorForStereotype = stereo.value(PName.FontColor).asColor(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); + final HColor htmlColorForStereotype = stereo.value(PName.FontColor).asColor(getIHtmlColorSet()); display = display.withoutStereotypeIfNeeded(style); this.marginX1 = marginX1; diff --git a/src/net/sourceforge/plantuml/skin/rose/AbstractComponentRoseArrow.java b/src/net/sourceforge/plantuml/skin/rose/AbstractComponentRoseArrow.java index e0735be4f..1197eceaf 100644 --- a/src/net/sourceforge/plantuml/skin/rose/AbstractComponentRoseArrow.java +++ b/src/net/sourceforge/plantuml/skin/rose/AbstractComponentRoseArrow.java @@ -61,8 +61,7 @@ public abstract class AbstractComponentRoseArrow extends AbstractTextualComponen ISkinSimple spriteContainer, LineBreakStrategy maxMessageSize) { super(style, maxMessageSize, 7, 7, 1, spriteContainer, stringsToDisplay, false); - this.foregroundColor = style.value(PName.LineColor).asColor(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); + this.foregroundColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); final UStroke stroke = style.getStroke(); this.arrowConfiguration = arrowConfiguration.withThickness(stroke.getThickness()); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActiveLine.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActiveLine.java index 6e23f3f2b..38e3497de 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActiveLine.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActiveLine.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.skin.rose; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; @@ -54,10 +53,9 @@ public class ComponentRoseActiveLine extends AbstractComponent { private final boolean closeUp; private final boolean closeDown; - public ComponentRoseActiveLine(ThemeStyle themeStyle, Style style, boolean closeUp, boolean closeDown, - HColorSet set) { + public ComponentRoseActiveLine(Style style, boolean closeUp, boolean closeDown, HColorSet set) { super(style); - this.symbolContext = style.getSymbolContext(themeStyle, set); + this.symbolContext = style.getSymbolContext(set); this.closeUp = closeUp; this.closeDown = closeDown; } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActor.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActor.java index 4de8a4ba2..08983f000 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActor.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseActor.java @@ -58,7 +58,7 @@ public class ComponentRoseActor extends AbstractTextualComponent { ISkinSimple spriteContainer) { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); this.head = head; - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.stickman = actorStyle.getTextBlock(biColor); } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseBoundary.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseBoundary.java index 6ff01eab2..9fd56f350 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseBoundary.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseBoundary.java @@ -57,7 +57,7 @@ public class ComponentRoseBoundary extends AbstractTextualComponent { public ComponentRoseBoundary(Style style, Style stereo, Display stringsToDisplay, boolean head, ISkinSimple spriteContainer) { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.head = head; this.stickman = new Boundary(biColor); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseControl.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseControl.java index e067b8b79..89edeab48 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseControl.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseControl.java @@ -58,7 +58,7 @@ public class ComponentRoseControl extends AbstractTextualComponent { ISkinSimple spriteContainer) { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.head = head; this.stickman = new Control(biColor); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDatabase.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDatabase.java index ba309d4e4..af9f8c576 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDatabase.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDatabase.java @@ -62,7 +62,7 @@ public class ComponentRoseDatabase extends AbstractTextualComponent { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); this.head = head; - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); final SymbolContext symbolContext = new SymbolContext(biColor.getBackColor(), biColor.getForeColor()) .withStroke(new UStroke(1.5)).withShadow(biColor.getDeltaShadow()); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDestroy.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDestroy.java index c3e1012b6..aad378684 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDestroy.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDestroy.java @@ -54,8 +54,7 @@ public class ComponentRoseDestroy extends AbstractComponent { public ComponentRoseDestroy(Style style, HColor foregroundColor, ISkinSimple spriteContainer) { super(style); if (style != null) - this.foregroundColor = style.value(PName.LineColor).asColor(spriteContainer.getThemeStyle(), - spriteContainer.getIHtmlColorSet()); + this.foregroundColor = style.value(PName.LineColor).asColor(spriteContainer.getIHtmlColorSet()); else this.foregroundColor = foregroundColor; } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDivider.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDivider.java index b9a444375..3c39a8bcb 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDivider.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseDivider.java @@ -66,9 +66,8 @@ public class ComponentRoseDivider extends AbstractTextualComponent { public ComponentRoseDivider(Style style, Display stringsToDisplay, ISkinSimple spriteContainer) { super(style, LineBreakStrategy.NONE, 4, 4, 4, spriteContainer, stringsToDisplay, false); - this.background = style.value(PName.BackGroundColor).asColor(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); - this.borderColor = style.value(PName.LineColor).asColor(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + this.background = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); this.stroke = style.getStroke(); this.roundCorner = style.value(PName.RoundCorner).asInt(); this.shadow = style.value(PName.Shadowing).asDouble(); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEnglober.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEnglober.java index 2103bb0bd..bc66b1d95 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEnglober.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEnglober.java @@ -57,7 +57,7 @@ public class ComponentRoseEnglober extends AbstractTextualComponent { public ComponentRoseEnglober(Style style, Display strings, ISkinSimple spriteContainer) { super(style, LineBreakStrategy.NONE, 3, 3, 1, spriteContainer, strings, false); this.roundCorner = style.value(PName.RoundCorner).asDouble(); - this.symbolContext = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + this.symbolContext = style.getSymbolContext(getIHtmlColorSet()); } @Override diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEntity.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEntity.java index ced24a443..a0cd930d0 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEntity.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseEntity.java @@ -58,7 +58,7 @@ public class ComponentRoseEntity extends AbstractTextualComponent { ISkinSimple spriteContainer) { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.head = head; this.stickman = new EntityDomain(biColor); diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingElse.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingElse.java index 4237e4b43..0a8abc970 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingElse.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingElse.java @@ -64,9 +64,8 @@ public class ComponentRoseGroupingElse extends AbstractTextualComponent { super(style, LineBreakStrategy.NONE, 5, 5, 1, spriteContainer, comment == null ? null : "[" + comment + "]"); this.roundCorner = style.value(PName.RoundCorner).asInt(); - this.groupBorder = style.value(PName.LineColor).asColor(spriteContainer.getThemeStyle(), getIHtmlColorSet()); - this.backgroundColor = style.value(PName.BackGroundColor).asColor(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); + this.groupBorder = style.value(PName.LineColor).asColor(getIHtmlColorSet()); + this.backgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); } @Override diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingHeader.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingHeader.java index fcddc0224..6db4680f3 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingHeader.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseGroupingHeader.java @@ -73,13 +73,11 @@ public class ComponentRoseGroupingHeader extends AbstractTextualComponent { super(styleHeader, LineBreakStrategy.NONE, 15, 30, 1, spriteContainer, strings.get(0)); this.roundCorner = style.value(PName.RoundCorner).asInt(); - this.background = style.value(PName.BackGroundColor).asColor(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); - this.symbolContext = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); - this.symbolContextCorner = styleHeader.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + this.background = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); + this.symbolContext = style.getSymbolContext(getIHtmlColorSet()); + this.symbolContextCorner = styleHeader.getSymbolContext(getIHtmlColorSet()); - final FontConfiguration smallFont2 = style.getFontConfiguration(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); + final FontConfiguration smallFont2 = style.getFontConfiguration(getIHtmlColorSet()); if (strings.size() == 1 || strings.get(1) == null) { this.commentTextBlock = null; diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseLine.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseLine.java index 0a85c277d..96aa96590 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseLine.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseLine.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.skin.rose; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.AbstractComponent; @@ -55,9 +54,9 @@ public class ComponentRoseLine extends AbstractComponent { private final boolean continueLine; private final UStroke stroke; - public ComponentRoseLine(ThemeStyle themeStyle, Style style, boolean continueLine, HColorSet set) { + public ComponentRoseLine(Style style, boolean continueLine, HColorSet set) { super(style); - this.color = style.value(PName.LineColor).asColor(themeStyle, set); + this.color = style.value(PName.LineColor).asColor(set); this.stroke = style.getStroke(); this.continueLine = continueLine; } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java index d0f6aa6f3..de9e6df90 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java @@ -69,7 +69,7 @@ final public class ComponentRoseNote extends AbstractTextualComponent implements this.paddingX = paddingX; this.paddingY = paddingY; this.position = position; - this.symbolContext = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet(), colors); + this.symbolContext = style.getSymbolContext(getIHtmlColorSet(), colors); this.roundCorner = style.value(PName.RoundCorner).asInt(); } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java index 5ddf85a30..0423b03d0 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java @@ -57,7 +57,7 @@ final public class ComponentRoseNoteBox extends AbstractTextualComponent { public ComponentRoseNoteBox(Style style, Display strings, ISkinSimple spriteContainer, Colors colors) { super(style, spriteContainer.wrapWidth(), 4, 4, 4, spriteContainer, strings, false); - this.symbolContext = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet(), colors); + this.symbolContext = style.getSymbolContext(getIHtmlColorSet(), colors); this.roundCorner = style.value(PName.RoundCorner).asInt(); } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java index cd62c9186..18b6e8411 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java @@ -56,7 +56,7 @@ final public class ComponentRoseNoteHexagonal extends AbstractTextualComponent { public ComponentRoseNoteHexagonal(Style style, Display strings, ISkinSimple spriteContainer, Colors colors) { super(style, spriteContainer.wrapWidth(), 12, 12, 4, spriteContainer, strings, false); - this.symbolContext = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet(), colors); + this.symbolContext = style.getSymbolContext(getIHtmlColorSet(), colors); } diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseParticipant.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseParticipant.java index a40f8365c..410eb1e81 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseParticipant.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseParticipant.java @@ -70,7 +70,7 @@ public class ComponentRoseParticipant extends AbstractTextualComponent { this.roundCorner = style.value(PName.RoundCorner).asInt(); this.diagonalCorner = style.value(PName.DiagonalCorner).asInt(); - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.stroke = style.getStroke(); this.padding = padding; diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseQueue.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseQueue.java index 106475a68..edb51e878 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseQueue.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseQueue.java @@ -60,7 +60,7 @@ public class ComponentRoseQueue extends AbstractTextualComponent { boolean head, ISkinSimple spriteContainer) { super(style, stereo, LineBreakStrategy.NONE, 3, 3, 0, spriteContainer, stringsToDisplay, false); - final SymbolContext biColor = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + final SymbolContext biColor = style.getSymbolContext(getIHtmlColorSet()); this.head = head; this.stickman = USymbols.QUEUE.asSmall(TextBlockUtils.empty(0, 0), getTextBlock(), TextBlockUtils.empty(0, 0), diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseReference.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseReference.java index eb206ec3c..68c12f2a0 100644 --- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseReference.java +++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseReference.java @@ -71,11 +71,10 @@ public class ComponentRoseReference extends AbstractTextualComponent { super(style, LineBreakStrategy.NONE, 4, 4, 4, spriteContainer, stringsToDisplay.subList(1, stringsToDisplay.size()), false); - this.symbolContextHeader = styleHeader.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); - this.symbolContextBody = style.getSymbolContext(spriteContainer.getThemeStyle(), getIHtmlColorSet()); + this.symbolContextHeader = styleHeader.getSymbolContext(getIHtmlColorSet()); + this.symbolContextBody = style.getSymbolContext(getIHtmlColorSet()); this.roundCorner = style.value(PName.RoundCorner).asInt(); - final FontConfiguration fcHeader = styleHeader.getFontConfiguration(spriteContainer.getThemeStyle(), - getIHtmlColorSet()); + final FontConfiguration fcHeader = styleHeader.getFontConfiguration(getIHtmlColorSet()); this.position = style.getHorizontalAlignment(); this.textHeader = stringsToDisplay.subList(0, 1).create(fcHeader, HorizontalAlignment.LEFT, spriteContainer); diff --git a/src/net/sourceforge/plantuml/skin/rose/Rose.java b/src/net/sourceforge/plantuml/skin/rose/Rose.java index 75c632a8f..07a9425de 100644 --- a/src/net/sourceforge/plantuml/skin/rose/Rose.java +++ b/src/net/sourceforge/plantuml/skin/rose/Rose.java @@ -149,12 +149,10 @@ public class Rose { stringsToDisplay, param, param.minClassWidth(), true, padding); if (type == ComponentType.PARTICIPANT_LINE) - return new ComponentRoseLine(param.getThemeStyle(), styles == null ? null : styles[0], false, - param.getIHtmlColorSet()); + return new ComponentRoseLine(styles == null ? null : styles[0], false, param.getIHtmlColorSet()); if (type == ComponentType.CONTINUE_LINE) - return new ComponentRoseLine(param.getThemeStyle(), styles == null ? null : styles[0], true, - param.getIHtmlColorSet()); + return new ComponentRoseLine(styles == null ? null : styles[0], true, param.getIHtmlColorSet()); if (type == ComponentType.ACTOR_HEAD) return new ComponentRoseActor(param.actorStyle(), styles == null ? null : styles[0], @@ -224,20 +222,16 @@ public class Rose { return new ComponentRoseGroupingSpace(7); if (type == ComponentType.ALIVE_BOX_CLOSE_CLOSE) - return new ComponentRoseActiveLine(param.getThemeStyle(), styles == null ? null : styles[0], true, true, - param.getIHtmlColorSet()); + return new ComponentRoseActiveLine(styles == null ? null : styles[0], true, true, param.getIHtmlColorSet()); if (type == ComponentType.ALIVE_BOX_CLOSE_OPEN) - return new ComponentRoseActiveLine(param.getThemeStyle(), styles == null ? null : styles[0], true, false, - param.getIHtmlColorSet()); + return new ComponentRoseActiveLine(styles == null ? null : styles[0], true, false, param.getIHtmlColorSet()); if (type == ComponentType.ALIVE_BOX_OPEN_CLOSE) { - return new ComponentRoseActiveLine(param.getThemeStyle(), styles == null ? null : styles[0], false, true, - param.getIHtmlColorSet()); + return new ComponentRoseActiveLine(styles == null ? null : styles[0], false, true, param.getIHtmlColorSet()); } if (type == ComponentType.ALIVE_BOX_OPEN_OPEN) - return new ComponentRoseActiveLine(param.getThemeStyle(), styles == null ? null : styles[0], false, false, - param.getIHtmlColorSet()); + return new ComponentRoseActiveLine(styles == null ? null : styles[0], false, false, param.getIHtmlColorSet()); if (type == ComponentType.DELAY_LINE) return new ComponentRoseDelayLine(null, getHtmlColor(param, stereotype, ColorParam.sequenceLifeLineBorder)); diff --git a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java index 33e9ddab1..2e9163a7a 100644 --- a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java +++ b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagram.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -62,8 +61,8 @@ import net.sourceforge.plantuml.ugraphic.color.HColors; public class ListSpriteDiagram extends UmlDiagram { - public ListSpriteDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.HELP, skinParam); + public ListSpriteDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.HELP, skinParam); } public DiagramDescription getDescription() { diff --git a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java index 7eb45b859..518d780d6 100644 --- a/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java +++ b/src/net/sourceforge/plantuml/sprite/ListSpriteDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -58,8 +57,8 @@ public class ListSpriteDiagramFactory extends PSystemCommandFactory { } @Override - public ListSpriteDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new ListSpriteDiagram(style, source, skinParam); + public ListSpriteDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new ListSpriteDiagram(source, skinParam); } } diff --git a/src/net/sourceforge/plantuml/sprite/SpriteImage.java b/src/net/sourceforge/plantuml/sprite/SpriteImage.java index 4d1ab9712..0366da5c6 100644 --- a/src/net/sourceforge/plantuml/sprite/SpriteImage.java +++ b/src/net/sourceforge/plantuml/sprite/SpriteImage.java @@ -51,7 +51,6 @@ import net.sourceforge.plantuml.ugraphic.PixelImage; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperMonochrome; import net.sourceforge.plantuml.ugraphic.color.HColor; public class SpriteImage implements Sprite { @@ -66,7 +65,7 @@ public class SpriteImage implements Sprite { return new AbstractTextBlock() { public void drawU(UGraphic ug) { - if (colorMapper instanceof ColorMapperMonochrome) + if (colorMapper == ColorMapper.MONOCHROME) ug.draw(img.monochrome().scale(scale)); else if (color == null) ug.draw(img.scale(scale)); diff --git a/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java b/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java index 2f344bd9f..578aab899 100644 --- a/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java +++ b/src/net/sourceforge/plantuml/sprite/StdlibDiagram.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.WithSprite; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; @@ -74,8 +73,8 @@ public class StdlibDiagram extends UmlDiagram { private static final int WIDTH = 1800; private String name; - public StdlibDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.HELP, skinParam); + public StdlibDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.HELP, skinParam); } public DiagramDescription getDescription() { diff --git a/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java b/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java index 0386a8ae7..2e58f0c31 100644 --- a/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java +++ b/src/net/sourceforge/plantuml/sprite/StdlibDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.PSystemCommandFactory; import net.sourceforge.plantuml.core.UmlSource; @@ -55,8 +54,8 @@ public class StdlibDiagramFactory extends PSystemCommandFactory { } @Override - public StdlibDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new StdlibDiagram(style, source, skinParam); + public StdlibDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new StdlibDiagram(source, skinParam); } } diff --git a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java index a432f88be..25446dc4d 100644 --- a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java +++ b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java @@ -39,7 +39,6 @@ import java.util.Objects; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Code; @@ -59,8 +58,8 @@ public class StateDiagram extends AbstractEntityDiagram { private static final String CONCURRENT_PREFIX = "CONC"; - public StateDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - super(style, source, UmlDiagramType.STATE, skinParam); + public StateDiagram(UmlSource source, ISkinSimple skinParam) { + super(source, UmlDiagramType.STATE, skinParam); // setNamespaceSeparator(null); } diff --git a/src/net/sourceforge/plantuml/statediagram/StateDiagramFactory.java b/src/net/sourceforge/plantuml/statediagram/StateDiagramFactory.java index 56a6732ba..642ebcba2 100644 --- a/src/net/sourceforge/plantuml/statediagram/StateDiagramFactory.java +++ b/src/net/sourceforge/plantuml/statediagram/StateDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2; import net.sourceforge.plantuml.classdiagram.command.CommandNamespaceSeparator; import net.sourceforge.plantuml.classdiagram.command.CommandRemoveRestore; @@ -67,8 +66,8 @@ import net.sourceforge.plantuml.statediagram.command.CommandLinkStateReverse; public class StateDiagramFactory extends PSystemCommandFactory { @Override - public StateDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new StateDiagram(style, source, skinParam); + public StateDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new StateDiagram(source, skinParam); } @Override diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java index 6195b6397..d956f5cef 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackage2.java @@ -134,12 +134,11 @@ public class CommandCreatePackage2 extends SingleLineCommand2 { p.addUrl(url); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String s = arg.get("LINECOLOR", 1); final HColor lineColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (lineColor != null) colors = colors.add(ColorType.LINE, lineColor); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java index ea6c78360..800dc848f 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreatePackageState.java @@ -132,12 +132,11 @@ public class CommandCreatePackageState extends SingleLineCommand2 p.addUrl(url); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String s = arg.get("LINECOLOR", 1); final HColor lineColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (lineColor != null) colors = colors.add(ColorType.LINE, lineColor); diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java index a9c20a965..444e5f59b 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandCreateState.java @@ -132,12 +132,11 @@ public class CommandCreateState extends SingleLineCommand2 { ent.addUrl(url); } - Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String s = arg.get("LINECOLOR", 1); final HColor lineColor = s == null ? null - : diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s); + : diagram.getSkinParam().getIHtmlColorSet().getColor(s); if (lineColor != null) { colors = colors.add(ColorType.LINE, lineColor); } diff --git a/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java b/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java index 5c2eb0fed..b257e3eae 100644 --- a/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java +++ b/src/net/sourceforge/plantuml/statediagram/command/CommandLinkStateCommon.java @@ -92,7 +92,7 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { if (arg.get("ENT1", 2) != null) { final String s = arg.get("ENT1", 2); cl1.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } if (arg.get("ENT2", 1) != null) { cl2.setStereotype(Stereotype.build(arg.get("ENT2", 1))); @@ -100,7 +100,7 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { if (arg.get("ENT2", 2) != null) { final String s = arg.get("ENT2", 2); cl2.setSpecificColorTOBEREMOVED(ColorType.BACK, - diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s)); + diagram.getSkinParam().getIHtmlColorSet().getColor(s)); } String queue = arg.get("ARROW_BODY1", 0) + arg.get("ARROW_BODY2", 0); @@ -122,7 +122,7 @@ abstract class CommandLinkStateCommon extends SingleLineCommand2 { if (dir == Direction.LEFT || dir == Direction.UP) link = link.getInv(); - link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0)); + link.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); link.setUmlDiagramType(UmlDiagramType.STATE); diagram.addLink(link); diff --git a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java index b277fd679..2279eeb75 100644 --- a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java +++ b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java @@ -122,9 +122,9 @@ public class FromSkinparamToStyle { addConvert("packageBorderColor", PName.LineColor, SName.group); addMagic(SName.package_); - addConvert("PartitionBorderColor", PName.LineColor, SName.partition); - addConvert("PartitionBackgroundColor", PName.BackGroundColor, SName.partition); - addConFont("Partition", SName.partition); + addConvert("PartitionBorderColor", PName.LineColor, SName.composite); + addConvert("PartitionBackgroundColor", PName.BackGroundColor, SName.composite); + addConFont("Partition", SName.composite); addConvert("hyperlinkColor", PName.HyperLinkColor, SName.root); diff --git a/src/net/sourceforge/plantuml/style/Style.java b/src/net/sourceforge/plantuml/style/Style.java index a280e7c4e..ffb199a91 100644 --- a/src/net/sourceforge/plantuml/style/Style.java +++ b/src/net/sourceforge/plantuml/style/Style.java @@ -42,7 +42,6 @@ import java.util.StringTokenizer; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; @@ -186,33 +185,33 @@ public class Style { return new UFont(family, fontStyle, size); } - public FontConfiguration getFontConfiguration(ThemeStyle themeStyle, HColorSet set) { - return getFontConfiguration(themeStyle, set, null); + public FontConfiguration getFontConfiguration(HColorSet set) { + return getFontConfiguration(set, null); } - public FontConfiguration getFontConfiguration(ThemeStyle themeStyle, HColorSet set, Colors colors) { + public FontConfiguration getFontConfiguration(HColorSet set, Colors colors) { final UFont font = getUFont(); HColor color = colors == null ? null : colors.getColor(ColorType.TEXT); if (color == null) - color = value(PName.FontColor).asColor(themeStyle, set); + color = value(PName.FontColor).asColor(set); - final HColor hyperlinkColor = value(PName.HyperLinkColor).asColor(themeStyle, set); + final HColor hyperlinkColor = value(PName.HyperLinkColor).asColor(set); return FontConfiguration.create(font, color, hyperlinkColor, true); } - public SymbolContext getSymbolContext(ThemeStyle themeStyle, HColorSet set, Colors colors) { + public SymbolContext getSymbolContext(HColorSet set, Colors colors) { HColor backColor = colors == null ? null : colors.getColor(ColorType.BACK); if (backColor == null) - backColor = value(PName.BackGroundColor).asColor(themeStyle, set); + backColor = value(PName.BackGroundColor).asColor(set); HColor foreColor = colors == null ? null : colors.getColor(ColorType.LINE); if (foreColor == null) - foreColor = value(PName.LineColor).asColor(themeStyle, set); + foreColor = value(PName.LineColor).asColor(set); final double deltaShadowing = value(PName.Shadowing).asDouble(); return new SymbolContext(backColor, foreColor).withStroke(getStroke()).withDeltaShadow(deltaShadowing); } - public SymbolContext getSymbolContext(ThemeStyle themeStyle, HColorSet set) { - return getSymbolContext(themeStyle, set, null); + public SymbolContext getSymbolContext(HColorSet set) { + return getSymbolContext(set, null); } public Style eventuallyOverride(UStroke stroke) { @@ -274,7 +273,7 @@ public class Style { private TextBlock createTextBlockInternal(Display display, HColorSet set, ISkinSimple spriteContainer, HorizontalAlignment alignment) { - final FontConfiguration fc = getFontConfiguration(spriteContainer.getThemeStyle(), set); + final FontConfiguration fc = getFontConfiguration(set); return display.create(fc, alignment, spriteContainer); } @@ -286,8 +285,8 @@ public class Style { final HorizontalAlignment alignment = this.getHorizontalAlignment(); final TextBlock textBlock = this.createTextBlockInternal(note, set, spriteContainer, alignment); - final HColor backgroundColor = this.value(PName.BackGroundColor).asColor(spriteContainer.getThemeStyle(), set); - final HColor lineColor = this.value(PName.LineColor).asColor(spriteContainer.getThemeStyle(), set); + final HColor backgroundColor = this.value(PName.BackGroundColor).asColor(set); + final HColor lineColor = this.value(PName.LineColor).asColor(set); final UStroke stroke = this.getStroke(); final int cornersize = this.value(PName.RoundCorner).asInt(); final ClockwiseTopRightBottomLeft margin = this.getMargin(); @@ -297,8 +296,8 @@ public class Style { return TextBlockUtils.withMargin(result, margin); } - public UGraphic applyStrokeAndLineColor(UGraphic ug, HColorSet colorSet, ThemeStyle themeStyle) { - final HColor color = value(PName.LineColor).asColor(themeStyle, colorSet); + public UGraphic applyStrokeAndLineColor(UGraphic ug, HColorSet colorSet) { + final HColor color = value(PName.LineColor).asColor(colorSet); if (color == null) ug = ug.apply(HColors.none()); else diff --git a/src/net/sourceforge/plantuml/style/Value.java b/src/net/sourceforge/plantuml/style/Value.java index 06dbb2f9f..9a77a035e 100644 --- a/src/net/sourceforge/plantuml/style/Value.java +++ b/src/net/sourceforge/plantuml/style/Value.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.style; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -44,7 +43,7 @@ public interface Value { public String asString(); - public HColor asColor(ThemeStyle themeStyle, HColorSet set); + public HColor asColor(HColorSet set); public int asInt(); diff --git a/src/net/sourceforge/plantuml/style/ValueAbstract.java b/src/net/sourceforge/plantuml/style/ValueAbstract.java index d68528b84..72d6a9dee 100644 --- a/src/net/sourceforge/plantuml/style/ValueAbstract.java +++ b/src/net/sourceforge/plantuml/style/ValueAbstract.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.style; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -46,7 +45,7 @@ public abstract class ValueAbstract implements Value { throw new UnsupportedOperationException("Class=" + getClass()); } - public HColor asColor(ThemeStyle themeStyle, HColorSet set) { + public HColor asColor(HColorSet set) { throw new UnsupportedOperationException("Class=" + getClass()); } diff --git a/src/net/sourceforge/plantuml/style/ValueColor.java b/src/net/sourceforge/plantuml/style/ValueColor.java index dbdff96c9..7490b7ac2 100644 --- a/src/net/sourceforge/plantuml/style/ValueColor.java +++ b/src/net/sourceforge/plantuml/style/ValueColor.java @@ -35,7 +35,6 @@ */ package net.sourceforge.plantuml.style; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -55,7 +54,7 @@ public class ValueColor extends ValueAbstract { } @Override - public HColor asColor(ThemeStyle themeStyle, HColorSet set) { + public HColor asColor(HColorSet set) { return color; } diff --git a/src/net/sourceforge/plantuml/style/ValueImpl.java b/src/net/sourceforge/plantuml/style/ValueImpl.java index 46168daa1..600e3f4a9 100644 --- a/src/net/sourceforge/plantuml/style/ValueImpl.java +++ b/src/net/sourceforge/plantuml/style/ValueImpl.java @@ -38,7 +38,6 @@ package net.sourceforge.plantuml.style; import java.awt.Font; import java.util.Objects; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -90,10 +89,10 @@ public class ValueImpl implements Value { return value.getValue1(); } - public HColor asColor(ThemeStyle themeStyle, HColorSet set) { + public HColor asColor(HColorSet set) { final String value1 = value.getValue1(); if ("none".equalsIgnoreCase(value1)) - return null; + return HColors.transparent(); if ("transparent".equalsIgnoreCase(value1)) return HColors.transparent(); @@ -101,9 +100,9 @@ public class ValueImpl implements Value { if (value1 == null) throw new IllegalArgumentException(value.toString()); - final HColor result = set.getColorOrWhite(themeStyle, value1); + final HColor result = set.getColorOrWhite(value1); if (value.getValue2() != null) { - final HColor dark = set.getColorOrWhite(themeStyle, value.getValue2()); + final HColor dark = set.getColorOrWhite(value.getValue2()); return result.withDark(dark); } return result; diff --git a/src/net/sourceforge/plantuml/style/ValueNull.java b/src/net/sourceforge/plantuml/style/ValueNull.java index 7c1973ca7..e0aff5d7d 100644 --- a/src/net/sourceforge/plantuml/style/ValueNull.java +++ b/src/net/sourceforge/plantuml/style/ValueNull.java @@ -37,7 +37,6 @@ package net.sourceforge.plantuml.style; import java.awt.Font; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; @@ -76,7 +75,7 @@ public class ValueNull extends ValueAbstract implements Value { } @Override - public HColor asColor(ThemeStyle themeStyle, HColorSet set) { + public HColor asColor(HColorSet set) { return HColors.BLACK; } diff --git a/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java b/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java index 77e766416..dd348aa3a 100644 --- a/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java +++ b/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java @@ -61,7 +61,7 @@ import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColors; import net.sourceforge.plantuml.ugraphic.eps.UGraphicEps; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; @@ -79,7 +79,7 @@ public class GraphicsSudoku { } public ImageData writeImageEps(OutputStream os) throws IOException { - final UGraphicEps ug = new UGraphicEps(HColors.WHITE, new ColorMapperIdentity(), + final UGraphicEps ug = new UGraphicEps(HColors.WHITE, ColorMapper.IDENTITY, FileFormat.EPS_TEXT.getDefaultStringBounder(), EpsStrategy.WITH_MACRO_AND_TEXT); drawInternal(ug); os.write(ug.getEPSCode().getBytes()); @@ -88,7 +88,7 @@ public class GraphicsSudoku { public ImageData writeImageSvg(OutputStream os) throws IOException { final UGraphicSvg ug = new UGraphicSvg(HColors.WHITE, true, new XDimension2D(0, 0), - new ColorMapperIdentity(), false, 1.0, null, null, 0, "none", FileFormat.SVG.getDefaultStringBounder(), + ColorMapper.IDENTITY, false, 1.0, null, null, 0, "none", FileFormat.SVG.getDefaultStringBounder(), LengthAdjust.defaultValue(), false); drawInternal(ug); ug.writeToStream(os, null, -1); // dpi param is not used @@ -96,7 +96,7 @@ public class GraphicsSudoku { } public ImageData writeImageLatex(OutputStream os, FileFormat fileFormat) throws IOException { - final UGraphicTikz ug = new UGraphicTikz(HColors.WHITE, new ColorMapperIdentity(), FileFormat.LATEX.getDefaultStringBounder(), 1, + final UGraphicTikz ug = new UGraphicTikz(HColors.WHITE, ColorMapper.IDENTITY, FileFormat.LATEX.getDefaultStringBounder(), 1, fileFormat == FileFormat.LATEX); drawInternal(ug); ug.writeToStream(os, null, -1); // dpi param is not used @@ -110,7 +110,7 @@ public class GraphicsSudoku { final BufferedImage im = builder.getBufferedImage(); final Graphics2D g3d = builder.getGraphics2D(); - final UGraphic ug = new UGraphicG2d(HColors.WHITE, new ColorMapperIdentity(), stringBounder, g3d, 1.0); + final UGraphic ug = new UGraphicG2d(HColors.WHITE, ColorMapper.IDENTITY, stringBounder, g3d, 1.0); drawInternal(ug); g3d.dispose(); diff --git a/src/net/sourceforge/plantuml/svek/Cluster.java b/src/net/sourceforge/plantuml/svek/Cluster.java index f74ac86c8..661df12b0 100644 --- a/src/net/sourceforge/plantuml/svek/Cluster.java +++ b/src/net/sourceforge/plantuml/svek/Cluster.java @@ -52,7 +52,6 @@ import net.sourceforge.plantuml.AlignmentParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XPoint2D; import net.sourceforge.plantuml.command.Position; @@ -303,7 +302,7 @@ public class Cluster implements Moveable { if (group.getColors().getColor(ColorType.LINE) != null) borderColor = group.getColors().getColor(ColorType.LINE); else - borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final double rounded = style.value(PName.RoundCorner).asDouble(); final double diagonalCorner = style.value(PName.DiagonalCorner).asDouble(); @@ -335,8 +334,7 @@ public class Cluster implements Moveable { HColor backColor = getBackColor(umlDiagramType, style); backColor = getBackColor(backColor, group.getStereotype(), umlDiagramType.getStyleName(), - group.getUSymbol(), skinParam.getCurrentStyleBuilder(), skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + group.getUSymbol(), skinParam.getCurrentStyleBuilder(), skinParam.getIHtmlColorSet()); final ClusterDecoration decoration = new ClusterDecoration(packageStyle, group.getUSymbol(), clusterHeader.getTitle(), clusterHeader.getStereo(), clusterPosition, stroke); @@ -414,15 +412,15 @@ public class Cluster implements Moveable { HColor borderColor = group.getColors().getColor(ColorType.LINE); if (borderColor == null) borderColor = EntityImageStateCommon.getStyleState(group, skinParam).value(PName.LineColor) - .asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + .asColor(skinParam.getIHtmlColorSet()); HColor backColor = group.getColors().getColor(ColorType.BACK); if (backColor == null) backColor = EntityImageStateCommon.getStyleState(group, skinParam).value(PName.BackGroundColor) - .asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + .asColor(skinParam.getIHtmlColorSet()); final HColor imgBackcolor = EntityImageStateCommon.getStyleStateBody(group, skinParam) - .value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + .value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); final TextBlock attribute = ((EntityImpl) group).getStateHeader(skinParam); final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight(); @@ -584,7 +582,7 @@ public class Cluster implements Moveable { final Stereotype stereo = group.getStereotype(); - return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); // final USymbol sym = group.getUSymbol() == null ? USymbols.PACKAGE : group.getUSymbol(); // final ColorParam backparam = umlDiagramType == UmlDiagramType.ACTIVITY ? ColorParam.partitionBackground @@ -607,11 +605,11 @@ public class Cluster implements Moveable { } public static HColor getBackColor(HColor backColor, Stereotype stereotype, SName styleName, USymbol symbol, - StyleBuilder styleBuilder, ThemeStyle themeStyle, HColorSet colorSet) { + StyleBuilder styleBuilder, HColorSet colorSet) { final Style style = getDefaultStyleDefinition(styleName, symbol).getMergedStyle(styleBuilder); if (backColor == null) - backColor = style.value(PName.BackGroundColor).asColor(themeStyle, colorSet); + backColor = style.value(PName.BackGroundColor).asColor(colorSet); if (backColor == null || backColor.equals(HColors.transparent())) backColor = HColors.transparent(); diff --git a/src/net/sourceforge/plantuml/svek/ClusterHeader.java b/src/net/sourceforge/plantuml/svek/ClusterHeader.java index f2170b9e1..b2a6dc84a 100644 --- a/src/net/sourceforge/plantuml/svek/ClusterHeader.java +++ b/src/net/sourceforge/plantuml/svek/ClusterHeader.java @@ -128,8 +128,8 @@ public final class ClusterHeader { .with(g.getStereostyles()) // .getMergedStyle(skinParam.getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet(), g.getColors()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet(), + g.getColors()); final HorizontalAlignment alignment = HorizontalAlignment.CENTER; return label.create(fontConfiguration, alignment, skinParam); @@ -168,8 +168,7 @@ public final class ClusterHeader { .getDefaultStyleDefinition(skinParam.getUmlDiagramType().getStyleName(), g.getUSymbol()) .forStereotypeItself(g.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); return Display.create(stereos).create(fontConfiguration, HorizontalAlignment.CENTER, skinParam); } diff --git a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek2InternalImage.java b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek2InternalImage.java index e8afe0013..25e92a690 100644 --- a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek2InternalImage.java +++ b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek2InternalImage.java @@ -117,8 +117,7 @@ public final class CucaDiagramFileMakerSvek2InternalImage extends AbstractTextBl } public void drawU(UGraphic ug) { - final HColor borderColor = getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final StringBounder stringBounder = ug.getStringBounder(); final XDimension2D dimTotal = calculateDimension(stringBounder); diff --git a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java index 6236753c2..630df42f2 100644 --- a/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java +++ b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java @@ -375,8 +375,7 @@ public final class GeneralImageBuilder { private HColor getBackcolor() { final Style style = StyleSignatureBasic.of(SName.root, SName.document) .getMergedStyle(dotData.getSkinParam().getCurrentStyleBuilder()); - return style.value(PName.BackGroundColor).asColor(dotData.getSkinParam().getThemeStyle(), - dotData.getSkinParam().getIHtmlColorSet()); + return style.value(PName.BackGroundColor).asColor(dotData.getSkinParam().getIHtmlColorSet()); } public IEntityImage buildImage(BaseFile basefile, String dotStrings[]) { @@ -466,7 +465,7 @@ public final class GeneralImageBuilder { private FontConfiguration getFontForLink(Link link, final ISkinParam skinParam) { final Style style = getDefaultStyleDefinitionArrow(link.getStereotype()).getMergedStyle(link.getStyleBuilder()); - return style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.getFontConfiguration(skinParam.getIHtmlColorSet()); } private boolean isSvekTrace() { diff --git a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java index f9c603d60..ca95de91e 100644 --- a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java +++ b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java @@ -129,8 +129,7 @@ public final class GroupPngMakerState { final double rounded = style.value(PName.RoundCorner).asDouble(); final double shadowing = style.value(PName.Shadowing).asDouble(); - final FontConfiguration titleFontConfiguration = styleTitle.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration titleFontConfiguration = styleTitle.getFontConfiguration(skinParam.getIHtmlColorSet()); final TextBlock title = display.create(titleFontConfiguration, HorizontalAlignment.CENTER, diagram.getSkinParam()); @@ -155,13 +154,12 @@ public final class GroupPngMakerState { HColor borderColor = group.getColors().getColor(ColorType.LINE); if (borderColor == null) - borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final Stereotype stereo = group.getStereotype(); HColor backColor = group.getColors().getColor(ColorType.BACK); if (backColor == null) - backColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + backColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); UStroke stroke = group.getColors().getSpecificLineStroke(); if (stroke == null) @@ -176,8 +174,7 @@ public final class GroupPngMakerState { final IEntityImage image = containsOnlyConcurrentStates ? buildImageForConcurrentState(dotData) : svek2.buildImage(null, new String[0]); - final HColor bodyColor = styleBody.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor bodyColor = styleBody.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); return new InnerStateAutonom(image, title, attribute, borderColor, backColor, group.getUrl99(), withSymbol, stroke, rounded, shadowing, bodyColor); diff --git a/src/net/sourceforge/plantuml/svek/SvekResult.java b/src/net/sourceforge/plantuml/svek/SvekResult.java index 799e60cc0..a14c44c60 100644 --- a/src/net/sourceforge/plantuml/svek/SvekResult.java +++ b/src/net/sourceforge/plantuml/svek/SvekResult.java @@ -75,8 +75,7 @@ public final class SvekResult extends AbstractTextBlock implements IEntityImage final Style style2 = getDefaultStyleDefinition(null) .getMergedStyle(dotData.getSkinParam().getCurrentStyleBuilder()); - HColor color = style2.value(PName.LineColor).asColor(dotData.getSkinParam().getThemeStyle(), - dotData.getSkinParam().getIHtmlColorSet()); + HColor color = style2.value(PName.LineColor).asColor(dotData.getSkinParam().getIHtmlColorSet()); color = HColors.noGradient(color); for (SvekNode node : dotStringFactory.getBibliotekon().allNodes()) { @@ -99,8 +98,7 @@ public final class SvekResult extends AbstractTextBlock implements IEntityImage final StyleBuilder currentStyleBuilder = line.getCurrentStyleBuilder(); final Style styleLine = getDefaultStyleDefinition(line.getStereotype()).getMergedStyle(currentStyleBuilder); - color = styleLine.value(PName.LineColor).asColor(dotData.getSkinParam().getThemeStyle(), - dotData.getSkinParam().getIHtmlColorSet()); + color = styleLine.value(PName.LineColor).asColor(dotData.getSkinParam().getIHtmlColorSet()); color = HColors.noGradient(color); line.drawU(ug2, styleLine.getStroke(), color, ids); @@ -129,8 +127,7 @@ public final class SvekResult extends AbstractTextBlock implements IEntityImage public HColor getBackcolor() { final Style style = StyleSignatureBasic.of(SName.root, SName.document) .getMergedStyle(dotData.getSkinParam().getCurrentStyleBuilder()); - return style.value(PName.BackGroundColor).asColor(dotData.getSkinParam().getThemeStyle(), - dotData.getSkinParam().getIHtmlColorSet()); + return style.value(PName.BackGroundColor).asColor(dotData.getSkinParam().getIHtmlColorSet()); } private MinMax minMax; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java index e5b107d46..1af2fe2f2 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java @@ -75,8 +75,7 @@ public class EntityImageActivity extends AbstractEntityImage { this.bibliotekon = bibliotekon; final Style style = getDefaultStyleDefinition().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final HorizontalAlignment horizontalAlignment = style.getHorizontalAlignment(); this.shadowing = style.value(PName.Shadowing).asDouble(); @@ -147,12 +146,10 @@ public class EntityImageActivity extends AbstractEntityImage { private UGraphic applyColors(UGraphic ug) { final Style style = getDefaultStyleDefinition().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); HColor backcolor = getEntity().getColors().getColor(ColorType.BACK); if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(borderColor); ug = ug.apply(backcolor.bg()); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java index 644b5f934..bb242f6f0 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java @@ -82,10 +82,8 @@ public class EntityImageAssociation extends AbstractEntityImage { diams.addPoint(SIZE, 0); final Style style = getStyle(); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); - final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); + final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadow = style.value(PName.Shadowing).asDouble(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java index 478cb1f1c..870db30d8 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java @@ -79,10 +79,8 @@ public class EntityImageBranch extends AbstractEntityImage { diams.addPoint(SIZE, 0); final Style style = getDefaultStyleDefinition().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor border = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); - final HColor back = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor border = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); + final HColor back = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); final UStroke stroke = style.getStroke(); final double shadowing = style.value(PName.Shadowing).asDouble(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java index ee4e9ca2c..f291fa843 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java @@ -72,8 +72,7 @@ public class EntityImageCircleEnd extends AbstractEntityImage { final UEllipse circle = new UEllipse(SIZE, SIZE); final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); circle.setDeltaShadow(shadowing); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java index dce91157c..216733749 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java @@ -70,8 +70,7 @@ public class EntityImageCircleStart extends AbstractEntityImage { final UEllipse circle = new UEllipse(SIZE, SIZE); final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); circle.setDeltaShadow(shadowing); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java index 0071fb22f..edd9540f8 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java @@ -189,16 +189,14 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi shadow = getStyle().value(PName.Shadowing).asDouble(); if (borderColor == null) - borderColor = getStyle().value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + borderColor = getStyle().value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); if (headerBackcolor == null) headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor) - .asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor; + .asColor(getSkinParam().getIHtmlColorSet()) : backcolor; if (backcolor == null) - backcolor = getStyle().value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = getStyle().value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); rect.setDeltaShadow(shadow); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java index d4d45efd5..fb2415c4d 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader.java @@ -134,8 +134,7 @@ public class EntityImageClassHeader extends AbstractEntityImage { // final HColor classBackground = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), // skinParam.getIHtmlColorSet()); final HColor classBackground = skinParam.getBackgroundColor(); - final HColor classBorder = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor classBorder = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); genericBlock = new TextBlockGeneric(genericBlock, classBackground, classBorder); genericBlock = TextBlockUtils.withMargin(genericBlock, 1, 1); @@ -160,13 +159,10 @@ public class EntityImageClassHeader extends AbstractEntityImage { final LeafType leafType = entity.getLeafType(); final Style style = spotStyleSignature(leafType).getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor spotBorder = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); - final HColor spotBackColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor spotBorder = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); + final HColor spotBackColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); - final HColor fontColor = style.value(PName.FontColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor fontColor = style.value(PName.FontColor).asColor(skinParam.getIHtmlColorSet()); if (stereotype != null && stereotype.getCharacter() != 0) return new CircledCharacter(stereotype.getCharacter(), getSkinParam().getCircledCharacterRadius(), font, diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java index 80bfdc8b7..144ce986d 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java @@ -137,22 +137,18 @@ public class EntityImageDescription extends AbstractEntityImage { final Style styleStereo = tmp.forStereotypeItself(stereotype) .getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor forecolor = styleTitle.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor forecolor = styleTitle.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); HColor backcolor = colors.getColor(ColorType.BACK); if (backcolor == null) - backcolor = styleTitle.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = styleTitle.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); final double roundCorner = styleTitle.value(PName.RoundCorner).asDouble(); final double diagonalCorner = styleTitle.value(PName.DiagonalCorner).asDouble(); final double deltaShadow = styleTitle.value(PName.Shadowing).asDouble(); final UStroke stroke = styleTitle.getStroke(colors); - final FontConfiguration fcTitle = styleTitle.getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); - final FontConfiguration fcStereo = styleStereo.getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration fcTitle = styleTitle.getFontConfiguration(getSkinParam().getIHtmlColorSet()); + final FontConfiguration fcStereo = styleStereo.getFontConfiguration(getSkinParam().getIHtmlColorSet()); final HorizontalAlignment defaultAlign = styleTitle.getHorizontalAlignment(); assert getStereo() == stereotype; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java index bcbd6e093..e431c22b5 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java @@ -101,20 +101,17 @@ public class EntityImageEmptyPackage extends AbstractEntityImage { Style style = getStyle(); style = style.eventuallyOverride(colors); - this.borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); this.stroke = style.getStroke(colors); this.roundCorner = style.value(PName.RoundCorner).asDouble(); this.diagonalCorner = style.value(PName.DiagonalCorner).asDouble(); if (specificBackColor == null) - this.back = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + this.back = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); else this.back = specificBackColor; - final FontConfiguration titleFontConfiguration = style.getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration titleFontConfiguration = style.getFontConfiguration(getSkinParam().getIHtmlColorSet()); final HorizontalAlignment titleHorizontalAlignment = style.getHorizontalAlignment(); this.desc = entity.getDisplay().create(titleFontConfiguration, titleHorizontalAlignment, skinParam); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java b/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java index 7a5782be2..3cb79c8a1 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageJson.java @@ -90,8 +90,7 @@ public class EntityImageJson extends AbstractEntityImage implements Stencil, Wit final Stereotype stereotype = entity.getStereotype(); this.roundCorner = skinParam.getRoundCorner(CornerParam.DEFAULT, null); - final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getIHtmlColorSet()); this.name = TextBlockUtils .withMargin(entity.getDisplay().create(fcHeader, HorizontalAlignment.CENTER, skinParam), 2, 2); @@ -105,7 +104,7 @@ public class EntityImageJson extends AbstractEntityImage implements Stencil, Wit HorizontalAlignment.CENTER, skinParam); final FontConfiguration fontConfiguration = getStyleHeader() - .getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); + .getFontConfiguration(getSkinParam().getIHtmlColorSet()); this.entries = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, false, entity.getStereotype(), getStyle(), fontConfiguration); @@ -154,11 +153,9 @@ public class EntityImageJson extends AbstractEntityImage implements Stencil, Wit HColor backcolor = getEntity().getColors().getColor(ColorType.BACK); final Style style = getStyle(); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); rect.setDeltaShadow(style.value(PName.Shadowing).asDouble()); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java index 55073f12a..1c2a3afa7 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java @@ -96,10 +96,8 @@ public class EntityImageLollipopInterface extends AbstractEntityImage { final public void drawU(UGraphic ug) { final Style style = getSignature().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadow = style.value(PName.Shadowing).asDouble(); final UEllipse circle; diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java index 21b6d6973..e7add8abd 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java @@ -94,8 +94,7 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With final Stereotype stereotype = entity.getStereotype(); this.roundCorner = skinParam.getRoundCorner(CornerParam.DEFAULT, null); - final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getIHtmlColorSet()); this.name = TextBlockUtils .withMargin(entity.getDisplay().create(fcHeader, HorizontalAlignment.CENTER, skinParam), 2, 2); @@ -109,7 +108,7 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With HorizontalAlignment.CENTER, skinParam); final FontConfiguration fontConfiguration = getStyleHeader() - .getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); + .getFontConfiguration(getSkinParam().getIHtmlColorSet()); this.entries = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, false, entity.getStereotype(), getStyle(), fontConfiguration); @@ -162,16 +161,14 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With final Style style = getStyle(); if (borderColor == null) - borderColor = getStyle().value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + borderColor = getStyle().value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); if (headerBackcolor == null) headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor) - .asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor; + .asColor(getSkinParam().getIHtmlColorSet()) : backcolor; if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); rect.setDeltaShadow(style.value(PName.Shadowing).asDouble()); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java index 19a7e2fca..09e29717b 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java @@ -104,17 +104,14 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil { this.style = getDefaultStyleDefinition(umlDiagramType.getStyleName()) .getMergedStyle(skinParam.getCurrentStyleBuilder()); if (entity.getColors().getColor(ColorType.BACK) == null) - this.noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + this.noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); else this.noteBackgroundColor = entity.getColors().getColor(ColorType.BACK); - this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); - final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final HorizontalAlignment horizontalAlignment = style.getHorizontalAlignment(); if (strings.size() == 1 && strings.get(0).length() == 0) diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java index 744bd3001..babfa1f13 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java @@ -96,8 +96,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W final Stereotype stereotype = entity.getStereotype(); this.roundCorner = skinParam.getRoundCorner(CornerParam.DEFAULT, null); - final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final FontConfiguration fcHeader = getStyleHeader().getFontConfiguration(getSkinParam().getIHtmlColorSet()); final TextBlock tmp = getUnderlinedName(entity).create(fcHeader, HorizontalAlignment.CENTER, skinParam); this.name = TextBlockUtils.withMargin(tmp, 2, 2); @@ -165,16 +164,14 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W HColor headerBackcolor = getEntity().getColors().getColor(ColorType.HEADER); final Style style = getStyle(); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); if (headerBackcolor == null) headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor) - .asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor; + .asColor(getSkinParam().getIHtmlColorSet()) : backcolor; if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); rect.setDeltaShadow(style.value(PName.Shadowing).asDouble()); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java b/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java index 2b42d6bc7..4ef28af2c 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImagePort.java @@ -112,12 +112,10 @@ public class EntityImagePort extends AbstractEntityImageBorder { HColor borderColor = getEntity().getColors().getColor(ColorType.LINE); if (borderColor == null) - borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(borderColor); ug = ug.apply(getUStroke()).apply(backcolor.bg()); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java index 705eb24ee..66681ef66 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java @@ -94,10 +94,8 @@ public class EntityImagePseudoState extends AbstractEntityImage { final UEllipse circle = new UEllipse(SIZE, SIZE); final Style style = getStyle(); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); - final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); + final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadow = style.value(PName.Shadowing).asDouble(); final UStroke stroke = style.getStroke(); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java index 580a9dec5..00613d415 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java @@ -77,7 +77,7 @@ public class EntityImageState extends EntityImageStateCommon { final Display list = Display.create(entity.getBodier().getRawBody()); final FontConfiguration fieldsFontConfiguration = getStyleStateHeader() - .getFontConfiguration(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); + .getFontConfiguration(getSkinParam().getIHtmlColorSet()); this.fields = list.create8(fieldsFontConfiguration, HorizontalAlignment.LEFT, skinParam, CreoleMode.FULL, skinParam.wrapWidth()); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java index 5a5121122..07e577a83 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java @@ -68,7 +68,7 @@ public class EntityImageState2 extends AbstractEntityImage { final Stereotype stereotype = entity.getStereotype(); final USymbol symbol = USymbols.FRAME; - final SymbolContext ctx = getStyle().getSymbolContext(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + final SymbolContext ctx = getStyle().getSymbolContext(skinParam.getIHtmlColorSet()); this.url = entity.getUrl99(); TextBlock stereo = TextBlockUtils.empty(0, 0); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java index 1012cfe2b..aabcbcbe5 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java @@ -90,12 +90,10 @@ public class EntityImageStateBorder extends AbstractEntityImageBorder { desc.drawU(ug.apply(new UTranslate(x, y))); final Style style = getSignature().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); HColor backcolor = getEntity().getColors().getColor(ColorType.BACK); if (backcolor == null) - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(getUStroke()).apply(borderColor); ug = ug.apply(backcolor.bg()); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java index c8af9db92..965c56f60 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateCommon.java @@ -69,7 +69,7 @@ public abstract class EntityImageStateCommon extends AbstractEntityImage { this.lineConfig = entity; final FontConfiguration titleFontConfiguration = getStyleStateTitle(entity, skinParam).getFontConfiguration( - getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet(), entity.getColors()); + getSkinParam().getIHtmlColorSet(), entity.getColors()); this.title = entity.getDisplay().create8(titleFontConfiguration, HorizontalAlignment.CENTER, skinParam, CreoleMode.FULL, skinParam.wrapWidth()); @@ -123,14 +123,12 @@ public abstract class EntityImageStateCommon extends AbstractEntityImage { HColor border = lineConfig.getColors().getColor(ColorType.LINE); if (border == null) - border = getStyleState().value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + border = getStyleState().value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(border); HColor backcolor = lineConfig.getColors().getColor(ColorType.BACK); if (backcolor == null) - backcolor = getStyleState().value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = getStyleState().value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); ug = ug.apply(backcolor.bg()); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java index b3240b484..b926c6223 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java @@ -78,8 +78,7 @@ public class EntityImageSynchroBar extends AbstractEntityImage { final Style style = getStyleSignature().withTOBECHANGED(getEntity().getStereotype()) .getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - final HColor color = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + final HColor color = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); final double shadowing = style.value(PName.Shadowing).asDouble(); rect.setDeltaShadow(shadowing); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java index f76c3d8c7..b60d44a81 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java @@ -88,13 +88,11 @@ public class EntityImageTips extends AbstractEntityImage { style = getDefaultStyleDefinition(type.getStyleName()).getMergedStyle(skinParam.getCurrentStyleBuilder()); if (entity.getColors().getColor(ColorType.BACK) == null) - this.noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + this.noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); else this.noteBackgroundColor = entity.getColors().getColor(ColorType.BACK); - this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + this.borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } @@ -176,8 +174,7 @@ public class EntityImageTips extends AbstractEntityImage { private Opale getOpale(final Display display) { final double shadowing = style.value(PName.Shadowing).asDouble(); - final FontConfiguration fc = style.getFontConfiguration(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final FontConfiguration fc = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final UStroke stroke = style.getStroke(); final TextBlock textBlock = BodyFactory.create3(display, skinParam, HorizontalAlignment.LEFT, fc, diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java index ed22ce1a1..0721210e4 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java @@ -184,8 +184,7 @@ public class EntityImageUseCase extends AbstractEntityImage { final Colors colors = getEntity().getColors(); Style style = getStyle(); style = style.eventuallyOverride(colors); - backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + backcolor = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); } return backcolor; } @@ -203,8 +202,7 @@ public class EntityImageUseCase extends AbstractEntityImage { HColor linecolor = getEntity().getColors().getColor(ColorType.LINE); if (linecolor == null) { final Style style = getStyle(); - linecolor = style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), - getSkinParam().getIHtmlColorSet()); + linecolor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); } return linecolor; } diff --git a/src/net/sourceforge/plantuml/svek/image/Footprint.java b/src/net/sourceforge/plantuml/svek/image/Footprint.java index cc09de846..8038d54b4 100644 --- a/src/net/sourceforge/plantuml/svek/image/Footprint.java +++ b/src/net/sourceforge/plantuml/svek/image/Footprint.java @@ -60,7 +60,6 @@ import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColor; public class Footprint { @@ -122,7 +121,7 @@ public class Footprint { } public ColorMapper getColorMapper() { - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; } private void addPoint(double x, double y) { diff --git a/src/net/sourceforge/plantuml/svg/DarkStrategy.java b/src/net/sourceforge/plantuml/svg/DarkStrategy.java deleted file mode 100644 index b39bdbb43..000000000 --- a/src/net/sourceforge/plantuml/svg/DarkStrategy.java +++ /dev/null @@ -1,40 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.svg; - -public enum DarkStrategy { - IGNORE_DARK_COLOR, USE_PREFERS_COLOR_SCHEME_DARK; -} diff --git a/src/net/sourceforge/plantuml/svg/SvgGraphics.java b/src/net/sourceforge/plantuml/svg/SvgGraphics.java index a11d84985..18ac2c817 100644 --- a/src/net/sourceforge/plantuml/svg/SvgGraphics.java +++ b/src/net/sourceforge/plantuml/svg/SvgGraphics.java @@ -112,10 +112,6 @@ public class SvgGraphics { private String fill = "black"; private String stroke = "black"; -// private Collection classesForDarkness = new LinkedHashSet<>(); -// private String strokeDark = "black"; -// private String fillDark = "black"; - private String strokeWidth; private String strokeDasharray = null; private final String backcolor; @@ -144,8 +140,7 @@ public class SvgGraphics { } public SvgGraphics(String backcolor, boolean svgDimensionStyle, XDimension2D minDim, double scale, String hover, - long seed, String preserveAspectRatio, LengthAdjust lengthAdjust, DarkStrategy darkStrategy, - boolean interactive) { + long seed, String preserveAspectRatio, LengthAdjust lengthAdjust, boolean interactive) { try { this.lengthAdjust = lengthAdjust; this.svgDimensionStyle = svgDimensionStyle; @@ -311,7 +306,6 @@ public class SvgGraphics { elt.setAttribute("ry", format(yRadius)); fillMe(elt); elt.setAttribute("style", getStyle()); - manageDarkStroke(elt); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } @@ -380,22 +374,10 @@ public class SvgGraphics { public final void setFillColor(String fill) { this.fill = fixColor(fill); - // this.fillDark = this.fill; - } - - public final void setFillColor(String fill, String fillDark) { - this.fill = fixColor(fill); - // this.fillDark = fillDark == null ? "none" : fillDark; } public final void setStrokeColor(String stroke) { this.stroke = fixColor(stroke); - // this.strokeDark = stroke; - } - - public final void setStrokeColor(String stroke, String strokeDark) { - this.stroke = fixColor(stroke); - // this.strokeDark = strokeDark == null ? "none" : strokeDark; } private String fixColor(String color) { @@ -450,20 +432,9 @@ public class SvgGraphics { elt.setAttribute("height", format(height)); fillMe(elt); elt.setAttribute("style", getStyleSpecial()); - manageDarkStroke(elt); return elt; } - private void manageDarkStroke(final Element elt) { -// if (strokeDark != null && stroke.equals(strokeDark) == false) { -// final String attribute = elt.getAttribute("class"); -// if (attribute == null || attribute.length() == 0) -// elt.setAttribute("class", getStrokeClassForDark()); -// else -// elt.setAttribute("class", attribute + " " + getStrokeClassForDark()); -// } - } - public void svgLine(double x1, double y1, double x2, double y2, double deltaShadow) { manageShadow(deltaShadow); if (hidden == false) { @@ -473,7 +444,6 @@ public class SvgGraphics { elt.setAttribute("x2", format(x2)); elt.setAttribute("y2", format(y2)); elt.setAttribute("style", getStyle()); - manageDarkStroke(elt); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } @@ -483,7 +453,7 @@ public class SvgGraphics { private String getStyle() { final StringBuilder style = new StringBuilder(); - // if (stroke.equals(strokeDark)) + style.append("stroke:" + stroke + ";"); style.append("stroke-width:" + strokeWidth + ";"); if (fill.equals("#00000000")) @@ -498,7 +468,7 @@ public class SvgGraphics { // https://forum.plantuml.net/12469/package-background-transparent-package-default-background?show=12479#c12479 private String getStyleSpecial() { final StringBuilder style = new StringBuilder(); - // if (stroke.equals(strokeDark)) + style.append("stroke:" + stroke + ";"); style.append("stroke-width:" + strokeWidth + ";"); if (fill.equals("#00000000")) @@ -525,7 +495,6 @@ public class SvgGraphics { elt.setAttribute("points", sb.toString()); fillMe(elt); elt.setAttribute("style", getStyleSpecial()); - manageDarkStroke(elt); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } @@ -668,9 +637,6 @@ public class SvgGraphics { } private void createXmlInternal(OutputStream os) throws TransformerException { -// if (this.classesForDarkness.size() > 0) -// defs.appendChild(getStylesForDarkness()); - // Get a DOMSource object that represents the // Document object final DOMSource source = new DOMSource(document); @@ -678,7 +644,7 @@ public class SvgGraphics { final int maxXscaled = (int) (maxX * scale); final int maxYscaled = (int) (maxY * scale); String style = "width:" + maxXscaled + "px;height:" + maxYscaled + "px;"; - if (/* this.classesForDarkness.size() == 0 && */ backcolor != null) + if (backcolor != null) style += "background:" + backcolor + ";"; if (svgDimensionStyle) { @@ -746,7 +712,6 @@ public class SvgGraphics { elt.setAttribute("d", sb.toString()); elt.setAttribute("style", getStyle()); fillMe(elt); - manageDarkStroke(elt); final String id = path.getComment(); if (id != null) elt.setAttribute("id", id); @@ -760,32 +725,10 @@ public class SvgGraphics { } } -// private String getFillClassForDark() { -// final String result = "f_" + fill.toLowerCase().replaceAll("\\#", "") + "_" -// + fillDark.toLowerCase().replaceAll("\\#", ""); -// this.classesForDarkness.add(result); -// return result; -// } -// -// private String getStrokeClassForDark() { -// final String result = "s_" + stroke.toLowerCase().replaceAll("\\#", "") + "_" -// + strokeDark.toLowerCase().replaceAll("\\#", ""); -// this.classesForDarkness.add(result); -// return result; -// } - private void fillMe(Element elt) { if (fill.equals("#00000000")) return; -// if (fill.equals(fillDark) == false) { -// if (elt.getAttribute("class") != null && elt.getAttribute("class").length() != 0) -// throw new IllegalStateException(); -// -// elt.setAttribute("class", getFillClassForDark()); -// return; -// } - if (fill.matches("#[0-9A-Fa-f]{8}")) { elt.setAttribute("fill", fill.substring(0, 7)); final double opacity = Integer.parseInt(fill.substring(7), 16) / 255.0; diff --git a/src/net/sourceforge/plantuml/timingdiagram/ChangeState.java b/src/net/sourceforge/plantuml/timingdiagram/ChangeState.java index 1e1ec1f68..654ca5c73 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/ChangeState.java +++ b/src/net/sourceforge/plantuml/timingdiagram/ChangeState.java @@ -86,14 +86,14 @@ public class ChangeState implements Comparable { public final HColor getBackColor(ISkinParam skinParam, Style style) { if (colors == null || colors.getColor(ColorType.BACK) == null) - return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); return colors.getColor(ColorType.BACK); } private final HColor getLineColor(ISkinParam skinParam, Style style) { if (colors == null || colors.getColor(ColorType.LINE) == null) - return style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); return colors.getColor(ColorType.LINE); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/Highlight.java b/src/net/sourceforge/plantuml/timingdiagram/Highlight.java index 9ab4541b1..36ac80102 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/Highlight.java +++ b/src/net/sourceforge/plantuml/timingdiagram/Highlight.java @@ -82,8 +82,7 @@ public class Highlight { private HColor getBackColor() { final HColor result = colors.getColor(ColorType.BACK); if (result == null) - return getStyle().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + return getStyle().value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); return result; } @@ -91,7 +90,7 @@ public class Highlight { private HColor getLineColor() { final HColor result = colors.getColor(ColorType.LINE); if (result == null) - return getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); return result; } diff --git a/src/net/sourceforge/plantuml/timingdiagram/Player.java b/src/net/sourceforge/plantuml/timingdiagram/Player.java index 58220ea9d..b4ed0ba9b 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/Player.java +++ b/src/net/sourceforge/plantuml/timingdiagram/Player.java @@ -93,10 +93,8 @@ public abstract class Player implements TimeProjected { final protected SymbolContext getContext() { final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); - final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); + final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); return new SymbolContext(backgroundColor, lineColor).withStroke(getStroke()); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java b/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java index 9c309f933..457fc0722 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java @@ -95,7 +95,7 @@ public class TimeConstraint { } private FontConfiguration getFontConfiguration() { - return getStyle().getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return getStyle().getFontConfiguration(skinParam.getIHtmlColorSet()); } public void drawU(UGraphic ug, TimingRuler ruler) { @@ -116,7 +116,7 @@ public class TimeConstraint { } private HColor getArrowColor() { - return getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } private Style getStyle() { diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimeMessage.java b/src/net/sourceforge/plantuml/timingdiagram/TimeMessage.java index 23c1d2f9b..d46c748ba 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimeMessage.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimeMessage.java @@ -79,7 +79,7 @@ public class TimeMessage extends WithLinkType { if (styleBuilder == null) { return HColors.MY_RED; } - return getStyle().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } private Style getStyle() { diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java index b47699a9f..9fbd31986 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java @@ -48,7 +48,6 @@ import java.util.Map; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -95,8 +94,8 @@ public class TimingDiagram extends UmlDiagram implements Clocks { return new DiagramDescription("(Timing Diagram)"); } - public TimingDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.TIMING, null); + public TimingDiagram(UmlSource source) { + super(source, UmlDiagramType.TIMING, null); } @Override @@ -139,7 +138,7 @@ public class TimingDiagram extends UmlDiagram implements Clocks { private HColor black() { final Style style = getStyleSignature().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); - return style.value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); + return style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java index 06125df02..c9bab24eb 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommonCommands; @@ -70,8 +69,8 @@ import net.sourceforge.plantuml.timingdiagram.command.CommandUseDateFormat; public class TimingDiagramFactory extends PSystemCommandFactory { @Override - public TimingDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new TimingDiagram(style, source); + public TimingDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new TimingDiagram(source); } @Override diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java b/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java index 5da0a9851..c34c487e2 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java @@ -84,10 +84,8 @@ public class TimingNote { final FontConfiguration fc = FontConfiguration.create(skinParam, style); final double shadowing = style.value(PName.Shadowing).asDouble(); - final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); - final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); + final HColor noteBackgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); final UStroke stroke = style.getStroke(); final Sheet sheet = Parser diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java b/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java index 8594c6d9e..533ae7f47 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java @@ -73,8 +73,7 @@ public class TimingRuler { static UGraphic applyForVLines(UGraphic ug, Style style, ISkinParam skinParam) { final UStroke stroke = new UStroke(3, 5, 0.5); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); return ug.apply(stroke).apply(color); } @@ -203,8 +202,7 @@ public class TimingRuler { final Style style = StyleSignatureBasic.of(SName.root, SName.timingDiagram, SName.timeline) .getMergedStyle(skinParam.getCurrentStyleBuilder()); - final HColor color = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); final UStroke stroke = style.getStroke(); ug = ug.apply(stroke).apply(color); diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandChangeState.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandChangeState.java index 46acc5ccf..ff4422c01 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandChangeState.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandChangeState.java @@ -64,8 +64,7 @@ abstract class CommandChangeState extends SingleLineCommand2 { protected CommandExecutionResult addState(TimingDiagram diagram, RegexResult arg, final Player player, final TimeTick now) throws NoSuchColorException { final String comment = arg.get("COMMENT", 0); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); player.setState(now, comment, colors, getStates(arg)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandHighlight.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandHighlight.java index a08851626..75d836155 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandHighlight.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandHighlight.java @@ -89,8 +89,7 @@ public class CommandHighlight extends SingleLineCommand2 { final TimeTick tickFrom = TimeTickBuilder.parseTimeTick("FROM", arg, diagram); final TimeTick tickTo = TimeTickBuilder.parseTimeTick("TO", arg, diagram); final Display display = Display.getWithNewlines(arg.get("CAPTION", 0)); - final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, - diagram.getSkinParam().getIHtmlColorSet()); + final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); return diagram.highlight(tickFrom, tickTo, display, colors); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandTimeMessage.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandTimeMessage.java index c09a4a22b..89b418e7f 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandTimeMessage.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandTimeMessage.java @@ -91,7 +91,7 @@ public class CommandTimeMessage extends SingleLineCommand2 { final TimeTick tick1 = TimeTickBuilder.parseTimeTick("TIME1", arg, diagram); final TimeTick tick2 = TimeTickBuilder.parseTimeTick("TIME2", arg, diagram); final TimeMessage result = diagram.createTimeMessage(player1, tick1, player2, tick2, arg.get("MESSAGE", 0)); - result.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0)); + result.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/graphic/Histogram.java b/src/net/sourceforge/plantuml/timingdiagram/graphic/Histogram.java index 41232f544..e69d71f42 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/graphic/Histogram.java +++ b/src/net/sourceforge/plantuml/timingdiagram/graphic/Histogram.java @@ -196,10 +196,8 @@ public class Histogram implements PDrawing { } private SymbolContext getContext() { - final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); - final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), - skinParam.getIHtmlColorSet()); + final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); + final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); return new SymbolContext(backgroundColor, lineColor).withStroke(getStroke()); } diff --git a/src/net/sourceforge/plantuml/timingdiagram/graphic/PlayerFrame.java b/src/net/sourceforge/plantuml/timingdiagram/graphic/PlayerFrame.java index 29450add7..f44ddc1ff 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/graphic/PlayerFrame.java +++ b/src/net/sourceforge/plantuml/timingdiagram/graphic/PlayerFrame.java @@ -64,7 +64,7 @@ public class PlayerFrame { private HColor getLineColor() { final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); - return style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); + return style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); } private UStroke getUStroke() { diff --git a/src/net/sourceforge/plantuml/ugraphic/FontChecker.java b/src/net/sourceforge/plantuml/ugraphic/FontChecker.java index a48ea4f6c..01d822d16 100644 --- a/src/net/sourceforge/plantuml/ugraphic/FontChecker.java +++ b/src/net/sourceforge/plantuml/ugraphic/FontChecker.java @@ -58,7 +58,6 @@ import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.security.SFile; import net.sourceforge.plantuml.security.SImageIO; -import net.sourceforge.plantuml.svg.DarkStrategy; import net.sourceforge.plantuml.svg.LengthAdjust; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.color.HColors; @@ -66,8 +65,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColors; public class FontChecker { final private UFont font; - private static final Set SQUARE = new HashSet<>( - Arrays.asList("MI=I=XM=I=IX", "MI=I=XM=I=IXMI=I=XM=I=IX")); + private static final Set SQUARE = new HashSet<>(Arrays.asList("MI=I=XM=I=IX", "MI=I=XM=I=IXMI=I=XM=I=IX")); public FontChecker(UFont font) { this.font = font; @@ -159,7 +157,7 @@ public class FontChecker { private String getSvgImage(char c) throws IOException, TransformerException { final SvgGraphics svg = new SvgGraphics(null, true, new XDimension2D(0, 0), 1.0, null, 42, "none", - LengthAdjust.defaultValue(), DarkStrategy.IGNORE_DARK_COLOR, false); + LengthAdjust.defaultValue(), false); svg.setStrokeColor("black"); svg.svgImage(getBufferedImage(c), 0, 0); final ByteArrayOutputStream os = new ByteArrayOutputStream(); diff --git a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java index d0352e325..07ee00183 100644 --- a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java +++ b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java @@ -90,7 +90,6 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.svg.LengthAdjust; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorGradient; import net.sourceforge.plantuml.ugraphic.color.HColorSimple; @@ -110,7 +109,7 @@ public class ImageBuilder { private Animation animation; private boolean annotations; private HColor backcolor = getDefaultHBackColor(); - private ColorMapper colorMapper = new ColorMapperIdentity(); + private ColorMapper colorMapper; private XDimension2D dimension; private final FileFormatOption fileFormatOption; private UDrawable udrawable; @@ -139,6 +138,9 @@ public class ImageBuilder { private ImageBuilder(FileFormatOption fileFormatOption) { this.fileFormatOption = fileFormatOption; this.stringBounder = fileFormatOption.getDefaultStringBounder(SvgCharSizeHack.NO_HACK); + this.colorMapper = fileFormatOption.getColorMapper(); + if (this.colorMapper == null) + throw new IllegalArgumentException(); } public ImageBuilder annotations(boolean annotations) { diff --git a/src/net/sourceforge/plantuml/ugraphic/LimitFinder.java b/src/net/sourceforge/plantuml/ugraphic/LimitFinder.java index 98b1c01fa..00614e381 100644 --- a/src/net/sourceforge/plantuml/ugraphic/LimitFinder.java +++ b/src/net/sourceforge/plantuml/ugraphic/LimitFinder.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColor; public class LimitFinder extends UGraphicNo { @@ -185,7 +184,7 @@ public class LimitFinder extends UGraphicNo { } public ColorMapper getColorMapper() { - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; } public double getMaxX() { diff --git a/src/net/sourceforge/plantuml/ugraphic/UGraphicNull.java b/src/net/sourceforge/plantuml/ugraphic/UGraphicNull.java index d99d3962f..0962b60f1 100644 --- a/src/net/sourceforge/plantuml/ugraphic/UGraphicNull.java +++ b/src/net/sourceforge/plantuml/ugraphic/UGraphicNull.java @@ -40,7 +40,7 @@ import java.io.OutputStream; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.FileFormat; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColors; public class UGraphicNull extends AbstractUGraphic implements EnsureVisible { @@ -55,7 +55,7 @@ public class UGraphicNull extends AbstractUGraphic implements EnsureVisi } public UGraphicNull() { - super(HColors.BLACK, new ColorMapperIdentity(), FileFormat.PNG.getDefaultStringBounder(), "foo"); + super(HColors.BLACK, ColorMapper.IDENTITY, FileFormat.PNG.getDefaultStringBounder(), "foo"); } @Override diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapper.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapper.java index 3edcb0d9f..c2278c40b 100644 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapper.java +++ b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapper.java @@ -39,6 +39,49 @@ import java.awt.Color; public abstract class ColorMapper { + private ColorMapper() { + } + public abstract Color fromColorSimple(HColorSimple simple); + public final static ColorMapper IDENTITY = new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return simple.getAwtColor(); + } + }; + public final static ColorMapper FORCE_DARK = new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return ((HColorSimple) simple.darkSchemeTheme()).getAwtColor(); + } + }; + public final static ColorMapper LIGTHNESS_INVERSE = new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return ColorUtils.getReversed(simple.getAwtColor()); + } + }; + public static final ColorMapper MONOCHROME = new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return ColorUtils.getGrayScaleColor(simple.getAwtColor()); + } + }; + public static final ColorMapper MONOCHROME_REVERSE = new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return ColorUtils.getGrayScaleColorReverse(simple.getAwtColor()); + } + }; + + public static ColorMapper reverse(final ColorOrder order) { + return new ColorMapper() { + @Override + public Color fromColorSimple(HColorSimple simple) { + return order.getReverse(simple.getAwtColor()); + } + }; + } + } diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperForceDark.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperForceDark.java deleted file mode 100644 index c82aa0215..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperForceDark.java +++ /dev/null @@ -1,47 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.ugraphic.color; - -import java.awt.Color; - -public class ColorMapperForceDark extends ColorMapper { - - @Override - public Color fromColorSimple(HColorSimple simple) { - return ((HColorSimple) simple.darkSchemeTheme()).getColor999(); - } - -} diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperIdentity.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperIdentity.java deleted file mode 100644 index b6fe08622..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperIdentity.java +++ /dev/null @@ -1,47 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.ugraphic.color; - -import java.awt.Color; - -public class ColorMapperIdentity extends ColorMapper { - - @Override - public Color fromColorSimple(HColorSimple simple) { - return simple.getColor999(); - } - -} diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperLightnessInverse.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperLightnessInverse.java deleted file mode 100644 index 6f32b450e..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperLightnessInverse.java +++ /dev/null @@ -1,47 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.ugraphic.color; - -import java.awt.Color; - -public class ColorMapperLightnessInverse extends ColorMapper { - - @Override - public Color fromColorSimple(HColorSimple simple) { - return ColorUtils.getReversed(simple.getColor999()); - } - -} diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperMonochrome.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperMonochrome.java deleted file mode 100644 index 0559a5aa1..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperMonochrome.java +++ /dev/null @@ -1,63 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.ugraphic.color; - -import java.awt.Color; - -public class ColorMapperMonochrome extends ColorMapper { - - private final boolean reverse; - - public ColorMapperMonochrome(boolean reverse) { - this.reverse = reverse; - } - - private boolean isReverse() { - return reverse; - } - - @Override - public Color fromColorSimple(HColorSimple simple) { - if (simple.isTransparent()) - return simple.getColor999(); - - if (isReverse()) - return ColorUtils.getGrayScaleColorReverse(simple.getColor999()); - - return ColorUtils.getGrayScaleColor(simple.getColor999()); - } - -} diff --git a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperReverse.java b/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperReverse.java deleted file mode 100644 index 3b0e68acc..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/color/ColorMapperReverse.java +++ /dev/null @@ -1,57 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (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 - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.ugraphic.color; - -import java.awt.Color; - -public class ColorMapperReverse extends ColorMapper { - - private final ColorOrder order; - - public ColorMapperReverse(ColorOrder order) { - this.order = order; - } - - private Color getReverse(Color color) { - return order.getReverse(color); - } - - @Override - public Color fromColorSimple(HColorSimple simple) { - return getReverse(simple.getColor999()); - } - -} diff --git a/src/net/sourceforge/plantuml/ugraphic/color/HColorSet.java b/src/net/sourceforge/plantuml/ugraphic/color/HColorSet.java index 73939f457..409d66943 100644 --- a/src/net/sourceforge/plantuml/ugraphic/color/HColorSet.java +++ b/src/net/sourceforge/plantuml/ugraphic/color/HColorSet.java @@ -45,7 +45,6 @@ import java.util.Set; import java.util.TreeSet; import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; @@ -301,15 +300,11 @@ public class HColorSet { } public HColor getColorOrWhite(String s) { - return getColorOrWhite(null, s); - } - - public HColor getColorOrWhite(ThemeStyle UNUSED, String s) { if (isColorValid(Objects.requireNonNull(s)) == false) return HColors.WHITE; try { - return getColor(null, s); + return getColor(s); } catch (NoSuchColorException e) { assert false; return HColors.WHITE; @@ -317,10 +312,10 @@ public class HColorSet { } public HColor getColorLEGACY(String s) throws NoSuchColorException { - return getColor(null, s); + return getColor(s); } - public HColor getColor(ThemeStyle UNUSED, String s) throws NoSuchColorException { + public HColor getColor(String s) throws NoSuchColorException { if (isColorValid(Objects.requireNonNull(s)) == false) throw new NoSuchColorException(); diff --git a/src/net/sourceforge/plantuml/ugraphic/color/HColorSimple.java b/src/net/sourceforge/plantuml/ugraphic/color/HColorSimple.java index b52584192..efd114297 100644 --- a/src/net/sourceforge/plantuml/ugraphic/color/HColorSimple.java +++ b/src/net/sourceforge/plantuml/ugraphic/color/HColorSimple.java @@ -128,7 +128,7 @@ public class HColorSimple extends HColor { this.dark = dark; } - public Color getColor999() { + public Color getAwtColor() { return color; } @@ -204,6 +204,8 @@ public class HColorSimple extends HColor { @Override public Color toColor(ColorMapper mapper) { + if (this.isTransparent()) + return getAwtColor(); return mapper.fromColorSimple(this); } diff --git a/src/net/sourceforge/plantuml/ugraphic/comp/SlotFinder.java b/src/net/sourceforge/plantuml/ugraphic/comp/SlotFinder.java index d529968e5..b718181c5 100644 --- a/src/net/sourceforge/plantuml/ugraphic/comp/SlotFinder.java +++ b/src/net/sourceforge/plantuml/ugraphic/comp/SlotFinder.java @@ -54,7 +54,6 @@ import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.HColor; public class SlotFinder extends UGraphicNo { @@ -163,7 +162,7 @@ public class SlotFinder extends UGraphicNo { } public ColorMapper getColorMapper() { - return new ColorMapperIdentity(); + return ColorMapper.IDENTITY; } public SlotSet getSlotSet() { diff --git a/src/net/sourceforge/plantuml/ugraphic/debug/UGraphicDebug.java b/src/net/sourceforge/plantuml/ugraphic/debug/UGraphicDebug.java index 32c5b0110..c130790d8 100644 --- a/src/net/sourceforge/plantuml/ugraphic/debug/UGraphicDebug.java +++ b/src/net/sourceforge/plantuml/ugraphic/debug/UGraphicDebug.java @@ -62,7 +62,7 @@ import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorMiddle; import net.sourceforge.plantuml.ugraphic.color.HColorSimple; @@ -98,7 +98,7 @@ public class UGraphicDebug extends AbstractCommonUGraphic implements ClipContain public UGraphicDebug(double scaleFactor, XDimension2D dim, String svgLinkTarget, String hoverPathColorRGB, long seed, String preserveAspectRatio) { - super(HColors.WHITE, new ColorMapperIdentity(), new StringBounderDebug()); + super(HColors.WHITE, ColorMapper.IDENTITY, new StringBounderDebug()); this.output = new ArrayList<>(); this.scaleFactor = scaleFactor; this.dim = dim; @@ -260,7 +260,7 @@ public class UGraphicDebug extends AbstractCommonUGraphic implements ClipContain if (color instanceof HColorSimple) { final HColorSimple simple = (HColorSimple) color; - final Color internal = simple.getColor999(); + final Color internal = simple.getAwtColor(); return Integer.toHexString(internal.getRGB()); } diff --git a/src/net/sourceforge/plantuml/ugraphic/g2d/DriverRectangleG2d.java b/src/net/sourceforge/plantuml/ugraphic/g2d/DriverRectangleG2d.java index fa122f8d5..78c31175b 100644 --- a/src/net/sourceforge/plantuml/ugraphic/g2d/DriverRectangleG2d.java +++ b/src/net/sourceforge/plantuml/ugraphic/g2d/DriverRectangleG2d.java @@ -153,7 +153,7 @@ public class DriverRectangleG2d extends DriverShadowedG2d implements UDriver { final HColorGradient gr = (HColorGradient) color; svg.setStrokeColor(gr.getColor1().toSvg(mapper)); } else { - final HColor dark = color == null ? null : color.darkSchemeTheme(); - if (dark == color) - svg.setStrokeColor(color.toSvg(mapper)); - else - svg.setStrokeColor(color.toSvg(mapper), dark.toSvg(mapper)); + svg.setStrokeColor(color.toSvg(mapper)); } svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); svg.svgLine(x, y, x2, y2, shape.getDeltaShadow()); diff --git a/src/net/sourceforge/plantuml/ugraphic/svg/DriverPathSvg.java b/src/net/sourceforge/plantuml/ugraphic/svg/DriverPathSvg.java index cc7280737..071b21c23 100644 --- a/src/net/sourceforge/plantuml/ugraphic/svg/DriverPathSvg.java +++ b/src/net/sourceforge/plantuml/ugraphic/svg/DriverPathSvg.java @@ -59,11 +59,7 @@ public class DriverPathSvg extends DriverShadowedG2d implements UDriver { gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); } else { - final HColor dark = background == null ? null : background.darkSchemeTheme(); - if (dark == background) - svg.setFillColor(background.toSvg(mapper)); - else - svg.setFillColor(background.toSvg(mapper), dark.toSvg(mapper)); + svg.setFillColor(background.toSvg(mapper)); } } @@ -104,11 +100,7 @@ public class DriverRectangleSvg implements UDriver { gr.getPolicy()); svg.setStrokeColor("url(#" + id + ")"); } else { - final HColor dark = color == null ? null : color.darkSchemeTheme(); - if (dark == color) - svg.setStrokeColor(color.toSvg(mapper)); - else - svg.setStrokeColor(color.toSvg(mapper), dark.toSvg(mapper)); + svg.setStrokeColor(color.toSvg(mapper)); } } diff --git a/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextSvg.java b/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextSvg.java index a3a3cc42d..fe38e0c05 100644 --- a/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextSvg.java +++ b/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextSvg.java @@ -94,8 +94,8 @@ public class DriverTextSvg implements UDriver { String text = shape.getText(); if (text.matches("^\\s*$")) - text = text.replace(' ', (char)160); - + text = text.replace(' ', (char) 160); + if (text.startsWith(" ")) { final double space = stringBounder.calculateDimension(font, " ").getWidth(); while (text.startsWith(" ")) { @@ -126,11 +126,7 @@ public class DriverTextSvg implements UDriver { } final HColor textColor = fontConfiguration.getColor(); - final HColor dark = textColor == null ? null : textColor.darkSchemeTheme(); - if (dark == textColor) - svg.setFillColor(textColor.toSvg(mapper)); - else - svg.setFillColor(textColor.toSvg(mapper), dark.toSvg(mapper)); + svg.setFillColor(textColor.toSvg(mapper)); svg.text(text, x, y, font.getFamily(UFontContext.SVG), font.getSize(), fontWeight, fontStyle, textDecoration, width, fontConfiguration.getAttributes(), backColor); diff --git a/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java b/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java index dad2ab0ea..d29967c41 100644 --- a/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java +++ b/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; -import net.sourceforge.plantuml.svg.DarkStrategy; import net.sourceforge.plantuml.svg.LengthAdjust; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; @@ -89,12 +88,12 @@ public class UGraphicSvg extends AbstractUGraphic implements ClipCo register(); } - public UGraphicSvg(HColor defaultBackground, boolean svgDimensionStyle, XDimension2D minDim, ColorMapper colorMapper, - boolean textAsPath, double scale, String linkTarget, String hover, long seed, String preserveAspectRatio, - StringBounder stringBounder, LengthAdjust lengthAdjust, boolean interactive) { + public UGraphicSvg(HColor defaultBackground, boolean svgDimensionStyle, XDimension2D minDim, + ColorMapper colorMapper, boolean textAsPath, double scale, String linkTarget, String hover, long seed, + String preserveAspectRatio, StringBounder stringBounder, LengthAdjust lengthAdjust, boolean interactive) { this(defaultBackground, minDim, colorMapper, new SvgGraphics(defaultBackground.toSvg(colorMapper), svgDimensionStyle, minDim, scale, hover, seed, - preserveAspectRatio, lengthAdjust, DarkStrategy.IGNORE_DARK_COLOR, interactive), + preserveAspectRatio, lengthAdjust, interactive), textAsPath, linkTarget, stringBounder, interactive); if (defaultBackground instanceof HColorGradient) { final SvgGraphics svg = getGraphicObject(); @@ -155,7 +154,8 @@ public class UGraphicSvg extends AbstractUGraphic implements ClipCo getGraphicObject().addComment(metadata); if (interactive) { - // For performance reasons and also because we want the entire graph DOM to be create so we can register + // For performance reasons and also because we want the entire graph DOM to be + // create so we can register // the event handlers on them we will append to the end of the document getGraphicObject().addStyle("onmouseinteractivefooter.css"); getGraphicObject().addScriptTag("https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"); diff --git a/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java b/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java index a41b9889d..5e108585c 100644 --- a/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java +++ b/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java @@ -52,7 +52,7 @@ import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColors; public class UGraphicTxt extends AbstractCommonUGraphic implements ClipContainer { @@ -70,7 +70,7 @@ public class UGraphicTxt extends AbstractCommonUGraphic implements ClipContainer } public UGraphicTxt() { - super(HColors.BLACK, new ColorMapperIdentity(), new TextStringBounder()); + super(HColors.BLACK, ColorMapper.IDENTITY, new TextStringBounder()); this.charArea = new UmlCharAreaImpl(); } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index e1e51eadd..0dff89607 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -81,7 +81,7 @@ public class Version { } public static int beta() { - final int beta = 7; + final int beta = 8; return beta; } diff --git a/src/net/sourceforge/plantuml/wbs/CommandWBSItem.java b/src/net/sourceforge/plantuml/wbs/CommandWBSItem.java index 0d196a9a2..2f10f2377 100644 --- a/src/net/sourceforge/plantuml/wbs/CommandWBSItem.java +++ b/src/net/sourceforge/plantuml/wbs/CommandWBSItem.java @@ -72,8 +72,7 @@ public class CommandWBSItem extends SingleLineCommand2 { final String stringColor = arg.get("BACKCOLOR", 0); HColor backColor = null; if (stringColor != null) - backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), - stringColor); + backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(stringColor); Direction dir = type.contains("-") ? Direction.LEFT : Direction.RIGHT; final String direction = arg.get("DIRECTION", 0); diff --git a/src/net/sourceforge/plantuml/wbs/CommandWBSItemMultiline.java b/src/net/sourceforge/plantuml/wbs/CommandWBSItemMultiline.java index f2b66122b..a3dafb2d2 100644 --- a/src/net/sourceforge/plantuml/wbs/CommandWBSItemMultiline.java +++ b/src/net/sourceforge/plantuml/wbs/CommandWBSItemMultiline.java @@ -101,8 +101,7 @@ public class CommandWBSItemMultiline extends CommandMultilines2 { final String stringColor = line0.get("BACKCOLOR", 0); HColor backColor = null; if (stringColor != null) { - backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), - stringColor); + backColor = diagram.getSkinParam().getIHtmlColorSet().getColor(stringColor); } Direction dir = Direction.RIGHT; diff --git a/src/net/sourceforge/plantuml/wbs/ITFLeaf.java b/src/net/sourceforge/plantuml/wbs/ITFLeaf.java index ee6477fcc..470562ac0 100644 --- a/src/net/sourceforge/plantuml/wbs/ITFLeaf.java +++ b/src/net/sourceforge/plantuml/wbs/ITFLeaf.java @@ -58,7 +58,7 @@ class ITFLeaf extends AbstractTextBlock implements ITF { this.box = FtileBoxOld.createWbs(style, skinParam, label); } else { final TextBlock text = label.create0( - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), + style.getFontConfiguration(skinParam.getIHtmlColorSet()), style.getHorizontalAlignment(), skinParam, style.wrapWidth(), CreoleMode.FULL, null, null); this.box = TextBlockUtils.withMargin(text, 0, 3, 1, 1); } diff --git a/src/net/sourceforge/plantuml/wbs/WBSDiagram.java b/src/net/sourceforge/plantuml/wbs/WBSDiagram.java index 6d0b50b5d..158a3c1d5 100644 --- a/src/net/sourceforge/plantuml/wbs/WBSDiagram.java +++ b/src/net/sourceforge/plantuml/wbs/WBSDiagram.java @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -69,8 +68,8 @@ public class WBSDiagram extends UmlDiagram { return new DiagramDescription("Work Breakdown Structure"); } - public WBSDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.WBS, null); + public WBSDiagram(UmlSource source) { + super(source, UmlDiagramType.WBS, null); } @Override diff --git a/src/net/sourceforge/plantuml/wbs/WBSDiagramFactory.java b/src/net/sourceforge/plantuml/wbs/WBSDiagramFactory.java index 828b33e0e..2998f90fa 100644 --- a/src/net/sourceforge/plantuml/wbs/WBSDiagramFactory.java +++ b/src/net/sourceforge/plantuml/wbs/WBSDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -64,8 +63,8 @@ public class WBSDiagramFactory extends PSystemCommandFactory { } @Override - public WBSDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new WBSDiagram(style, source); + public WBSDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new WBSDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/wbs/WBSTextBlock.java b/src/net/sourceforge/plantuml/wbs/WBSTextBlock.java index ef63188d4..36f434b7a 100644 --- a/src/net/sourceforge/plantuml/wbs/WBSTextBlock.java +++ b/src/net/sourceforge/plantuml/wbs/WBSTextBlock.java @@ -66,8 +66,7 @@ abstract class WBSTextBlock extends AbstractTextBlock { final protected void drawLine(UGraphic ug, XPoint2D p1, XPoint2D p2) { final ULine line = new ULine(p1, p2); - getStyleUsed().applyStrokeAndLineColor(ug.apply(new UTranslate(p1)), skinParam.getIHtmlColorSet(), - skinParam.getThemeStyle()).draw(line); + getStyleUsed().applyStrokeAndLineColor(ug.apply(new UTranslate(p1)), skinParam.getIHtmlColorSet()).draw(line); } private Style getStyleUsed() { @@ -89,7 +88,7 @@ abstract class WBSTextBlock extends AbstractTextBlock { return FtileBoxOld.createWbs(style, idea.withBackColor(skinParam), label); final TextBlock text = label.create0( - style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()), + style.getFontConfiguration(skinParam.getIHtmlColorSet()), style.getHorizontalAlignment(), skinParam, style.wrapWidth(), CreoleMode.FULL, null, null); return TextBlockUtils.withMargin(text, 0, 3, 1, 1); } diff --git a/src/net/sourceforge/plantuml/wire/CommandComponent.java b/src/net/sourceforge/plantuml/wire/CommandComponent.java index 976b7e413..69a87e6ee 100644 --- a/src/net/sourceforge/plantuml/wire/CommandComponent.java +++ b/src/net/sourceforge/plantuml/wire/CommandComponent.java @@ -92,7 +92,7 @@ public class CommandComponent extends SingleLineCommand2 { final String stringColor = arg.get("COLOR", 0); HColor color = null; if (stringColor != null) - color = HColorSet.instance().getColor(diagram.getSkinParam().getThemeStyle(), stringColor); + color = HColorSet.instance().getColor(stringColor); return diagram.addComponent(indent, name, width, height, color); } diff --git a/src/net/sourceforge/plantuml/wire/CommandSpot.java b/src/net/sourceforge/plantuml/wire/CommandSpot.java index 5ce596da5..b1e754b76 100644 --- a/src/net/sourceforge/plantuml/wire/CommandSpot.java +++ b/src/net/sourceforge/plantuml/wire/CommandSpot.java @@ -85,7 +85,7 @@ public class CommandSpot extends SingleLineCommand2 { final String stringColor = arg.get("COLOR", 0); HColor color = null; if (stringColor != null) - color = HColorSet.instance().getColor(diagram.getSkinParam().getThemeStyle(), stringColor); + color = HColorSet.instance().getColor(stringColor); final String x = arg.get("X", 0); final String y = arg.get("Y", 0); diff --git a/src/net/sourceforge/plantuml/wire/CommandWLink.java b/src/net/sourceforge/plantuml/wire/CommandWLink.java index d38bc0342..198c0f3df 100644 --- a/src/net/sourceforge/plantuml/wire/CommandWLink.java +++ b/src/net/sourceforge/plantuml/wire/CommandWLink.java @@ -98,7 +98,7 @@ public class CommandWLink extends SingleLineCommand2 { final String stringColor = arg.get("COLOR", 0); HColor color = null; if (stringColor != null) - color = HColorSet.instance().getColor(diagram.getSkinParam().getThemeStyle(), stringColor); + color = HColorSet.instance().getColor(stringColor); final Display label; if (arg.get("MESSAGE", 0) == null) { diff --git a/src/net/sourceforge/plantuml/wire/WireDiagram.java b/src/net/sourceforge/plantuml/wire/WireDiagram.java index 86c3ce299..f1c8e7319 100644 --- a/src/net/sourceforge/plantuml/wire/WireDiagram.java +++ b/src/net/sourceforge/plantuml/wire/WireDiagram.java @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.awt.geom.XDimension2D; import net.sourceforge.plantuml.awt.geom.XRectangle2D; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -71,8 +70,8 @@ public class WireDiagram extends UmlDiagram { return new DiagramDescription("Wire Diagram"); } - public WireDiagram(ThemeStyle style, UmlSource source) { - super(style, source, UmlDiagramType.WIRE, null); + public WireDiagram(UmlSource source) { + super(source, UmlDiagramType.WIRE, null); } @Override diff --git a/src/net/sourceforge/plantuml/wire/WireDiagramFactory.java b/src/net/sourceforge/plantuml/wire/WireDiagramFactory.java index 4da9f9646..7d04c7da4 100644 --- a/src/net/sourceforge/plantuml/wire/WireDiagramFactory.java +++ b/src/net/sourceforge/plantuml/wire/WireDiagramFactory.java @@ -39,7 +39,6 @@ import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommonCommands; import net.sourceforge.plantuml.command.PSystemCommandFactory; @@ -69,8 +68,8 @@ public class WireDiagramFactory extends PSystemCommandFactory { } @Override - public WireDiagram createEmptyDiagram(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { - return new WireDiagram(style, source); + public WireDiagram createEmptyDiagram(UmlSource source, ISkinSimple skinParam) { + return new WireDiagram(source); } } diff --git a/src/net/sourceforge/plantuml/yaml/YamlDiagramFactory.java b/src/net/sourceforge/plantuml/yaml/YamlDiagramFactory.java index 5ee26f382..836852e4c 100644 --- a/src/net/sourceforge/plantuml/yaml/YamlDiagramFactory.java +++ b/src/net/sourceforge/plantuml/yaml/YamlDiagramFactory.java @@ -41,7 +41,6 @@ import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.command.PSystemAbstractFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; @@ -62,7 +61,7 @@ public class YamlDiagramFactory extends PSystemAbstractFactory { } @Override - public Diagram createSystem(ThemeStyle style, UmlSource source, ISkinSimple skinParam) { + public Diagram createSystem(UmlSource source, ISkinSimple skinParam) { final List highlighted = new ArrayList<>(); JsonValue yaml = null; StyleExtractor styleExtractor = null; @@ -86,7 +85,7 @@ public class YamlDiagramFactory extends PSystemAbstractFactory { } catch (Exception e) { Logme.error(e); } - final JsonDiagram result = new JsonDiagram(style, source, UmlDiagramType.YAML, yaml, highlighted); + final JsonDiagram result = new JsonDiagram(source, UmlDiagramType.YAML, yaml, highlighted); if (styleExtractor != null) { styleExtractor.applyStyles(result.getSkinParam()); final String title = styleExtractor.getTitle(); diff --git a/test/net/sourceforge/plantuml/SkinParamTest.java b/test/net/sourceforge/plantuml/SkinParamTest.java index c7bebc384..c53f4e792 100644 --- a/test/net/sourceforge/plantuml/SkinParamTest.java +++ b/test/net/sourceforge/plantuml/SkinParamTest.java @@ -9,7 +9,6 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import org.junit.jupiter.params.provider.EnumSource; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; @@ -20,7 +19,7 @@ import net.sourceforge.plantuml.svek.ConditionEndStyle; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svg.LengthAdjust; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; +import net.sourceforge.plantuml.ugraphic.color.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColors; class SkinParamTest { @@ -37,7 +36,7 @@ class SkinParamTest { @EnumSource(UmlDiagramType.class) public void testDefaultValues(UmlDiagramType umlDiagramType) { - final SkinParam skinParam = SkinParam.create(umlDiagramType, ThemeStyle.LIGHT_REGULAR); + final SkinParam skinParam = SkinParam.create(umlDiagramType); final Stereotype fooStereotype = Stereotype.build("<>"); assertThat(skinParam.actorStyle()).isEqualTo(ActorStyle.STICKMAN); @@ -54,7 +53,7 @@ class SkinParamTest { assertThat(skinParam.colorArrowSeparationSpace()).isZero(); - assertThat(skinParam.getColorMapper()).isInstanceOf(ColorMapperIdentity.class); + assertThat(skinParam.getColorMapper()).isEqualTo(ColorMapper.IDENTITY); assertThat(skinParam.componentStyle()).isEqualTo(ComponentStyle.UML2); @@ -502,7 +501,7 @@ class SkinParamTest { private SkinParam createSkinParam(String... keyValuePairs) { // Using SEQUENCE here is an arbitrary decision that should not affect test outcome - final SkinParam skinParam = SkinParam.create(UmlDiagramType.SEQUENCE, ThemeStyle.LIGHT_REGULAR); + final SkinParam skinParam = SkinParam.create(UmlDiagramType.SEQUENCE); for (int i = 0; i < keyValuePairs.length; i += 2) { skinParam.setParam(StringUtils.goLowerCase(keyValuePairs[i]), keyValuePairs[i + 1]); } diff --git a/test/net/sourceforge/plantuml/ugraphic/ImageBuilderTest.java b/test/net/sourceforge/plantuml/ugraphic/ImageBuilderTest.java index 65fcabfa5..e06bdd25e 100644 --- a/test/net/sourceforge/plantuml/ugraphic/ImageBuilderTest.java +++ b/test/net/sourceforge/plantuml/ugraphic/ImageBuilderTest.java @@ -3,7 +3,6 @@ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.PlainDiagram; import net.sourceforge.plantuml.StringLocated; -import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.creole.legacy.PSystemCreole; import net.sourceforge.plantuml.wbs.WBSDiagram; @@ -49,7 +48,7 @@ class ImageBuilderTest { nullValues = {"NULL"} ) public void test_preserveAspectRatio_styledDiagram(String inSkinParam, String inFileFormatOption, String expected) throws Exception { - final WBSDiagram diagram = new WBSDiagram(ThemeStyle.LIGHT_REGULAR, UmlSource.create(new ArrayList(), false)); + final WBSDiagram diagram = new WBSDiagram(UmlSource.create(new ArrayList(), false)); FileFormatOption fileFormatOption = new FileFormatOption(DEBUG); if (inSkinParam != null) diagram.setParam("preserveAspectRatio", inSkinParam); diff --git a/test/nonreg/simple/A0002_TestResult.java b/test/nonreg/simple/A0002_TestResult.java index dc91b8c3f..30cb5ee17 100644 --- a/test/nonreg/simple/A0002_TestResult.java +++ b/test/nonreg/simple/A0002_TestResult.java @@ -12,6 +12,16 @@ svgLinkTarget: _top hoverPathColorRGB: null preserveAspectRatio: none +RECTANGLE: + pt1: [ 15.0000 ; 12.5000 ] + pt2: [ 746.0498 ; 30.5000 ] + xCorner: 0 + yCorner: 0 + stroke: 0.0-0.0-1.0 + shadow: 0 + color: NULL_COLOR + backcolor: NULL_COLOR + ELLIPSE: pt1: [ 170.9019 ; 35.5000 ] pt2: [ 190.9019 ; 55.5000 ]