JDK-8091874 : Need API in GridPane to get row count, column count, and cell bounds
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-04
  • Updated: 2016-05-21
  • Resolved: 2016-05-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Blocks :  
The following impl_ methods, copied from GridPaneDesignInfo (which is part of the tooling APIs but not part of the runtime), are being added to GridPane in FX 8 as internal, treatAsPriavate methods to support SceneBuilder:

public final int impl_getRowCount()
public final int impl_getColumnCount()
public final Bounds impl_getCellBounds(int columnIndex, int rowIndex)

We should formalize this API in a future version of FX.
Filed JDK-8157500 for follow up unit tests.

Changeset: 52988193a50e Author: ckyang Date: 2016-05-20 21:23 -0700 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/52988193a50e

Two additional comments: 1. Add a missing '.' at the end of the following sentence: 2703 * Returns the number of rows in this GridPane 2. The following should be changed from "child" to "cell" 2744 * @param rowIndex the row index position for the child within this GridPane, counting from 0 +1 with those two changes (no need for a new webrev)

Here is the revised webrev: http://cr.openjdk.java.net/~ckyang/JDK-8091874/webrev.01/ OK. I will file a unit tests JIRA for this new methods.

The API is approved for 9. Comments on the javadoc: 1. All three new methods need "@since 9" 2. The docs for getCellBounds are missing the @param tags for columnIndex and rowIndex. 3. Perhaps the following might be better for getRow/ColumnCount? * Returns the number of rows in this GridPane. Testing: Please file a new bug to write unit tests for these new methods.

Please review the suggested fix: http://cr.openjdk.java.net/~ckyang/JDK-8091874/webrev.00/ I have verified that SceneBuilder runs fine with change.