Interface StateContext
- All Known Subinterfaces:
LayoutContext
public interface StateContext
Responsible for maintaining widget state.
-
Method Summary
Modifier and TypeMethodDescription<W extends Widget>
WidgetInstance<W> getState
(WidgetInstance<?> parent, Key.CallSite key, W widget) Gets or instantiates a new element and configures it according to the provided widget.default <W extends Widget>
WidgetInstance<W> getStateIndexed
(WidgetInstance<?> parent, int index, W widget)
-
Method Details
-
getState
Gets or instantiates a new element and configures it according to the provided widget.Note: elements are keyed by the parent key, the
key
, and the widget class. -
getStateIndexed
default <W extends Widget> WidgetInstance<W> getStateIndexed(WidgetInstance<?> parent, int index, W widget)
-