org.jhotdraw8.draw.figure.ElbowableLineFigure Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jhotdraw8.draw Show documentation
Show all versions of org.jhotdraw8.draw Show documentation
JHotDraw8 Drawing Framework
The newest version!
/*
* @(#)ElbowableLineFigure.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.figure;
import org.jhotdraw8.css.value.CssSize;
import org.jhotdraw8.draw.key.NullableCssSizeStyleableKey;
import org.jspecify.annotations.Nullable;
/**
* A figure which supports drawing an elbow.
*
* @author Werner Randelshofer
*/
public interface ElbowableLineFigure extends Figure {
/**
* The offset of the elbow with respect of the end of the line.
*/
@Nullable NullableCssSizeStyleableKey ELBOW_OFFSET = new NullableCssSizeStyleableKey("elbowOffset", CssSize.ZERO);
/**
* The offset of the elbow from the end of the line.
*
* If the value is null, or less or equal 0, then a straight line is drawn instead of an elbow.
*
* @return an offset
*/
default @Nullable CssSize getElbowOffset() {
return getStyled(ELBOW_OFFSET);
}
}