mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 04:55:10 +00:00
wip
This commit is contained in:
parent
a250727e18
commit
1fd8715ec9
@ -36,7 +36,7 @@
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
|
||||
class ExposantChange implements FontChange {
|
||||
|
||||
|
||||
private final FontPosition fontPosition;
|
||||
|
||||
ExposantChange(FontPosition fontPosition) {
|
||||
|
@ -35,7 +35,6 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
|
||||
|
||||
public enum GraphicPosition {
|
||||
BOTTOM, BACKGROUND_CORNER_BOTTOM_RIGHT, BACKGROUND_CORNER_TOP_RIGHT
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
|
||||
|
||||
public interface Line extends TextBlock {
|
||||
|
||||
HorizontalAlignment getHorizontalAlignment();
|
||||
|
@ -108,9 +108,9 @@ public class SkinParameter {
|
||||
ColorParam.hexagonBackground, ColorParam.hexagonBorder, FontParam.HEXAGON, FontParam.HEXAGON_STEREOTYPE,
|
||||
CornerParam.hexagon, LineParam.hexagonBorder);
|
||||
|
||||
public static final SkinParameter PERSON = new SkinParameter(SName.person, "PERSON",
|
||||
ColorParam.personBackground, ColorParam.personBorder, FontParam.PERSON, FontParam.PERSON_STEREOTYPE,
|
||||
CornerParam.person, LineParam.personBorder);
|
||||
public static final SkinParameter PERSON = new SkinParameter(SName.person, "PERSON", ColorParam.personBackground,
|
||||
ColorParam.personBorder, FontParam.PERSON, FontParam.PERSON_STEREOTYPE, CornerParam.person,
|
||||
LineParam.personBorder);
|
||||
|
||||
public static final SkinParameter ARCHIMATE = new SkinParameter(SName.archimate, "ARCHIMATE",
|
||||
ColorParam.archimateBackground, ColorParam.archimateBorder, FontParam.ARCHIMATE,
|
||||
|
@ -64,7 +64,7 @@ public class TextBlockGeneric extends AbstractTextBlock implements TextBlock {
|
||||
ug = ug.apply(border);
|
||||
final Dimension2D dim = calculateDimension(ug.getStringBounder());
|
||||
ug.apply(new UStroke(2, 2, 1)).draw(new URectangle(dim.getWidth(), dim.getHeight()));
|
||||
|
||||
|
||||
textBlock.drawU(ug);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,8 @@ public class TextBlockRecentred extends AbstractTextBlock implements TextBlockBa
|
||||
// if (cachedMinMax == null) {
|
||||
// cachedMinMax = getMinMaxSlow(stringBounder);
|
||||
// }
|
||||
// // assert cachedMinMax.toString().equals(getMinMaxSlow(stringBounder).toString());
|
||||
// // assert
|
||||
// cachedMinMax.toString().equals(getMinMaxSlow(stringBounder).toString());
|
||||
// return cachedMinMax;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,8 @@ public class TextBlockSprited extends AbstractTextBlock {
|
||||
final double heightCircledCharacter = sprite.calculateDimension(stringBounder).getHeight();
|
||||
|
||||
final Dimension2D dim = parent.calculateDimension(stringBounder);
|
||||
return new Dimension2DDouble(dim.getWidth() + widthCircledCharacter, Math.max(heightCircledCharacter,
|
||||
dim.getHeight()));
|
||||
return new Dimension2DDouble(dim.getWidth() + widthCircledCharacter,
|
||||
Math.max(heightCircledCharacter, dim.getHeight()));
|
||||
}
|
||||
|
||||
private double getCircledCharacterWithAndMargin(StringBounder stringBounder) {
|
||||
|
@ -102,10 +102,10 @@ public class TextBlockVertical2 extends AbstractTextBlock implements TextBlock,
|
||||
final Dimension2D dimb = block.calculateDimension(ug.getStringBounder());
|
||||
if (block instanceof TextBlockBackcolored) {
|
||||
final HColor back = ((TextBlockBackcolored) block).getBackcolor();
|
||||
if (back != null)
|
||||
if (back != null)
|
||||
ug.apply(UTranslate.dy(y)).apply(back).apply(back.bg())
|
||||
.draw(new URectangle(dimtotal.getWidth(), dimb.getHeight()));
|
||||
|
||||
|
||||
}
|
||||
if (horizontalAlignment == HorizontalAlignment.LEFT) {
|
||||
block.drawU(ug.apply(UTranslate.dy(y)));
|
||||
|
@ -69,7 +69,7 @@ public class TextBlockWithUrl implements TextBlock {
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return block.calculateDimension(stringBounder);
|
||||
}
|
||||
|
||||
|
||||
public MinMax getMinMax(StringBounder stringBounder) {
|
||||
return block.getMinMax(stringBounder);
|
||||
}
|
||||
|
@ -61,8 +61,7 @@ public class TileImage extends AbstractTextBlock implements TextBlock {
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
ug.apply(UTranslate.dy(vspace))
|
||||
.draw(new UImage(new PixelImage(image, AffineTransformType.TYPE_BILINEAR)));
|
||||
ug.apply(UTranslate.dy(vspace)).draw(new UImage(new PixelImage(image, AffineTransformType.TYPE_BILINEAR)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,6 +35,10 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.Url;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UGroupType;
|
||||
@ -43,10 +47,6 @@ import net.sourceforge.plantuml.ugraphic.UShape;
|
||||
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class UGraphicDelegator implements UGraphic {
|
||||
|
||||
final private UGraphic ug;
|
||||
|
@ -51,7 +51,7 @@ class USymbolActor extends USymbolSimpleAbstract {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.ACTOR;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.actor;
|
||||
@ -60,7 +60,8 @@ class USymbolActor extends USymbolSimpleAbstract {
|
||||
@Override
|
||||
protected TextBlock getDrawing(SymbolContext symbolContext) {
|
||||
// final double deltaShadow = symbolContext.isShadowing() ? 4.0 : 0.0;
|
||||
// final SymbolContext tmp = symbolContext.withDeltaShadow(deltaShadow).withStroke(new UStroke(2));
|
||||
// final SymbolContext tmp =
|
||||
// symbolContext.withDeltaShadow(deltaShadow).withStroke(new UStroke(2));
|
||||
return actorStyle.getTextBlock(symbolContext);
|
||||
}
|
||||
|
||||
|
@ -52,13 +52,12 @@ class USymbolArtifact extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.ARTIFACT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.artifact;
|
||||
}
|
||||
|
||||
|
||||
private void drawArtifact(UGraphic ug, double widthTotal, double heightTotal, double shadowing,
|
||||
double roundCorner) {
|
||||
|
||||
|
@ -44,13 +44,12 @@ class USymbolBoundary extends USymbolSimpleAbstract {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.BOUNDARY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.boundary;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected TextBlock getDrawing(SymbolContext symbolContext) {
|
||||
return new Boundary(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0));
|
||||
|
@ -52,13 +52,12 @@ class USymbolCard extends USymbol {
|
||||
public USymbolCard(SkinParameter skinParameter) {
|
||||
this.skinParameter = skinParameter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.card;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SkinParameter getSkinParameter() {
|
||||
return skinParameter;
|
||||
|
@ -61,13 +61,12 @@ class USymbolCloud extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.CLOUD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.cloud;
|
||||
}
|
||||
|
||||
|
||||
private void drawCloud(UGraphic ug, double width, double height, double shadowing) {
|
||||
final UPath shape = getSpecificFrontierForCloud(width, height);
|
||||
shape.setDeltaShadow(shadowing);
|
||||
|
@ -63,13 +63,12 @@ class USymbolCollections extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return skinParameter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.collections;
|
||||
}
|
||||
|
||||
|
||||
private void drawCollections(UGraphic ug, double width, double height, double shadowing, double roundCorner) {
|
||||
final URectangle small = new URectangle(width - getDeltaCollection(), height - getDeltaCollection())
|
||||
.rounded(roundCorner);
|
||||
|
@ -51,13 +51,12 @@ class USymbolComponent1 extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.COMPONENT1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.component;
|
||||
}
|
||||
|
||||
|
||||
private void drawComponent1(UGraphic ug, double widthTotal, double heightTotal, double shadowing,
|
||||
double roundCorner) {
|
||||
|
||||
|
@ -51,13 +51,12 @@ class USymbolComponent2 extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.COMPONENT2;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.component;
|
||||
}
|
||||
|
||||
|
||||
private void drawComponent2(UGraphic ug, double widthTotal, double heightTotal, double shadowing,
|
||||
double roundCorner) {
|
||||
|
||||
|
@ -44,13 +44,12 @@ class USymbolControl extends USymbolSimpleAbstract {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.CONTROL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.control;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected TextBlock getDrawing(final SymbolContext symbolContext) {
|
||||
return new Control(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0));
|
||||
|
@ -54,13 +54,12 @@ class USymbolDatabase extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.DATABASE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.database;
|
||||
}
|
||||
|
||||
|
||||
private void drawDatabase(UGraphic ug, double width, double height, double shadowing) {
|
||||
final UPath shape = new UPath();
|
||||
shape.setDeltaShadow(shadowing);
|
||||
|
@ -44,13 +44,12 @@ class USymbolEntityDomain extends USymbolSimpleAbstract {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.ENTITY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.entity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected TextBlock getDrawing(final SymbolContext symbolContext) {
|
||||
return new EntityDomain(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0));
|
||||
|
@ -55,13 +55,12 @@ class USymbolFile extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.FILE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.file;
|
||||
}
|
||||
|
||||
|
||||
private void drawFile(UGraphic ug, double width, double height, double shadowing, double roundCorner) {
|
||||
final int cornersize = 10;
|
||||
final Shadowable out;
|
||||
|
@ -77,13 +77,12 @@ public class USymbolFolder extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return skinParameter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return sname;
|
||||
}
|
||||
|
||||
|
||||
private void drawFolder(UGraphic ug, double width, double height, Dimension2D dimTitle, double shadowing,
|
||||
double roundCorner) {
|
||||
|
||||
|
@ -49,13 +49,12 @@ public class USymbolHexagon extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.HEXAGON;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.hexagon;
|
||||
}
|
||||
|
||||
|
||||
private final double marginY = 5;
|
||||
|
||||
@Override
|
||||
|
@ -44,13 +44,12 @@ public class USymbolInterface extends USymbolSimpleAbstract {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.INTERFACE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.interface_;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected TextBlock getDrawing(SymbolContext symbolContext) {
|
||||
return new CircleInterface2(symbolContext.getBackColor(), symbolContext.getForeColor(),
|
||||
|
@ -50,13 +50,12 @@ class USymbolLabel extends USymbol {
|
||||
public USymbolLabel(SkinParameter skinParameter) {
|
||||
this.skinParameter = skinParameter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.label;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SkinParameter getSkinParameter() {
|
||||
return skinParameter;
|
||||
|
@ -57,13 +57,12 @@ class USymbolNode extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.NODE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.node;
|
||||
}
|
||||
|
||||
|
||||
// public USymbolNode(HorizontalAlignment stereotypeAlignement) {
|
||||
// this.stereotypeAlignement = stereotypeAlignement;
|
||||
// }
|
||||
|
@ -51,13 +51,12 @@ class USymbolPerson extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.PERSON;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.person;
|
||||
}
|
||||
|
||||
|
||||
private void drawHeadAndBody(UGraphic ug, double shadowing, Dimension2D dimBody, double headSize) {
|
||||
final UEllipse head = new UEllipse(headSize, headSize);
|
||||
final URectangle body = new URectangle(dimBody).rounded(headSize);
|
||||
|
@ -53,13 +53,12 @@ class USymbolQueue extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.QUEUE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.queue;
|
||||
}
|
||||
|
||||
|
||||
private final double dx = 5;
|
||||
|
||||
private void drawQueue(UGraphic ug, double width, double height, double shadowing) {
|
||||
|
@ -53,13 +53,12 @@ class USymbolStack extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.STACK;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.stack;
|
||||
}
|
||||
|
||||
|
||||
private void drawQueue(UGraphic ug, double width, double height, double shadowing, double roundCorner) {
|
||||
final double border = 15;
|
||||
|
||||
|
@ -47,13 +47,12 @@ class USymbolTogether extends USymbol {
|
||||
public SkinParameter getSkinParameter() {
|
||||
return SkinParameter.STORAGE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SName getSName() {
|
||||
return SName.storage;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype,
|
||||
final SymbolContext symbolContext, final HorizontalAlignment stereoAlignment) {
|
||||
@ -62,7 +61,8 @@ class USymbolTogether extends USymbol {
|
||||
|
||||
@Override
|
||||
public TextBlock asBig(final TextBlock title, HorizontalAlignment labelAlignment, final TextBlock stereotype,
|
||||
final double width, final double height, final SymbolContext symbolContext, final HorizontalAlignment stereoAlignment) {
|
||||
final double width, final double height, final SymbolContext symbolContext,
|
||||
final HorizontalAlignment stereoAlignment) {
|
||||
return new AbstractTextBlock() {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
|
@ -253,6 +253,8 @@ public class FromSkinparamToStyle {
|
||||
final boolean complex = value.contains(";");
|
||||
if (complex) {
|
||||
// System.err.println("key=" + key + " value=" + value);
|
||||
if (value.startsWith(";"))
|
||||
value = " " + value;
|
||||
final StringTokenizer st = new StringTokenizer(value, ";");
|
||||
value = st.nextToken();
|
||||
while (st.hasMoreTokens()) {
|
||||
@ -272,8 +274,9 @@ public class FromSkinparamToStyle {
|
||||
}
|
||||
}
|
||||
|
||||
for (Data data : datas)
|
||||
addStyle(data.propertyName, ValueImpl.regular(value, counter), data.styleNames);
|
||||
if (" ".equals(value) == false)
|
||||
for (Data data : datas)
|
||||
addStyle(data.propertyName, ValueImpl.regular(value, counter), data.styleNames);
|
||||
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,13 @@ package net.sourceforge.plantuml.svek;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -619,9 +625,10 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
|
||||
return;
|
||||
|
||||
ug.draw(link.commentForSvg());
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "link " + link.getEntity1().getCode() + " " + link.getEntity2().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "link_" + link.getEntity1().getCode() + "_" + link.getEntity2().getCode());
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS,
|
||||
"link " + link.getEntity1().getCode() + " " + link.getEntity2().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "link_" + link.getEntity1().getCode() + "_" + link.getEntity2().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
|
@ -64,17 +64,16 @@ public class Circle {
|
||||
return new Circle(p2, p1, p3);
|
||||
}
|
||||
|
||||
|
||||
private Circle(Point2D p1, Point2D p2, Point2D p3) {
|
||||
final double num1 = p3.getX() * p3.getX() * (p1.getY() - p2.getY())
|
||||
+ (p1.getX() * p1.getX() + (p1.getY() - p2.getY()) * (p1.getY() - p3.getY())) * (p2.getY() - p3.getY())
|
||||
+ p2.getX() * p2.getX() * (-p1.getY() + p3.getY());
|
||||
final double den1 = 2 * (p3.getX() * (p1.getY() - p2.getY()) + p1.getX() * (p2.getY() - p3.getY()) + p2.getX()
|
||||
* (-p1.getY() + p3.getY()));
|
||||
final double den1 = 2 * (p3.getX() * (p1.getY() - p2.getY()) + p1.getX() * (p2.getY() - p3.getY())
|
||||
+ p2.getX() * (-p1.getY() + p3.getY()));
|
||||
final double x = num1 / den1;
|
||||
final double den2 = p3.getY() - p2.getY();
|
||||
final double y = (p2.getY() + p3.getY()) / 2 - (p3.getX() - p2.getX()) / den2
|
||||
* (x - (p2.getX() + p3.getX()) / 2);
|
||||
final double y = (p2.getY() + p3.getY()) / 2
|
||||
- (p3.getX() - p2.getX()) / den2 * (x - (p2.getX() + p3.getX()) / 2);
|
||||
center = new Point2D.Double(x, y);
|
||||
radius = center.distance(p1);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class EntityImageBranch extends AbstractEntityImage {
|
||||
|
||||
}
|
||||
diams.setDeltaShadow(shadowing);
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,9 +37,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -139,7 +137,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,7 +37,12 @@
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.Guillemet;
|
||||
@ -283,7 +288,7 @@ public class EntityImageDescription extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
ug.draw(new UComment("entity " + getEntity().getCodeGetName()));
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -52,8 +52,10 @@ public class EntityImageGroup extends AbstractEntityImage {
|
||||
|
||||
public EntityImageGroup(ILeaf entity, ISkinParam skinParam) {
|
||||
super(entity, skinParam);
|
||||
// this.desc = Display.create(StringUtils.getWithNewlines(entity.getDisplay()), new FontConfiguration(
|
||||
// getFont(FontParam.ACTIVITY), HtmlColorUtils.BLACK), HorizontalAlignment.CENTER);
|
||||
// this.desc = Display.create(StringUtils.getWithNewlines(entity.getDisplay()),
|
||||
// new FontConfiguration(
|
||||
// getFont(FontParam.ACTIVITY), HtmlColorUtils.BLACK),
|
||||
// HorizontalAlignment.CENTER);
|
||||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
|
@ -36,9 +36,7 @@
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -135,7 +133,7 @@ public class EntityImageLollipopInterface extends AbstractEntityImage {
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -84,8 +84,7 @@ public class EntityImageLollipopInterfaceEye1 extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.classBorder));
|
||||
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(),
|
||||
ColorParam.classBackground).bg());
|
||||
ug = ug.apply(SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.classBackground).bg());
|
||||
if (url != null) {
|
||||
ug.startUrl(url);
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ public class EntityImageLollipopInterfaceEye2 extends AbstractEntityImage {
|
||||
super(entity, skinParam);
|
||||
final Stereotype stereotype = entity.getStereotype();
|
||||
|
||||
final USymbol symbol = Objects.requireNonNull(entity.getUSymbol() == null ? skinParam.componentStyle().toUSymbol()
|
||||
: entity.getUSymbol());
|
||||
final USymbol symbol = Objects.requireNonNull(
|
||||
entity.getUSymbol() == null ? skinParam.componentStyle().toUSymbol() : entity.getUSymbol());
|
||||
|
||||
this.desc = BodyFactory.create2(skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER),
|
||||
entity.getDisplay(), symbol.getFontParam(), skinParam, stereotype, entity,
|
||||
|
@ -36,9 +36,7 @@
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -197,7 +195,7 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -38,7 +38,9 @@ package net.sourceforge.plantuml.svek.image;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Line2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.*;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -217,7 +219,7 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
|
||||
final public void drawU(UGraphic ug) {
|
||||
final Url url = getEntity().getUrl99();
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -63,8 +63,8 @@ public class EntityImageNoteLink extends AbstractTextBlock implements IEntityIma
|
||||
public EntityImageNoteLink(Display note, Colors colors, ISkinParam skinParam, StyleBuilder styleBuilder) {
|
||||
final Rose skin = new Rose();
|
||||
comp = skin.createComponentNote(
|
||||
new Style[] { ComponentType.NOTE.getStyleSignature().getMergedStyle(styleBuilder) },
|
||||
ComponentType.NOTE, colors.mute(skinParam), note);
|
||||
new Style[] { ComponentType.NOTE.getStyleSignature().getMergedStyle(styleBuilder) }, ComponentType.NOTE,
|
||||
colors.mute(skinParam), note);
|
||||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
|
@ -36,9 +36,7 @@
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -199,8 +197,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.SkinParamUtils;
|
||||
import net.sourceforge.plantuml.Url;
|
||||
|
@ -37,9 +37,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -163,7 +161,7 @@ public class EntityImageUseCase extends AbstractEntityImage {
|
||||
ug = ug.apply(backcolor.bg());
|
||||
final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());
|
||||
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -82,12 +82,7 @@ public class Footprint {
|
||||
|
||||
private MyUGraphic(MyUGraphic other, UChange change) {
|
||||
super(other, change);
|
||||
if (!instanceOfAny(change,
|
||||
UBackground.class,
|
||||
HColor.class,
|
||||
UStroke.class,
|
||||
UTranslate.class
|
||||
)) {
|
||||
if (!instanceOfAny(change, UBackground.class, HColor.class, UStroke.class, UTranslate.class)) {
|
||||
throw new UnsupportedOperationException(change.getClass().toString());
|
||||
}
|
||||
this.all = other.all;
|
||||
|
@ -993,7 +993,6 @@ public class SvgGraphics {
|
||||
if (SecurityUtils.ignoreThisLink(url))
|
||||
return;
|
||||
|
||||
|
||||
// if (pendingAction.size() > 0)
|
||||
// closeLink();
|
||||
|
||||
@ -1041,16 +1040,16 @@ public class SvgGraphics {
|
||||
}
|
||||
|
||||
public void startGroup(Map<UGroupType, String> typeIdents) {
|
||||
if (!typeIdents.isEmpty())
|
||||
pendingAction.add(0, (Element) document.createElement("g"));
|
||||
for (Map.Entry<UGroupType, String> typeIdent : typeIdents.entrySet()) {
|
||||
if (typeIdent.getKey() == UGroupType.ID) {
|
||||
pendingAction.get(0).setAttribute("id", typeIdent.getValue());
|
||||
}
|
||||
if (typeIdents.isEmpty())
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
pendingAction.add(0, (Element) document.createElement("g"));
|
||||
|
||||
if (INTERACTIVE && typeIdent.getKey() == UGroupType.CLASS) {
|
||||
for (Map.Entry<UGroupType, String> typeIdent : typeIdents.entrySet()) {
|
||||
if (typeIdent.getKey() == UGroupType.ID)
|
||||
pendingAction.get(0).setAttribute("id", typeIdent.getValue());
|
||||
if (INTERACTIVE && typeIdent.getKey() == UGroupType.CLASS)
|
||||
pendingAction.get(0).setAttribute("class", typeIdent.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user