Interface WidgetConfig<T extends Widget>

Type Parameters:
T - widget type
All Known Implementing Classes:
DefaultWidgetConfig

public interface WidgetConfig<T extends Widget>
A widget configuration holds widget creation information used by a WidgetFactory when creating widget components.
See Also:
  • Method Details

    • setWidgetTitle

      void setWidgetTitle(String title)
      Sets the widget title to title.
      Parameters:
      title - widget's title as either i3-label key or as direct value
    • getWidgetTitle

      String getWidgetTitle()
      Returns the widget's title.

      Note: This method will return the raw title as set by previous call to setWidgetTitle(String) i.e. in the case of an i3-label key, no evaluation is done.

      Returns:
      widget's title
    • setWidgetClass

      void setWidgetClass(Class<T> clazz)
      Sets the widget class i.e. the class for which a new instance should be created.
      Parameters:
      clazz - widget class
    • getWidgetClass

      Class<T> getWidgetClass()
      Returns the widget class
      Returns:
      widget class
    • setWidgetRenderer

      void setWidgetRenderer(WidgetRenderer renderer)
      Sets the widget renderer to be used by a created widget.
      Parameters:
      renderer - widget renderer
    • getWidgetRenderer

      WidgetRenderer getWidgetRenderer()
      Returns the widget renderer.
      Returns:
      widget renderer
    • setWidgetController

      void setWidgetController(WidgetController controller)
      Sets the widget controller to be used by a created widget.
      Parameters:
      controller - widget controller
    • getWidgetController

      WidgetController getWidgetController()
      Returns the widget controller.
      Returns:
      widget controller
    • setControllerCtx

      void setControllerCtx(String controllerCtx)
      Sets the controller context code to be used by a created widget.
      Parameters:
      controllerCtx - controller context code
      See Also:
    • getControllerCtx

      String getControllerCtx()
      Returns the controller context code.
      Returns:
      controller context code
    • setWidgetModel

      void setWidgetModel(WidgetModel model)
      Sets the widget (view) model to model
      Parameters:
      model - the widget model
    • getWidgetModel

      WidgetModel getWidgetModel()
      Returns the widget (view) model.
      Returns:
      widget's model or null if no model is available
    • setWidgetAdapter

      void setWidgetAdapter(WidgetAdapter adapter)
      Sets the widget adapter to adapter.
      Parameters:
      adapter - the widget adapter
    • getWidgetAdapter

      WidgetAdapter getWidgetAdapter()
      Returns the widget adapter.
      Returns:
      the widget adapter or null if no adapter is available
    • setFocusable

      void setFocusable(boolean focusable)
      Sets whether focusing is enabled or not.
      Parameters:
      focusable - true means focusing is enabled, false means disabled
    • isFocusable

      boolean isFocusable()
      Returns whether focusing is enabled or not.
      Returns:
      true if focusing is enabled, false otherwise
    • getWidgetSclass

      String getWidgetSclass()
      Returns the widget component's CSS style class.
      Returns:
      widget component's CSS style class
    • setWidgetSclass

      void setWidgetSclass(String sclass)
      Sets the CSS style class to be used by a created widget.
      Parameters:
      sclass - CSS style class
    • setLazyLoadingEnabled

      void setLazyLoadingEnabled(boolean enabled)
      Enables or disables content lazy loading.
      Parameters:
      enabled - lazy loading
    • isLazyLoadingEnabled

      boolean isLazyLoadingEnabled()
      Returns whether content lazy loading is enabled or not.
      Returns:
      true if lazy loading is enabled, false otherwise