![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.activitydiagram3.gtile.GtileWithMargin 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.activitydiagram3.gtile;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.klimt.UTranslate;
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
import net.sourceforge.plantuml.klimt.font.StringBounder;
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
public class GtileWithMargin extends AbstractGtileRoot implements Gtile {
protected final AbstractGtileRoot orig;
protected final double north;
protected final double south;
private final double east;
public GtileWithMargin(AbstractGtileRoot orig, double north, double south, double east) {
super(orig.stringBounder, orig.skinParam());
this.orig = orig;
this.north = north;
this.south = south;
this.east = east;
}
@Override
public Set getSwimlanes() {
return orig.getSwimlanes();
}
@Override
public Swimlane getSwimlane(String point) {
return orig.getSwimlane(point);
}
@Override
public XDimension2D calculateDimension(StringBounder stringBounder) {
final XDimension2D result = orig.calculateDimension(stringBounder);
return result.delta(east, north + south);
}
private UTranslate getTranslate() {
return new UTranslate(east, north);
}
@Override
protected void drawUInternal(UGraphic ug) {
orig.drawU(ug.apply(getTranslate()));
}
@Override
protected UTranslate getCoordImpl(String name) {
return orig.getCoordImpl(name).compose(getTranslate());
}
@Override
public Collection getInnerConnections() {
return Collections.emptyList();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy