net.sourceforge.plantuml.sequencediagram.graphic.ParticipantBoxSimple 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.sequencediagram.graphic;
import java.util.Collection;
import java.util.Collections;
import net.sourceforge.plantuml.klimt.font.StringBounder;
public class ParticipantBoxSimple implements Pushable {
private double pos = 0;
private final String name;
public ParticipantBoxSimple(double pos) {
this(pos, null);
}
public ParticipantBoxSimple(double pos, String name) {
this.pos = pos;
this.name = name;
}
@Override
public String toString() {
return name == null ? super.toString() : name;
}
public double getCenterX(StringBounder stringBounder) {
return pos;
}
public void pushToLeft(double deltaX) {
pos += deltaX;
}
public double getPreferredWidth(StringBounder stringBounder) {
return 0;
}
public Collection getDelays(StringBounder stringBounder) {
return Collections.emptyList();
}
}