Package io.github.mmm.ui.spi.controller
Class UiControllerRoot
- java.lang.Object
-
- io.github.mmm.ui.spi.controller.AbstractUiController<UiSlot>
-
- io.github.mmm.ui.spi.controller.UiControllerRoot
-
- All Implemented Interfaces:
AttributeReadId
,AttributeReadTitle
,AttributeReadVisible
,UiController<UiSlot>
public class UiControllerRoot extends AbstractUiController<UiSlot>
-
-
Field Summary
-
Fields inherited from interface io.github.mmm.ui.api.controller.UiController
ID_CONTENT, ID_FOOTER, ID_HEADER, ID_HOME, ID_MARGIN, ID_NAVIGATION, ID_PAGE, ID_ROOT
-
-
Constructor Summary
Constructors Constructor Description UiControllerRoot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UiSlot
createView()
protected boolean
doEmbed(String slotId, UiController<?> childController)
Override this method for parent controllers to embed children.protected UiEmbedding
doShow(UiPlace newPlace, UiEmbedding newSlot)
String
getId()
The ID of a controller should only contain ASCII letters, Latin digits, hyphens or underscores.String
getTitle()
protected void
onShow()
This method gets called whenever theview
is shown on the screen.-
Methods inherited from class io.github.mmm.ui.spi.controller.AbstractUiController
embed, getEmbedding, getView, hide, isVisible, onHide, onReset, reset, show, show
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.ui.api.controller.UiController
isNavigable
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:UiController
The ID of a controller should only contain ASCII letters, Latin digits, hyphens or underscores. It may also contain slashes ('/') or the hash sign ('#'). It must not contain '?', '&', '=', ':', ';', '\\' or ' '.- Returns:
- the ID of this object.
- See Also:
UiController.ID_ROOT
,UiController.ID_PAGE
,UiController.ID_HOME
-
getTitle
public String getTitle()
- Specified by:
getTitle
in interfaceAttributeReadTitle
- Specified by:
getTitle
in interfaceUiController<UiSlot>
- Overrides:
getTitle
in classAbstractUiController<UiSlot>
- Returns:
- the title of this object. Similar to
text
but more exposed (e.g. displayed in title-bar in case of a window). Will be the emptyString
if not set.
-
createView
protected UiSlot createView()
- Specified by:
createView
in classAbstractUiController<UiSlot>
- Returns:
- the new instance of the
view
.
-
doEmbed
protected boolean doEmbed(String slotId, UiController<?> childController)
Description copied from class:AbstractUiController
Override this method for parent controllers to embed children.- Overrides:
doEmbed
in classAbstractUiController<UiSlot>
- Parameters:
slotId
- theslot ID
where to embed the given childUiController
sview
.childController
- the child controller to embed.- Returns:
true
if the embedded slot is dynamic (e.g. a new closable tab),false
otherwise if static and reusable slot in the UI (default).- See Also:
AbstractUiController.embed(UiEmbedding, UiController)
-
onShow
protected void onShow()
Description copied from class:AbstractUiController
This method gets called whenever theview
is shown on the screen. It can be overridden to trigger custom logic - e.g. to update data.- Overrides:
onShow
in classAbstractUiController<UiSlot>
-
doShow
protected final UiEmbedding doShow(UiPlace newPlace, UiEmbedding newSlot)
- Specified by:
doShow
in classAbstractUiController<UiSlot>
- Parameters:
newPlace
- theUiPlace
to open. Itidentifies
the leaf childUiController
and provides potentialparameters
.newSlot
- the optionalUiEmbedding
where to embed the child controller.- Returns:
- the
UiEmbedding
where to embed this controller into a parent controller ornull
if this is the root controller.
-
-