Sub Class_Globals
Private JOTextMetric As JavaObject
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
JOTextMetric.InitializeStatic("javafx.scene.text.TextBuilder")
End Sub
Public Sub getTextWidth(Text As String,TextFont As Font) As Int
Return JOTextMetric.RunMethodJO("create",Null).RunMethodJO("text",Array(Text)).RunMethodJO("font",Array(TextFont)).RunMethodJO("build",Null).RunMethodJO("getLayoutBounds",Null).RunMethod("getWidth",Null)
End Sub
Public Sub getTextHeight(Text As String,TextFont As Font) As Int
Return JOTextMetric.RunMethodJO("create",Null).RunMethodJO("text",Array(Text)).RunMethodJO("font",Array(TextFont)).RunMethodJO("build",Null).RunMethodJO("getLayoutBounds",Null).RunMethod("getHeight",Null)
End Sub