VIEW
- is the generic type of the view
.public abstract class AbstractDialogController<VIEW extends UiWidget> extends AbstractLoggableComponent implements AbstractDialog
Dialog
or
PopupDialog
. It implements AbstractDialog
as it represents the actual
Dialog
or PopupDialog
and is its main
entry point. A AbstractDialogController
is supposed to be a lightweight component and
construction
shall be cheap and fast. It contains a view
that
is lazily created for performance reasons. The view
can also be reseted
to free
resources or for testing hot-code changes during development. Therefore implementations have to properly reset their
state in onReset()
.Modifier and Type | Field and Description |
---|---|
private VIEW |
view |
private boolean |
visible |
PATTERN_DIALOG_ID
Constructor and Description |
---|
AbstractDialogController()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract VIEW |
createView()
This method creates the
view and has to be implemented for each individual dialog. |
VIEW |
getView()
This method gets the view of this
AbstractDialogController . |
boolean |
isVisible()
This method determines if this dialog is currently visible (opened).
|
protected void |
onHide()
This method gets called whenever the
view is hidden from the screen. |
protected void |
onReset()
This method gets called whenever this controller is
reseted . |
protected void |
onShow()
This method gets called whenever the
view is shown on the screen. |
protected void |
reset()
This method resets this
AbstractDialogController . |
(package private) void |
setVisible(boolean visible)
|
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getTitle
private boolean visible
isVisible()
public final boolean isVisible()
isVisible
in interface AttributeReadVisible
isVisible
in interface AbstractDialog
true
if visible, false
otherwise.AttributeReadVisibleRecursive.isVisibleRecursive()
void setVisible(boolean visible)
visible
- - true
if this controller is about to show its view
,
false
if it will hide it.protected final void reset()
AbstractDialogController
.protected void onReset()
reseted
. If you keep custom state information
you need to override and reset your state.protected void onShow()
view
is shown on the screen. It can be overridden to
trigger custom logic - e.g. to update data.protected void onHide()
view
is hidden from the screen. It can be overridden to
trigger custom logics or to clean up resources.protected abstract VIEW createView()
view
and has to be implemented for each individual dialog. view
.public VIEW getView()
AbstractDialogController
. The view is the actual UI represented by a
UiWidget
. UiWidgetRegular
. However, for specific
controllers such as DialogConstants.TYPE_ROOT
it may not be a regular
widget.Copyright © 2001–2016 mmm-Team. All rights reserved.