So, the header data is rendered with an instance of a TableViewHeaderDataRenderer (by default), which itself is a subclass of BoxPane and contains an Image and a Label component as children. There are two relatively easy ways to center things:
1. Get the default header data renderer and set the horizontal alignment style to "center".
2. Subclass the default TableViewHeaderDataRenderer yourself and set the style in your constructor, then set this modified renderer as the header data renderer on the TableView.
If you need actual code for either of these methods, I could do that, but thought you might want to take a crack yourself....
In general, using one of these two methods works for (almost?) all rendering type issues in Pivot (things like changing alignment, wrapping, increasing padding, or spacing, or setting special attributes on text). All the default renderers are just made up of simple containers and components, but which implement the specific "render" method needed for the component. If you look at the source code for any of these *Renderer.java files you should be able to see what I mean.
The third option is to implement a completely new renderer on your own and set it as the renderer on your object. I've never found that to be necessary, personally, but it could be done. Almost always you can either subclass the default implementation (and you usually just have to write a custom constructor and set some styles or attributes there), or you can just get the default instance and do the same thing in your own code.
From: ninjathehunter [mailto:[hidden email]]
Sent: Tuesday, August 05, 2014 2:04 PM
To: [hidden email] Subject: How to set alignment of TableView