diff --git a/modules/controls/src/main/java/javafx/scene/control/Accordion.java b/modules/controls/src/main/java/javafx/scene/control/Accordion.java --- a/modules/controls/src/main/java/javafx/scene/control/Accordion.java +++ b/modules/controls/src/main/java/javafx/scene/control/Accordion.java @@ -212,14 +212,13 @@ private static final String DEFAULT_STYLE_CLASS = "accordion"; /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but Accordion returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but Accordion returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ButtonBar.java b/modules/controls/src/main/java/javafx/scene/control/ButtonBar.java --- a/modules/controls/src/main/java/javafx/scene/control/ButtonBar.java +++ b/modules/controls/src/main/java/javafx/scene/control/ButtonBar.java @@ -577,14 +577,13 @@ **************************************************************************/ /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but ButtonBar returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but ButtonBar returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/Cell.java b/modules/controls/src/main/java/javafx/scene/control/Cell.java --- a/modules/controls/src/main/java/javafx/scene/control/Cell.java +++ b/modules/controls/src/main/java/javafx/scene/control/Cell.java @@ -728,15 +728,13 @@ PseudoClass.getPseudoClass("filled"); /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but Cell returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but Cell returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } - } diff --git a/modules/controls/src/main/java/javafx/scene/control/Control.java b/modules/controls/src/main/java/javafx/scene/control/Control.java --- a/modules/controls/src/main/java/javafx/scene/control/Control.java +++ b/modules/controls/src/main/java/javafx/scene/control/Control.java @@ -880,10 +880,9 @@ /** * Most Controls return true for focusTraversable initial value. * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail + * @since 9 */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + @Override protected Boolean getInitialFocusTraversable() { return Boolean.TRUE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java b/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java --- a/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java +++ b/modules/controls/src/main/java/javafx/scene/control/Hyperlink.java @@ -170,13 +170,12 @@ private static final PseudoClass PSEUDO_CLASS_VISITED = PseudoClass.getPseudoClass("visited"); - /** - * Hyperlink uses HAND as the default value for cursor. - * This method provides a way for css to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Cursor impl_cssGetCursorInitialValue() { + /** + * Hyperlink uses HAND as the default value for cursor. + * This method provides a way for css to get the correct initial value. + * @since 9 + */ + @Override protected Cursor getInitialCursor() { return Cursor.HAND; } diff --git a/modules/controls/src/main/java/javafx/scene/control/Label.java b/modules/controls/src/main/java/javafx/scene/control/Label.java --- a/modules/controls/src/main/java/javafx/scene/control/Label.java +++ b/modules/controls/src/main/java/javafx/scene/control/Label.java @@ -165,14 +165,14 @@ **************************************************************************/ /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but Label returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but Label returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } + } diff --git a/modules/controls/src/main/java/javafx/scene/control/Labeled.java b/modules/controls/src/main/java/javafx/scene/control/Labeled.java --- a/modules/controls/src/main/java/javafx/scene/control/Labeled.java +++ b/modules/controls/src/main/java/javafx/scene/control/Labeled.java @@ -805,10 +805,9 @@ /** * Not everything uses the default value of false for alignment. * This method provides a way to have them return the correct initial value. - * @treatAsPrivate implementation detail + * @since 9 */ - @Deprecated - protected Pos impl_cssGetAlignmentInitialValue() { + protected Pos getInitialAlignment() { return Pos.CENTER_LEFT; } @@ -846,7 +845,7 @@ @Override public Pos getInitialValue(Labeled n) { - return n.impl_cssGetAlignmentInitialValue(); + return n.getInitialAlignment(); } }; diff --git a/modules/controls/src/main/java/javafx/scene/control/MenuBar.java b/modules/controls/src/main/java/javafx/scene/control/MenuBar.java --- a/modules/controls/src/main/java/javafx/scene/control/MenuBar.java +++ b/modules/controls/src/main/java/javafx/scene/control/MenuBar.java @@ -251,14 +251,13 @@ } /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but MenuBar returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but MenuBar returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java b/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java --- a/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java +++ b/modules/controls/src/main/java/javafx/scene/control/ProgressBar.java @@ -110,16 +110,15 @@ * this control. */ private static final String DEFAULT_STYLE_CLASS = "progress-bar"; - + /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but ProgressBar returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but ProgressBar returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java b/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java --- a/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java +++ b/modules/controls/src/main/java/javafx/scene/control/ProgressIndicator.java @@ -226,16 +226,15 @@ */ private static final PseudoClass PSEUDO_CLASS_INDETERMINATE = PseudoClass.getPseudoClass("indeterminate"); - + /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but ProgressIndicator returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but ProgressIndicator returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/RadioButton.java b/modules/controls/src/main/java/javafx/scene/control/RadioButton.java --- a/modules/controls/src/main/java/javafx/scene/control/RadioButton.java +++ b/modules/controls/src/main/java/javafx/scene/control/RadioButton.java @@ -128,18 +128,17 @@ private static final String DEFAULT_STYLE_CLASS = "radio-button"; + /** - * Labeled return CENTER_LEFT for alignment, but ToggleButton returns - * CENTER. RadioButton also returns CENTER_LEFT so we have to override - * the override in ToggleButton. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected Pos impl_cssGetAlignmentInitialValue() { + * Labeled return CENTER_LEFT for alignment, but ToggleButton returns + * CENTER. RadioButton also returns CENTER_LEFT so we have to override + * the override in ToggleButton. + * @since 9 + */ + @Override protected Pos getInitialAlignment() { return Pos.CENTER_LEFT; } - /*************************************************************************** * * * Accessibility handling * diff --git a/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java b/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java --- a/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java +++ b/modules/controls/src/main/java/javafx/scene/control/ScrollBar.java @@ -479,10 +479,9 @@ * this method to return true, but ScrollBar returns false for * focusTraversable's initial value; hence the override of the override. * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail + * @since 9 */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java b/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java --- a/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java +++ b/modules/controls/src/main/java/javafx/scene/control/ScrollPane.java @@ -767,16 +767,15 @@ PseudoClass.getPseudoClass("fitToWidth"); private static final PseudoClass FIT_TO_HEIGHT_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("fitToHeight"); - + /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but ScrollPane returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but ScrollPane returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/Separator.java b/modules/controls/src/main/java/javafx/scene/control/Separator.java --- a/modules/controls/src/main/java/javafx/scene/control/Separator.java +++ b/modules/controls/src/main/java/javafx/scene/control/Separator.java @@ -324,16 +324,15 @@ private static final PseudoClass VERTICAL_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("vertical"); private static final PseudoClass HORIZONTAL_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("horizontal"); - + /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but Separator returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but Separator returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/SplitPane.java b/modules/controls/src/main/java/javafx/scene/control/SplitPane.java --- a/modules/controls/src/main/java/javafx/scene/control/SplitPane.java +++ b/modules/controls/src/main/java/javafx/scene/control/SplitPane.java @@ -453,14 +453,13 @@ private static final PseudoClass HORIZONTAL_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("horizontal"); /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but SplitPane returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but SplitPane returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java b/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java --- a/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java +++ b/modules/controls/src/main/java/javafx/scene/control/ToggleButton.java @@ -276,10 +276,9 @@ /** * Not everything uses the default value of false for alignment. * This method provides a way to have them return the correct initial value. - * @treatAsPrivate implementation detail + * @since 9 */ - @Deprecated @Override - protected Pos impl_cssGetAlignmentInitialValue() { + @Override protected Pos getInitialAlignment() { return Pos.CENTER; } diff --git a/modules/controls/src/main/java/javafx/scene/control/ToolBar.java b/modules/controls/src/main/java/javafx/scene/control/ToolBar.java --- a/modules/controls/src/main/java/javafx/scene/control/ToolBar.java +++ b/modules/controls/src/main/java/javafx/scene/control/ToolBar.java @@ -253,15 +253,13 @@ private static final PseudoClass HORIZONTAL_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("horizontal"); /** - * Most Controls return true for focusTraversable, so Control overrides - * this method to return true, but ToolBar returns false for - * focusTraversable's initial value; hence the override of the override. - * This method is called from CSS code to get the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated @Override - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + * Most Controls return true for focusTraversable, so Control overrides + * this method to return true, but ToolBar returns false for + * focusTraversable's initial value; hence the override of the override. + * This method is called from CSS code to get the correct initial value. + * @since 9 + */ + @Override protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } - } diff --git a/modules/graphics/src/main/java/javafx/scene/Node.java b/modules/graphics/src/main/java/javafx/scene/Node.java --- a/modules/graphics/src/main/java/javafx/scene/Node.java +++ b/modules/graphics/src/main/java/javafx/scene/Node.java @@ -8475,23 +8475,23 @@ } - /** - * Not everything uses the default value of false for focusTraversable. - * This method provides a way to have them return the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated - protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() { + /** + * Not everything uses the default value of false for focusTraversable. + * This method provides a way to have them return the correct initial value. + * + * @since 9 + */ + protected Boolean getInitialFocusTraversable() { return Boolean.FALSE; } - /** - * Not everything uses the default value of null for cursor. - * This method provides a way to have them return the correct initial value. - * @treatAsPrivate implementation detail - */ - @Deprecated - protected /*do not make final*/ Cursor impl_cssGetCursorInitialValue() { + /** + * Not everything uses the default value of null for cursor. + * This method provides a way to have them return the correct initial value. + * + * @since 9 + */ + protected Cursor getInitialCursor() { return null; } @@ -8518,7 +8518,7 @@ public Cursor getInitialValue(Node node) { // Most controls default focusTraversable to true. // Give a way to have them return the correct default value. - return node.impl_cssGetCursorInitialValue(); + return node.getInitialCursor(); } }; @@ -8553,7 +8553,7 @@ public Boolean getInitialValue(Node node) { // Most controls default focusTraversable to true. // Give a way to have them return the correct default value. - return node.impl_cssGetFocusTraversableInitialValue(); + return node.getInitialFocusTraversable(); } };