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 aWidgetFactorywhen creating widget components.- See Also:
WidgetBrowserModel,WidgetFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetControllerCtx()Returns the controller context code.WidgetAdaptergetWidgetAdapter()Returns the widget adapter.java.lang.Class<T>getWidgetClass()Returns the widget classWidgetControllergetWidgetController()Returns the widget controller.WidgetModelgetWidgetModel()Returns the widget (view) model.WidgetRenderergetWidgetRenderer()Returns the widget renderer.java.lang.StringgetWidgetSclass()Returns the widget component's CSS style class.java.lang.StringgetWidgetTitle()Returns the widget's title.booleanisFocusable()Returns whether focusing is enabled or not.booleanisLazyLoadingEnabled()Returns whether content lazy loading is enabled or not.voidsetControllerCtx(java.lang.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(java.lang.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(java.lang.String sclass)Sets the CSS style class to be used by a created widget.voidsetWidgetTitle(java.lang.String title)Sets the widget title totitle.
-
-
-
Method Detail
-
setWidgetTitle
void setWidgetTitle(java.lang.String title)
Sets the widget title totitle.- Parameters:
title- widget's title as either i3-label key or as direct value
-
getWidgetTitle
java.lang.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
void setWidgetClass(java.lang.Class<T> clazz)
Sets the widget class i.e. the class for which a new instance should be created.- Parameters:
clazz- widget class
-
getWidgetClass
java.lang.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(java.lang.String controllerCtx)
Sets the controller context code to be used by a created widget.- Parameters:
controllerCtx- controller context code- See Also:
WidgetController
-
getControllerCtx
java.lang.String getControllerCtx()
Returns the controller context code.- Returns:
- controller context code
-
setWidgetModel
void setWidgetModel(WidgetModel model)
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
void setWidgetAdapter(WidgetAdapter adapter)
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
java.lang.String getWidgetSclass()
Returns the widget component's CSS style class.- Returns:
- widget component's CSS style class
-
setWidgetSclass
void setWidgetSclass(java.lang.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:
trueif lazy loading is enabled,falseotherwise
-
-