![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.svek.image.EntityImageAssociationPoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.abel.Entity;
import net.sourceforge.plantuml.klimt.CopyForegroundColorToBackgroundColor;
import net.sourceforge.plantuml.klimt.UShape;
import net.sourceforge.plantuml.klimt.color.HColor;
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
import net.sourceforge.plantuml.klimt.font.StringBounder;
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
import net.sourceforge.plantuml.klimt.shape.UEllipse;
import net.sourceforge.plantuml.style.ISkinParam;
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.svek.AbstractEntityImage;
import net.sourceforge.plantuml.svek.ShapeType;
public class EntityImageAssociationPoint extends AbstractEntityImage {
private static final int SIZE = 4;
public EntityImageAssociationPoint(Entity entity, ISkinParam skinParam) {
super(entity, skinParam);
}
public XDimension2D calculateDimension(StringBounder stringBounder) {
return new XDimension2D(SIZE, SIZE);
}
private Style getStyle() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.classDiagram, SName.arrow)
.withTOBECHANGED(getStereo()).getMergedStyle(getSkinParam().getCurrentStyleBuilder());
}
final public void drawU(UGraphic ug) {
final UShape circle = UEllipse.build(SIZE, SIZE);
final HColor color = getStyle().value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet());
ug.apply(color).apply(new CopyForegroundColorToBackgroundColor()).draw(circle);
}
public ShapeType getShapeType() {
return ShapeType.CIRCLE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy