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 aWidgetFactory
when creating widget components.- See Also:
WidgetBrowserModel
,WidgetFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getControllerCtx()
Returns the controller context code.WidgetAdapter
getWidgetAdapter()
Returns the widget adapter.java.lang.Class<T>
getWidgetClass()
Returns the widget classWidgetController
getWidgetController()
Returns the widget controller.WidgetModel
getWidgetModel()
Returns the widget (view) model.WidgetRenderer
getWidgetRenderer()
Returns the widget renderer.java.lang.String
getWidgetSclass()
Returns the widget component's CSS style class.java.lang.String
getWidgetTitle()
Returns the widget's title.boolean
isFocusable()
Returns whether focusing is enabled or not.boolean
isLazyLoadingEnabled()
Returns whether content lazy loading is enabled or not.void
setControllerCtx(java.lang.String controllerCtx)
Sets the controller context code to be used by a created widget.void
setFocusable(boolean focusable)
Sets whether focusing is enabled or not.void
setLazyLoadingEnabled(boolean enabled)
Enables or disables content lazy loading.void
setWidgetAdapter(WidgetAdapter adapter)
Sets the widget adapter toadapter
.void
setWidgetClass(java.lang.Class<T> clazz)
Sets the widget class i.e.void
setWidgetController(WidgetController controller)
Sets the widget controller to be used by a created widget.void
setWidgetModel(WidgetModel model)
Sets the widget (view) model tomodel
void
setWidgetRenderer(WidgetRenderer renderer)
Sets the widget renderer to be used by a created widget.void
setWidgetSclass(java.lang.String sclass)
Sets the CSS style class to be used by a created widget.void
setWidgetTitle(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
null
if 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
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
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:
true
if lazy loading is enabled,false
otherwise
-
-