TableView enhancements for JavaFX 2.2

Tadashi Ohmura omurata at
Wed Mar 7 18:24:54 PST 2012

Thank you Mr. Jonathan Giles

What about these convenient methods for TableView ?

   public void aetStyleForRow( int rowIndex, String styleValue )
   public void aetStyleForColumn( int columnIndex, String styleValue )
   public void aetStyleForCell( int rowIndex,  int columnIndex, String 
styleValue )

Best Regards

   Tadashi Ohmura

(2012/03/08 6:09), Jonathan Giles wrote:
> Yes, this is true, and I heard it mentioned today elsewhere too. So, 
> there has been talk for sometime about validation APIs, etc, and this 
> may one day be applicable, but there is also a simpler way that we 
> could do in 2.2. We could just add a styleclass to each row in the 
> TableView visible area that represents its index, and have both column 
> and row styleclasses in the TableCell. I'll have to check with David, 
> our CSS guy, on how much of a heart attack this may give him though.
> For example, the third column of a TableView might be column-3 (or 
> column-2, I'm not sure if we should count from zero or one), and the 
> third row might be row-3 (or row-2). I would then possibly also have 
> the TableCell include both style classes, so that you could write 
> something like:
> .table-cell:column-3:row-3 {
>    -fx-background-color: red;
> }
> If you wanted to fill all cells in the 5th column with a green fill, 
> you could do:
> .table-cell:column-5 {
>   -fx-background-color: green;
> }
> And, of course, if you wanted to fill a row with a blue fill, you 
> could do:
> .table-cell:row-10 {
>    -fx-background-color: blue;
> }
> I think this might be a little painful initially, but when combined 
> with a future validation API that knows explicitly about TableView and 
> its styleclass approach above, you could get some cool stuff happening 
> fairly simply.
> -- Jonathan
> On Thursday, 8 March 2012 10:02:02 a.m., Tom Eugelink wrote:
>> Wat would be interesting is to be able to indicate that a cell as an 
>> error, maybe by showing a red border. Or by some overlay.

More information about the openjfx-dev mailing list