Bug discovered in the JavaFX 1.2 release
The VPos setting of BASELINE seems to be unimplemented. Setting it has exactly the same effect as VPos.BOTTOM.
Here is a simple example that illustrates the defect (also attached as a source file):
Flow {
nodeVPos: VPos.BASELINE
content: [
Text {
content: "I have no descenders"
textOrigin: TextOrigin.BASELINE
}
Text {
content: "Why am I so high?"
textOrigin: TextOrigin.BASELINE
}
]
}
The expected behavior is that the two Text node will be aligned by their baselines.
The actual behavior is that the Text nodes are aligned by their layoutBounds, which means the second Text field appears higher than the first. (see the attached screen capture)
HBox gives exactly the same results, as does setting a vpos of BASELINE on Node.layoutInfo.
The VPos setting of BASELINE seems to be unimplemented. Setting it has exactly the same effect as VPos.BOTTOM.
Here is a simple example that illustrates the defect (also attached as a source file):
Flow {
nodeVPos: VPos.BASELINE
content: [
Text {
content: "I have no descenders"
textOrigin: TextOrigin.BASELINE
}
Text {
content: "Why am I so high?"
textOrigin: TextOrigin.BASELINE
}
]
}
The expected behavior is that the two Text node will be aligned by their baselines.
The actual behavior is that the Text nodes are aligned by their layoutBounds, which means the second Text field appears higher than the first. (see the attached screen capture)
HBox gives exactly the same results, as does setting a vpos of BASELINE on Node.layoutInfo.