1 | if (horizontalAlignment == HorizontalAlignment.LEFT) {↵ | | 1 | if (verticalAlignment == VerticalAlignment.TOP) {↵
|
2 | x = (float) titleArea.getX();↵ | | 2 | y = (float) titleArea.getY();↵
|
3 | anchor = TextBlockAnchor.TOP_LEFT;↵ | | 3 | anchor = TextBlockAnchor.TOP_RIGHT;↵
|
4 | }↵ | | 4 | }↵
|
5 | else if (horizontalAlignment == HorizontalAlignment.RIGHT) {↵ | | 5 | else if (verticalAlignment == VerticalAlignment.BOTTOM) {↵
|
6 | x = (float) titleArea.getMaxX();↵ | | 6 | y = (float) titleArea.getMaxY();↵
|
7 | anchor = TextBlockAnchor.TOP_RIGHT;↵ | | 7 | anchor = TextBlockAnchor.TOP_LEFT;↵
|
8 | }↵ | | 8 | }↵
|
9 | else if (horizontalAlignment == HorizontalAlignment.CENTER) {↵ | | 9 | else if (verticalAlignment == VerticalAlignment.CENTER) {↵
|
10 | x = (float) titleArea.getCenterX();↵ | | 10 | y = (float) titleArea.getCenterY();↵
|
11 | anchor = TextBlockAnchor.TOP_CENTER;↵ | | 11 | anchor = TextBlockAnchor.TOP_CENTER;↵
|
12 | } | | 12 | }
|