Example usage for javafx.scene.text Font getSize

List of usage examples for javafx.scene.text Font getSize

Introduction

In this page you can find the example usage for javafx.scene.text Font getSize.

Prototype

public final double getSize() 

Source Link

Document

The point size for this font.

Usage

From source file:de.pixida.logtest.designer.automaton.RectangularNode.java

RectangularNode(final Graph graph, final ContentDisplayMode aContentDisplayMode, final int zIndex) {
    super(graph);

    Validate.notNull(aContentDisplayMode);
    this.contentDisplayMode = aContentDisplayMode;

    this.rectangle.setStroke(BORDER_COLOR_DEFAULT);

    final Font titleFont = Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, 10.0);
    this.titleText.setFont(titleFont);

    final Font contentFont = Font.font(titleFont.getFamily(), FontWeight.NORMAL, titleFont.getSize());
    this.contentText.setFont(contentFont);

    this.textFlow.getChildren().addAll(this.titleText, this.separatorText, this.contentText);
    this.textFlow.layoutXProperty().bind(this.rectangle.xProperty());
    this.textFlow.layoutYProperty().bind(this.rectangle.yProperty());
    final double insetTop = 0.0;
    final double insetRight = 3.0;
    final double insetBottom = 3.0;
    final double insetLeft = 3.0;
    this.textFlow.setPadding(new Insets(insetTop, insetRight, insetBottom, insetLeft));
    this.textFlow.setMouseTransparent(true);

    this.contentDisplayMode.init(this.textFlow, this.rectangle);

    if (this.contentDisplayMode.isResizable()) {
        //            this.createResizeSpots();
    }//from  ww  w . j av  a  2 s.  c om

    this.registerPart(this.rectangle, zIndex);
    this.registerPart(this.textFlow, zIndex);
    this.registerActionHandler(this.rectangle);

    this.loadDimensionsFromJson(new JSONObject());

    this.setColor(Color.WHITE);

    this.setContent(null);
}