// Path: kramer/src/main/java/com/chiralbehaviors/layout/LayoutLabel.java
// public class LayoutLabel extends Label {
//     private static final String LAYOUT_LABEL = "layout-label";
//     private static final String STYLE_SHEET  = "layout-label.css";
//     private final String        stylesheet;
// 
//     public LayoutLabel() {
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     public LayoutLabel(String arg0) {
//         super(arg0);
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     public LayoutLabel(String arg0, Node arg1) {
//         super(arg0, arg1);
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     @Override
//     public String getUserAgentStylesheet() {
//         return stylesheet;
//     }
// }


import com.chiralbehaviors.layout.LayoutLabel;
import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Shape;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.text.TextBoundsType;
                                             tb.getWidth(), tb.getHeight()))
                    .getBoundsInLocal()
                    .getHeight();
    }

    private final Font   font;
    private final Insets insets;
    private final double lineHeight;

    public LabelStyle(Label label) {
        Insets lInsets = Style.add(label.getInsets() , label.getPadding());
        insets = lInsets;
        lineHeight = getLineHeight(label.getFont(),
                                   TextBoundsType.LOGICAL_VERTICAL_CENTER);
        font = label.getFont();
    }

    public double getHeight() {
        return lineHeight + insets.getTop() + insets.getBottom();
    }

    public double getHeight(double rows) {
        return (lineHeight * rows) + insets.getTop() + insets.getBottom();
    }

    public double getHorizontalInset() {
        return insets.getLeft() + insets.getRight();
    }

    public Label label(double width, String text, double height) {
// Path: kramer/src/main/java/com/chiralbehaviors/layout/LayoutLabel.java
// public class LayoutLabel extends Label {
//     private static final String LAYOUT_LABEL = "layout-label";
//     private static final String STYLE_SHEET  = "layout-label.css";
//     private final String        stylesheet;
// 
//     public LayoutLabel() {
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     public LayoutLabel(String arg0) {
//         super(arg0);
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     public LayoutLabel(String arg0, Node arg1) {
//         super(arg0, arg1);
//         URL url = getClass().getResource(STYLE_SHEET);
//         stylesheet = url == null ? null : url.toExternalForm();
//         getStyleClass().clear();
//         getStyleClass().add(LAYOUT_LABEL);
//     }
// 
//     @Override
//     public String getUserAgentStylesheet() {
//         return stylesheet;
//     }
// }


// Path: kramer/src/main/java/com/chiralbehaviors/layout/style/LabelStyle.java
import com.chiralbehaviors.layout.LayoutLabel;
import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Shape;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.text.TextBoundsType;

                                             tb.getWidth(), tb.getHeight()))
                    .getBoundsInLocal()
                    .getHeight();
    }

    private final Font   font;
    private final Insets insets;
    private final double lineHeight;

    public LabelStyle(Label label) {
        Insets lInsets = Style.add(label.getInsets() , label.getPadding());
        insets = lInsets;
        lineHeight = getLineHeight(label.getFont(),
                                   TextBoundsType.LOGICAL_VERTICAL_CENTER);
        font = label.getFont();
    }

    public double getHeight() {
        return lineHeight + insets.getTop() + insets.getBottom();
    }

    public double getHeight(double rows) {
        return (lineHeight * rows) + insets.getTop() + insets.getBottom();
    }

    public double getHorizontalInset() {
        return insets.getLeft() + insets.getRight();
    }

    public Label label(double width, String text, double height) {
        LayoutLabel label = new LayoutLabel(text);