Skip to content

Commit 40f70c5

Browse files
committed
Revert Label default alignment
1 parent ee19ddf commit 40f70c5

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

modules/javafx.controls/src/main/java/javafx/scene/control/Label.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
package javafx.scene.control;
2727

28-
import javafx.geometry.Pos;
2928
import javafx.scene.control.skin.LabelSkin;
3029
import com.sun.javafx.scene.NodeHelper;
3130

@@ -97,7 +96,6 @@ private void initialize() {
9796
// override. Initializing focusTraversable by calling set on the
9897
// CssMetaData ensures that css will be able to override the value.
9998
((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
100-
((StyleableProperty<Pos>)(WritableValue<Pos>)alignmentProperty()).applyStyle(null, Pos.TOP_LEFT);
10199
}
102100

103101
/***************************************************************************
@@ -182,8 +180,4 @@ public ObjectProperty<Node> labelForProperty() {
182180
return Boolean.FALSE;
183181
}
184182

185-
@Override protected Pos getInitialAlignment() {
186-
return Pos.TOP_LEFT;
187-
}
188-
189183
}

modules/javafx.graphics/src/main/java/com/sun/javafx/perf/LayoutCycle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public String toString() {
5252
}
5353

5454
private void printLayoutTree(StringBuilder text, LayoutFrame frame, String prefix, boolean skin) {
55-
text.append(frame.getNode().getClass().getSimpleName());
55+
String className = frame.getNode().getClass().getSimpleName();
56+
text.append(className.isEmpty() ? "<anonymous>" : className);
5657

5758
String id = frame.getNode().getId();
5859
boolean bracket = id != null && !id.isEmpty() || frame.isLayoutRoot() || skin;

modules/javafx.graphics/src/main/java/com/sun/javafx/scene/InvalidateLayoutOption.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ public enum InvalidateLayoutOption {
88

99
/**
1010
* The parent node will be scheduled for layout, except if the parent node is currently
11-
* performing layout. In this case, no further layout cycle will be scheduled.
11+
* performing layout. In this case, no further layout pass will be scheduled.
1212
*/
1313
PARENT_LAYOUT,
1414

1515
/**
1616
* The parent node will be scheduled for layout. If the parent node is currently
17-
* performing layout, a new layout cycle will be scheduled.
17+
* performing layout, a new layout pass will be scheduled.
1818
*/
1919
FORCE_PARENT_LAYOUT,
2020

2121
/**
2222
* All parent nodes (up to the layout root) will be scheduled for layout.
23-
* If a parent node is currently performing layout, a new layout cycle will be scheduled.
23+
* If a parent node is currently performing layout, a new layout pass will be scheduled.
2424
*/
2525
FORCE_ROOT_LAYOUT
2626
}

0 commit comments

Comments
 (0)