![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileThinSplit 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.ftile.vertical;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.klimt.UShape;
import net.sourceforge.plantuml.klimt.UStroke;
import net.sourceforge.plantuml.klimt.UTranslate;
import net.sourceforge.plantuml.klimt.color.HColor;
import net.sourceforge.plantuml.klimt.color.HColors;
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
import net.sourceforge.plantuml.klimt.font.StringBounder;
import net.sourceforge.plantuml.klimt.shape.ULine;
import net.sourceforge.plantuml.style.ISkinParam;
public class FtileThinSplit extends AbstractFtile {
private double width;
private double first;
private double last;
private final double height = 1.5;
private final HColor colorBar;
private final Swimlane swimlane;
public FtileThinSplit(ISkinParam skinParam, HColor colorBar, Swimlane swimlane) {
super(skinParam);
this.colorBar = colorBar;
this.swimlane = swimlane;
}
@Override
public Collection getMyChildren() {
return Collections.emptyList();
}
public void setGeom(double first, double last, double width) {
this.width = width;
this.first = first;
this.last = last;
}
@Override
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
return new FtileGeometry(width, height, width / 2, 0, height);
}
public void drawU(UGraphic ug) {
final UShape rect = ULine.hline(last - first);
ug = ug.apply(UTranslate.dx(first));
if (colorBar == null) {
ug = ug.apply(HColors.none());
} else {
ug = ug.apply(colorBar);
}
ug.apply(UStroke.withThickness(1.5)).draw(rect);
}
public Set getSwimlanes() {
return Collections.singleton(swimlane);
}
public Swimlane getSwimlaneIn() {
return swimlane;
}
public Swimlane getSwimlaneOut() {
return swimlane;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy