Hi,
I was writing up some code using GridPanes, and I noticed a bug in
GridPaneSkin.java. This looks like a standard copy/paste bug, so my explanation
is minimal.
Notice that in the second loop, the if statement checks for
(metadata.isRowVisible(...)) instead of (metadata.isColumnVisible(...)).
This bug prevents a GridPane from being used anytime the GridPane does not have
an equal number of rows and columns. If the number of rows and columns is equal
(ie 3x3 in the demo), then the code works.
@Override
public void paint(Graphics2D graphics) {
...
if (showHorizontalGridLines && verticalSpacing > 0 && rowCount > 1)
{
graphics.setPaint(horizontalGridColor);
int rowY = padding.top + (cellHeight + verticalSpacing);
for (int i = 1; i < rowCount; i++) {
if (metadata.isRowVisible(i - 1)) {
...
}
}
}
if (showVerticalGridLines && horizontalSpacing > 0 && columnCount >
1) {
graphics.setPaint(verticalGridColor);
int columnX = padding.left + (cellWidth + horizontalSpacing);
for (int j = 1; j < columnCount; j++) {
if (metadata.isRowVisible(j - 1)) {
...
}
}
}
}
Just bringing this to everyone's attention. Overall, I am pretty excited about
using Pivot in my application.
Thanks!
Michael
Michael Villere
Software Developer
Classroom Response System Integration
800.419.3191 x7822
[cid:[email protected]]<http://www.archlearning.com/> Archipelago
Learning<http://www.archlearning.com/> | STUDY
ISLAND<http://www.studyisland.com/> | Northstar
Learning<http://www.northstarlearning.com/>
______________________________________________________________________________________________________
The information contained in this electronic message and any attachments is
confidential,
is for the sole use of the intended recipient(s) and may contain privileged
information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the
intended recipient, you must not read, use or disseminate the information, and
should immediately
contact the sender by reply email and destroy all copies of the original
message.