Skip to content
Snippets Groups Projects
Commit 1b9f4db5 authored by Simon Barner's avatar Simon Barner
Browse files

Add getTextColor() to enable customizing the label color

Issue-Ref: 4105
Issue-Url: af3#4105



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 6850c493
No related branches found
No related tags found
1 merge request!1324105: Add getTextColor() to enable customizing the label color
Pipeline #27738 passed
Pipeline: maven-releng

#27739

    ContentAnchorageVisualBase.java 6722629a940e9f8d973d2176bc3855932d7fa35a GREEN
    ContentVisualBase.java 6c9c508803874db2f5ffffb723c1df5664827a5d GREEN
    ContentVisualBase.java 938e37e98bb91917686d39d17e73efa265ec26df YELLOW
    DiagramAnchorageVisualBase.java 05c235152bc79187f0fc9b041435da7968654a78 GREEN
    LinkVisualBase.java 909b933b38b7651cac901d767115e173983bef26 GREEN
    MVCBundlePartWithEffectsBase.java 6f6fbbb065950ad3acd4dc1fbfdd1348874e51d2 GREEN
    ......
    ......@@ -31,6 +31,8 @@ import javafx.geometry.VPos;
    import javafx.scene.Node;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.Paint;
    import javafx.scene.shape.Shape;
    import javafx.scene.text.Text;
    import javafx.scene.text.TextAlignment;
    ......@@ -70,6 +72,11 @@ public abstract class ContentVisualBase extends VisualBase implements IContentVi
    return "";
    }
    /** Returns the text color. */
    protected Paint getTextColor() {
    return Color.BLACK;
    }
    /** Returns the anchor location relative to the parent bounds. */
    protected DiagramCoordinate getTextAnchorLocation() {
    Insets i = getTextInsets();
    ......@@ -210,6 +217,7 @@ public abstract class ContentVisualBase extends VisualBase implements IContentVi
    }
    text.setX(anchorX);
    text.setY(anchorY);
    text.setFill(getTextColor());
    text.setText(getName());
    text.setWrappingWidth(rightX - anchorX - i.getRight());
    text.setTextAlignment(getHorizontalTextAlignment());
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment