Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private TableView1 As TableView
Private tvSelModel As JavaObject
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
TableView1.SetColumns(Array As String("Col1", "Col2"))
For i = 1 To 100
TableView1.Items.Add(Array(i, i))
Next
Dim jotable As JavaObject=TableView1
Dim joSelMode As JavaObject
joSelMode.InitializeStatic("javafx.scene.control.SelectionMode")
'get Selection Model:
tvSelModel = jotable.RunMethodJO("getSelectionModel", Null)
'set the selectionmode of the tableview by using the enum
tvSelModel.RunMethod("setSelectionMode",Array(joSelMode.GetField("MULTIPLE")))
End Sub
Sub SelectAll
tvSelModel.RunMethod("selectAll", Null)
End Sub
Sub MainForm_MouseClicked (EventData As MouseEvent)
SelectAll
End Sub