pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damir Dezeljin <damir.dezel...@dezo.org>
Subject How to apply styles to TableView rows
Date Fri, 18 Oct 2013 10:14:41 GMT
Hello,

Last week I got a task to develop a simple Java application for importing
Excel files into MySQL database. As I didn't have experience with Java GUI,
I did an investigation and I choose Apache Pivot for developing the GUI
toolking / framework; I'll use Apache POI for reading Excel files.

The application I'm developing needs to load in an Excel spreadsheet and
display its data in a data grid format; a subset of displayed data needs to
be highlighted (colored) to denote what data is going to be imported into a
DB.

I figured out the Apache Pivot TableView would meet my requirements for
displaying a data grid. So I created a TablePane in Java and added it to a
ScrollPane defined in a BXML file. Today I'll move also the TableView
definition into Java code as it needs to be dynamic.

Now I'm struggling finding the way how to highlight a certain rows. Various
posts mention the TableView CellRenderer has to be extended; however, I
didn't find the way or an example how to do it.
Can someone help me out with an example or hints how to implement it. In
case I need to extend a TablePane parrent which in my case is ScrollPane or
any other class by defining my own, I would appreciate an example how to
use my own class within a BXML file where all the GUI structure beside the
TableView for data is defined.

Thanks in advance,
 Damir

Mime
View raw message