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 Summary
Modifier and TypeMethodDescriptionReturns the controller context code.Returns the widget adapter.Returns the widget classReturns the widget controller.Returns the widget (view) model.Returns the widget renderer.Returns the widget component's CSS style class.Returns the widget's title.booleanReturns whether focusing is enabled or not.booleanReturns whether content lazy loading is enabled or not.voidsetControllerCtx(String controllerCtx) Sets the controller context code to be used by a created widget.voidsetFocusable(boolean focusable) Sets whether focusing is enabled or not.voidsetLazyLoadingEnabled(boolean enabled) Enables or disables content lazy loading.voidsetWidgetAdapter(WidgetAdapter adapter) Sets the widget adapter toadapter.voidsetWidgetClass(Class<T> clazz) Sets the widget class i.e.voidsetWidgetController(WidgetController controller) Sets the widget controller to be used by a created widget.voidsetWidgetModel(WidgetModel model) Sets the widget (view) model tomodelvoidsetWidgetRenderer(WidgetRenderer renderer) Sets the widget renderer to be used by a created widget.voidsetWidgetSclass(String sclass) Sets the CSS style class to be used by a created widget.voidsetWidgetTitle(String title) Sets the widget title totitle.
-
Method Details
-
setWidgetTitle
Sets the widget title totitle.- 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 tosetWidgetTitle(String)i.e. in the case of an i3-label key, no evaluation is done.- Returns:
- widget's title
-
setWidgetClass
Sets the widget class i.e. the class for which a new instance should be created.- Parameters:
clazz- widget class
-
getWidgetClass
Returns the widget class- Returns:
- widget class
-
setWidgetRenderer
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
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
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
Sets the widget (view) model tomodel- Parameters:
model- the widget model
-
getWidgetModel
WidgetModel getWidgetModel()Returns the widget (view) model.- Returns:
- widget's model or
nullif no model is available
-
setWidgetAdapter
Sets the widget adapter toadapter.- Parameters:
adapter- the widget adapter
-
getWidgetAdapter
WidgetAdapter getWidgetAdapter()Returns the widget adapter.- Returns:
- the widget adapter or
nullif no adapter is available
-
setFocusable
void setFocusable(boolean focusable) Sets whether focusing is enabled or not.- Parameters:
focusable-truemeans focusing is enabled,falsemeans disabled
-
isFocusable
boolean isFocusable()Returns whether focusing is enabled or not.- Returns:
trueif focusing is enabled,falseotherwise
-
getWidgetSclass
String getWidgetSclass()Returns the widget component's CSS style class.- Returns:
- widget component's CSS style class
-
setWidgetSclass
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:
trueif lazy loading is enabled,falseotherwise
-