Module io.github.mmm.ui.api.window
Class AbstractUiNotifier
- java.lang.Object
-
- io.github.mmm.ui.api.window.notiy.AbstractUiNotifier
-
- All Implemented Interfaces:
UiNotifier
,UiPopupNotifier
public abstract class AbstractUiNotifier extends Object implements UiPopupNotifier
Abstract base implementation ofUiPopupNotifier
.
-
-
Constructor Summary
Constructors Constructor Description AbstractUiNotifier()
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description UiPopup
createPopup(UiNotification notification, UiAction... actions)
This method creates apopup window
with the givenmessage
.void
event(String message, String title)
Iterable<UiNotification>
getHistory()
void
show(UiNotification notification)
abstract void
showGrowl(UiNotification notification)
-
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.notify.UiNotifier
show, showInfo
-
Methods inherited from interface io.github.mmm.ui.api.window.notiy.UiPopupNotifier
createPopupOk, createPopupOk, createPopupYesNo, showPopup, showPopupOk, showPopupOk, showPopupYesNo
-
-
-
-
Method Detail
-
getHistory
public Iterable<UiNotification> getHistory()
- Specified by:
getHistory
in interfaceUiNotifier
- Specified by:
getHistory
in interfaceUiPopupNotifier
- Returns:
- the history of the notifications collected by this
UiNotifier
. It may be only a queue with the last N number ofUiNotification
s to avoid memory leaks.
-
event
public void event(String message, String title)
- Specified by:
event
in interfaceUiNotifier
-
show
public void show(UiNotification notification)
- Specified by:
show
in interfaceUiNotifier
-
showGrowl
public abstract void showGrowl(UiNotification notification)
- Parameters:
notification
- theUiNotification
to show as growl message box. Such growl box will typically appear at the bottom right and automatically fade out after some time.
-
createPopup
public UiPopup createPopup(UiNotification notification, UiAction... actions)
Description copied from interface:UiPopupNotifier
This method creates apopup window
with the givenmessage
. It is the most generic and flexible but also the most inconvenientshowPopup
method variant.- Specified by:
createPopup
in interfaceUiPopupNotifier
- Parameters:
notification
- theUiNotification
to show.actions
- are theUiAction
s for the buttons to close (answer, confirm, or cancel) the popup. Has to be at least oneUiAction
.- Returns:
- the
UiPopup
.
-
-