' Sets the position of the divider for a splitpane
' Parameter: SplitPane, Index of the Divider, Position range 0 to 1
Sub setDividerPosition(Split As Node, DividerIndex As Int, Position As Double)
Dim jo As JavaObject = Split
jo.RunMethod("setDividerPosition", Array As Object(DividerIndex, Position))
' Log("setDividerPosition: Index: " & DividerIndex & ", Position: " & Position)
End Sub
' Gets the position of the divider for a splitpane
' Parameter: SplitPane, Index of the Divider
' Return: Position of the Divider range 0 to 1
Sub getDividerPosition(Split As Node, DividerIndex As Int) As Double
Dim jo As JavaObject = Split
Dim dp() As Double
dp = jo.RunMethod("getDividerPositions", Null)
If (DividerIndex < 0) OR (DividerIndex > dp.Length) Then Return -1
' Log("getDividerPosition: Index: " & DividerIndex & ", Position: " & dp(DividerIndex))
Return dp(DividerIndex)
End Sub