Example usage for javafx.scene.shape Rectangle setArcHeight

List of usage examples for javafx.scene.shape Rectangle setArcHeight

Introduction

In this page you can find the example usage for javafx.scene.shape Rectangle setArcHeight.

Prototype

public final void setArcHeight(double value) 

Source Link

Usage

From source file:Main.java

private void addStackPane(HBox hb) {

    StackPane stack = new StackPane();
    Rectangle helpIcon = new Rectangle(30.0, 25.0);
    helpIcon.setFill(new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE,
            new Stop[] { new Stop(0, Color.web("#4977A3")), new Stop(0.5, Color.web("#B0C6DA")),
                    new Stop(1, Color.web("#9CB6CF")), }));
    helpIcon.setStroke(Color.web("#D0E6FA"));
    helpIcon.setArcHeight(3.5);
    helpIcon.setArcWidth(3.5);/*from  w w  w.ja  v  a  2  s. c  om*/

    Text helpText = new Text("?");
    helpText.setFont(Font.font("Verdana", FontWeight.BOLD, 18));
    helpText.setFill(Color.WHITE);
    helpText.setStroke(Color.web("#7080A0"));

    stack.getChildren().addAll(helpIcon, helpText);
    stack.setAlignment(Pos.CENTER_RIGHT);
    // Add offset to right for question mark to compensate for RIGHT 
    // alignment of all nodes
    StackPane.setMargin(helpText, new Insets(0, 10, 0, 0));

    hb.getChildren().add(stack);
    HBox.setHgrow(stack, Priority.ALWAYS);

}