Interface FxSidecar<T>

All Known Implementing Classes:
ReflectionSidecar

public interface FxSidecar<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy(T instance)
     
    @Nullable ResourceBundle
    getResources(T instance)
    Returns the resource bundle of the given instance if it has one.
    @Nullable String
    getTitle(T instance)
    Returns the title of the given controller instance if it has one.
    void
    init(T instance, Map<String,Object> params)
     
    javafx.scene.Node
    render(T instance, Map<String,Object> params)
     
  • Method Details

    • init

      void init(T instance, Map<String,Object> params)
    • render

      javafx.scene.Node render(T instance, Map<String,Object> params)
    • destroy

      void destroy(T instance)
    • getResources

      @Nullable @Nullable ResourceBundle getResources(T instance)
      Returns the resource bundle of the given instance if it has one. If no resource bundle is set, the default resource bundle will be used. If no default resource bundle is set, null will be returned.
      Parameters:
      instance - The instance to get the resource bundle from
      Returns:
      The resource bundle of the given instance if it has one or the default resource bundle
      Throws:
      RuntimeException - If the instance has more than one field annotated with Resource
    • getTitle

      @Nullable @Nullable String getTitle(T instance)
      Returns the title of the given controller instance if it has one. If the title is a key, the title will be looked up in the resource bundle of the controller.
      Parameters:
      instance - The controller instance
      Returns:
      The title of the controller