Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private TableView1 As TableView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("tv1") 'Just a default tableview with 3 cols
MainForm.Show
justifyTableHeaders(TableView1,"center_left")
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub justifyTableHeaders(theTableView As JavaObject,setTo As String)
Dim headers,iter As JavaObject
headers = theTableView.RunMethodjo("lookupAll",Array(".table-view .column-header .label"))
iter = headers.runmethod("iterator",Null)
Do While 1=1
Try
CSSUtils.SetStyleProperty(iter.RunMethod("next",Null),"-fx-alignment",setTo)
Catch
Exit
End Try
Loop
End Sub