diff --git a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java --- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java +++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java @@ -835,7 +835,7 @@ private void disableColumnReordering() { for (TableColumn column : table.getColumns()) { - Deprecation.setTableColumnReordable(column, false); + column.setReorderable(false); } } diff --git a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java --- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java +++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java @@ -232,12 +232,6 @@ return gridPane.impl_getCellBounds(c, r); } - // RT-33675 : Promote TableColumn.impl_setReorderable() to public API - @SuppressWarnings("rawtypes") - public static void setTableColumnReordable(TableColumn tableColumn, boolean reordable) { - tableColumn.impl_setReorderable(reordable); - } - // Returns the corresponding text css (.css) from a binary css (.bss) public static URL getThemeTextStylesheet(String binaryCssUrlStr) { String textCssUrlStr = binaryCssUrlStr.replaceAll(".bss", ".css"); //NOI18N diff --git a/modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java b/modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java --- a/modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java +++ b/modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java @@ -504,32 +504,26 @@ // --- Reorderable + /** + * A boolean property to toggle on and off the 'reorderability' of this column + * (with drag and drop - reordering by modifying the appropriate columns + * list is always allowed). When this property is true, this column can be reordered by + * users simply by dragging and dropping the columns into their desired positions. + * When this property is false, this ability to drag and drop columns is not available. + * + * @since 9 + */ private BooleanProperty reorderable; - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public final BooleanProperty impl_reorderableProperty() { + public final BooleanProperty reorderableProperty() { if (reorderable == null) { reorderable = new SimpleBooleanProperty(this, "reorderable", true); } return reorderable; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public final void impl_setReorderable(boolean value) { - impl_reorderableProperty().set(value); + public final void setReorderable(boolean value) { + reorderableProperty().set(value); } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - public final boolean impl_isReorderable() { + public final boolean isReorderable() { return reorderable == null ? true : reorderable.get(); } diff --git a/modules/controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java b/modules/controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java --- a/modules/controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java +++ b/modules/controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java @@ -864,7 +864,7 @@ // package for testing void columnReorderingStarted(double dragOffset) { - if (! getTableColumn().impl_isReorderable()) return; + if (! getTableColumn().isReorderable()) return; // Used to ensure the column ghost is positioned relative to where the // user clicked on the column header @@ -877,7 +877,7 @@ // package for testing void columnReordering(double sceneX, double sceneY) { - if (! getTableColumn().impl_isReorderable()) return; + if (! getTableColumn().isReorderable()) return; // this is for handling the column drag to reorder columns. // It shows a line to indicate where the 'drop' will be. @@ -958,7 +958,7 @@ // package for testing void columnReorderingComplete() { - if (! getTableColumn().impl_isReorderable()) return; + if (! getTableColumn().isReorderable()) return; // Move col from where it is now to the new position. moveColumn(getTableColumn(), newColumnPos); diff --git a/modules/controls/src/test/java/test/javafx/scene/control/TableColumnTest.java b/modules/controls/src/test/java/test/javafx/scene/control/TableColumnTest.java --- a/modules/controls/src/test/java/test/javafx/scene/control/TableColumnTest.java +++ b/modules/controls/src/test/java/test/javafx/scene/control/TableColumnTest.java @@ -698,32 +698,32 @@ ********************************************************************/ @Test public void reorderableIsTrueByDefault() { - assertTrue(column.impl_isReorderable()); - assertTrue(column.impl_reorderableProperty().get()); + assertTrue(column.isReorderable()); + assertTrue(column.reorderableProperty().get()); } @Test public void reorderableCanBeSpecified() { - column.impl_setReorderable(false); - assertFalse(column.impl_isReorderable()); - assertFalse(column.impl_reorderableProperty().get()); + column.setReorderable(false); + assertFalse(column.isReorderable()); + assertFalse(column.reorderableProperty().get()); } @Test public void reorderablePropertyBeanIsCorrect() { - assertSame(column, column.impl_reorderableProperty().getBean()); + assertSame(column, column.reorderableProperty().getBean()); } @Test public void reorderablePropertyNameIsCorrect() { - assertEquals("reorderable", column.impl_reorderableProperty().getName()); + assertEquals("reorderable", column.reorderableProperty().getName()); } @Test public void reorderableCanBeBound() { BooleanProperty other = new SimpleBooleanProperty(false); - column.impl_reorderableProperty().bind(other); - assertFalse(column.impl_isReorderable()); - assertFalse(column.impl_reorderableProperty().get()); + column.reorderableProperty().bind(other); + assertFalse(column.isReorderable()); + assertFalse(column.reorderableProperty().get()); other.set(true); - assertTrue(column.impl_isReorderable()); - assertTrue(column.impl_reorderableProperty().get()); + assertTrue(column.isReorderable()); + assertTrue(column.reorderableProperty().get()); } /********************************************************************* diff --git a/modules/controls/src/test/java/test/javafx/scene/control/TreeTableColumnTest.java b/modules/controls/src/test/java/test/javafx/scene/control/TreeTableColumnTest.java --- a/modules/controls/src/test/java/test/javafx/scene/control/TreeTableColumnTest.java +++ b/modules/controls/src/test/java/test/javafx/scene/control/TreeTableColumnTest.java @@ -702,32 +702,32 @@ ********************************************************************/ @Test public void reorderableIsTrueByDefault() { - assertTrue(column.impl_isReorderable()); - assertTrue(column.impl_reorderableProperty().get()); + assertTrue(column.isReorderable()); + assertTrue(column.reorderableProperty().get()); } @Test public void reorderableCanBeSpecified() { - column.impl_setReorderable(false); - assertFalse(column.impl_isReorderable()); - assertFalse(column.impl_reorderableProperty().get()); + column.setReorderable(false); + assertFalse(column.isReorderable()); + assertFalse(column.reorderableProperty().get()); } @Test public void reorderablePropertyBeanIsCorrect() { - assertSame(column, column.impl_reorderableProperty().getBean()); + assertSame(column, column.reorderableProperty().getBean()); } @Test public void reorderablePropertyNameIsCorrect() { - assertEquals("reorderable", column.impl_reorderableProperty().getName()); + assertEquals("reorderable", column.reorderableProperty().getName()); } @Test public void reorderableCanBeBound() { BooleanProperty other = new SimpleBooleanProperty(false); - column.impl_reorderableProperty().bind(other); - assertFalse(column.impl_isReorderable()); - assertFalse(column.impl_reorderableProperty().get()); + column.reorderableProperty().bind(other); + assertFalse(column.isReorderable()); + assertFalse(column.reorderableProperty().get()); other.set(true); - assertTrue(column.impl_isReorderable()); - assertTrue(column.impl_reorderableProperty().get()); + assertTrue(column.isReorderable()); + assertTrue(column.reorderableProperty().get()); } /*********************************************************************