Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: UIFactoryService

[21:7] extends: EngineService

Wraps FXGL's UIFactoryService, the engine service that produces skin-themed UI nodes (buttons, choice boxes, text, fonts, lists, checkboxes, sliders, spinners, text flows, MDI windows, and PropertyMap views). Reached at runtime via fxgl.getUIFactoryService (chunk 6); obtain a wrapper via adopt. Methods that return JavaFX nodes hand back raw AussomJavaObjects; Aussom users typically pass those straight into a layout via the layout's raw children list, or adopt them into a wrapper for further fluent setup.

Methods

  • UIFactoryService (Ajo = null)

    Creates a UIFactoryService wrapper. Empty by default; the (Ajo) form wraps an existing instance from fxgl.getUIFactoryService.

    • @p Ajo is an optional AussomJavaObject around a UIFactoryService.
  • adopt (object Ajo)

    Wraps an existing UIFactoryService AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a UIFactoryService.
    • @r A new wrapper.
  • newButton (string Text)

    Returns a new themed Button with the given text.

    • @p Text is the button label.
    • @r An AussomJavaObject around an FXGLButton.
  • newCheckBox ()

    Returns a new themed CheckBox.

    • @r An AussomJavaObject around an FXGLCheckBox.
  • newSlider ()

    Returns a new themed Slider.

    • @r An AussomJavaObject around an FXGLSlider.
  • newChoiceBox ()

    Returns a new themed ChoiceBox.

    • @r An AussomJavaObject around an FXGLChoiceBox.
  • newText (string Message)

    Returns a new themed Text node wrapped as fx.Text.

    • @p Message is the text content.
    • @r An fx.Text wrapper.
  • newTextFlow ()

    Returns a new themed FXGLTextFlow.

    • @r An AussomJavaObject around an FXGLTextFlow.
  • newFont (double Size)

    Returns a new themed Font at the given size.

    • @p Size is the font size in points.
    • @r An AussomJavaObject around a javafx.scene.text.Font.
  • newWindow ()

    Returns a new MDIWindow with no decorations.

    • @r An AussomJavaObject around an MDIWindow.
  • newPropertyMapView (object MapObj)

    Returns a JavaFX Node that displays and edits the given PropertyMap.

    • @p MapObj is a PropertyMap wrapper.
    • @r An AussomJavaObject around a javafx.scene.Node.
  • newTextSized (string Message, double FontSize)

    Returns a new themed Text node wrapped as fx.Text, sized to the given font size.

    • @p Message is the text content.
    • @p FontSize is the font size in points.
    • @r An fx.Text wrapper.
  • newTextColored (string Message, object ColorObj, double FontSize)

    Returns a new themed Text node wrapped as fx.Text with the given color and font size.

    • @p Message is the text content.
    • @p ColorObj is a Color wrapper.
    • @p FontSize is the font size.
    • @r An fx.Text wrapper.
  • newTextTyped (string Message, object ColorObj, string FontTypeName, double FontSize)

    Returns a new themed Text node wrapped as fx.Text with the given color, font-type, and size.

    • @p Message is the text content.
    • @p ColorObj is a Color wrapper.
    • @p FontTypeName is the FontType name ("UI", "MONO", "GAME", "TEXT").
    • @p FontSize is the font size.
    • @r An fx.Text wrapper.
  • newTextBound (object ExprObj)

    Returns a new Text node wrapped as fx.Text, bound to a JavaFX StringExpression so the displayed text auto-updates when the expression changes.

    • @p ExprObj is an AussomJavaObject around a StringExpression.
    • @r An fx.Text wrapper.
  • newButtonBound (object BindingObj)

    Returns a themed Button whose label is bound to a StringBinding (used for localized labels).

    • @p BindingObj is an AussomJavaObject around a StringBinding.
    • @r An AussomJavaObject around an FXGLButton.
  • newFontTyped (string FontTypeName, double Size)

    Returns a themed Font sized to the given font-type slot.

    • @p FontTypeName is the FontType name ("UI", "MONO", "GAME", "TEXT").
    • @p Size is the font size in points.
    • @r An AussomJavaObject around a javafx.scene.text.Font.
  • registerFontFactory (string FontTypeName, object FactoryObj)

    Registers a custom FontFactory for a given FontType slot.

    • @p FontTypeName is the FontType name.
    • @p FactoryObj is a FontFactory wrapper.
    • @r this object
  • newChoiceBoxItems (object ItemsObj)

    Returns a themed ChoiceBox pre-populated from the given ObservableList.

    • @p ItemsObj is an AussomJavaObject around an ObservableList.
    • @r An AussomJavaObject around an FXGLChoiceBox.
  • newSpinnerItems (object ItemsObj)

    Returns a themed Spinner backed by the given items.

    • @p ItemsObj is an AussomJavaObject around an ObservableList.
    • @r An AussomJavaObject around an FXGLSpinner.
  • newListView ()

    Returns an empty themed ListView.

    • @r An AussomJavaObject around an FXGLListView.
  • newListViewItems (object ItemsObj)

    Returns a themed ListView pre-populated from the given ObservableList.

    • @p ItemsObj is an AussomJavaObject around an ObservableList.
    • @r An AussomJavaObject around an FXGLListView.
  • newPropertyView (string Name, object PropertyObj)

    Returns a typed property-editor Node for the given JavaFX Property (DoubleProperty, IntegerProperty, BooleanProperty, StringProperty, ObjectProperty).

    • @p Name is the property display name.
    • @p PropertyObj is an AussomJavaObject around the Property.
    • @r An AussomJavaObject around a javafx.scene.Node.