net.sourceforge.plantuml.svek.AbstractEntityImage 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;
import java.util.Objects;
import net.sourceforge.plantuml.abel.Entity;
import net.sourceforge.plantuml.klimt.color.HColor;
import net.sourceforge.plantuml.klimt.font.StringBounder;
import net.sourceforge.plantuml.klimt.shape.AbstractTextBlock;
import net.sourceforge.plantuml.stereo.Stereotype;
import net.sourceforge.plantuml.style.ISkinParam;
public abstract class AbstractEntityImage extends AbstractTextBlock implements IEntityImage {
private final Entity entity;
private final ISkinParam skinParam;
public AbstractEntityImage(Entity entity, ISkinParam skinParam) {
this.entity = Objects.requireNonNull(entity);
this.skinParam = Objects.requireNonNull(skinParam);
}
@Override
public boolean isHidden() {
return entity.isHidden();
}
protected final Entity getEntity() {
return entity;
}
protected final ISkinParam getSkinParam() {
return skinParam;
}
@Override
public final HColor getBackcolor() {
return skinParam.getBackgroundColor();
}
protected final Stereotype getStereo() {
return entity.getStereotype();
}
@Override
public Margins getShield(StringBounder stringBounder) {
return Margins.NONE;
}
@Override
public double getOverscanX(StringBounder stringBounder) {
return 0;
}
}