net.sourceforge.plantuml.abel.LinkArrow 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.abel;
import net.sourceforge.plantuml.svek.GuideLine;
import net.sourceforge.plantuml.utils.Direction;
public enum LinkArrow {
NONE_OR_SEVERAL, DIRECT_NORMAL, BACKWARD;
public LinkArrow reverse() {
if (this == DIRECT_NORMAL)
return BACKWARD;
if (this == BACKWARD)
return DIRECT_NORMAL;
return NONE_OR_SEVERAL;
}
public GuideLine mute(final GuideLine guide) {
switch (this) {
case DIRECT_NORMAL:
return guide;
case BACKWARD:
return new GuideLine() {
public Direction getArrowDirection() {
return guide.getArrowDirection().getInv();
}
public double getArrowDirection2() {
return Math.PI + guide.getArrowDirection2();
}
};
}
throw new UnsupportedOperationException();
}
}