changeset 9806:52988193a50e

8091874: Need API in GridPane to get row count, column count, and cell bounds Reviewed-by: kcr
author ckyang
date Fri, 20 May 2016 21:23:45 -0700
parents 75f8a4f1d1b9
children b603693ce9c2
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java modules/graphics/src/main/java/javafx/scene/layout/GridPane.java
diffstat 2 files changed, 19 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Fri May 20 16:56:50 2016 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Fri May 20 21:23:45 2016 -0700
@@ -184,15 +184,15 @@
 //    }
 
     public static int getGridPaneColumnCount(GridPane gridPane) {
-        return gridPane.impl_getColumnCount();
+        return gridPane.getColumnCount();
     }
 
     public static int getGridPaneRowCount(GridPane gridPane) {
-        return gridPane.impl_getRowCount();
+        return gridPane.getRowCount();
     }
 
     public static Bounds getGridPaneCellBounds(GridPane gridPane, int c, int r) {
-        return gridPane.impl_getCellBounds(c, r);
+        return gridPane.getCellBounds(c, r);
     }
 
     // Returns the corresponding text css (.css) from a binary css (.bss)
--- a/modules/graphics/src/main/java/javafx/scene/layout/GridPane.java	Fri May 20 16:56:50 2016 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/layout/GridPane.java	Fri May 20 21:23:45 2016 -0700
@@ -2700,13 +2700,12 @@
     }
 
     /**
-     * Copied from GridPaneDesignInfo for SceneBuilder.
+     * Returns the number of rows in this GridPane.
      *
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     * @return the row count
+     * @since 9
      */
-    @Deprecated // SB-dependency: RT-33381 has been filed to track this
-    public final int impl_getRowCount() {
+    public final int getRowCount() {
         int nRows = this.getRowConstraints().size();
         for (int i = 0; i < this.getChildren().size(); i++) {
             Node child = this.getChildren().get(i);
@@ -2720,13 +2719,12 @@
     }
 
     /**
-     * Copied from GridPaneDesignInfo for SceneBuilder.
+     * Returns the number of columns in this GridPane.
      *
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     * @return the column count
+     * @since 9
      */
-    @Deprecated // SB-dependency: RT-33381 has been filed to track this
-    public final int impl_getColumnCount() {
+    public final int getColumnCount() {
         int nColumns = this.getColumnConstraints().size();
         for (int i = 0; i < this.getChildren().size(); i++) {
             Node child = this.getChildren().get(i);
@@ -2740,13 +2738,16 @@
     }
 
     /**
-     * Copied from GridPaneDesignInfo for SceneBuilder.
+     * Returns the bounds of the cell at the specified column and row position.
      *
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     * @param columnIndex the column index position for the cell within this
+     * GridPane, counting from 0
+     * @param rowIndex the row index position for the cell within this GridPane,
+     * counting from 0
+     * @return the bounds of the cell at columnIndex and rowIndex.
+     * @since 9
      */
-    @Deprecated // SB-dependency: RT-33381 has been filed to track this
-    public final Bounds impl_getCellBounds(int columnIndex, int rowIndex) {
+    public final Bounds getCellBounds(int columnIndex, int rowIndex) {
         final double snaphgap = this.snapSpaceX(this.getHgap());
         final double snapvgap = this.snapSpaceY(this.getVgap());
         final double top = this.snapSpaceY(this.getInsets().getTop());