Package de.esoco.process.ui.app
Klasse UiNavMenu<T>
java.lang.Object
org.obrel.core.RelatedObject
de.esoco.process.param.ParameterWrapper<List<org.obrel.core.RelationType<?>>,UiNavMenu<T>>
de.esoco.process.ui.UiComponent<List<org.obrel.core.RelationType<?>>,UiNavMenu<T>>
- Alle implementierten Schnittstellen:
org.obrel.core.Relatable
- Bekannte direkte Unterklassen:
UiSideMenu
,UiTopMenu
A composite that contains a navigation menu for an application.
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
Enumeration of the different menu types.Von Klasse geerbte verschachtelte Klassen/Schnittstellen de.esoco.process.ui.UiContainer
UiContainer.UiContainerFragment
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
UiNavMenu
(UiContainer<?> parent) Creates a new instance without preset menu items.protected
UiNavMenu
(UiContainer<?> parent, Collection<T> menuItems) Creates a new instance with preset menu items. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
addMenuComponents
(UiBuilder<?> builder) Adds components to this menu that should appear before the the menu items which are added later withaddMenuItems(UiBuilder)
.protected <E extends Enum<E>>
voidaddMenuItems
(UiBuilder<?> builder) Adds the menu item components of this menu.protected UiTextField
addSearchField
(UiBuilder<?> builder, String placeholder, Consumer<String> searchHandler) Adds a search input field with the given builder (which should be a builder from this menu).protected void
buildContent
(UiBuilder<?> builder) Builds this menu by first invokingaddMenuComponents(UiBuilder)
and then adds the menu items if such are available.final Collection
<T> Returns the menu items of this instance.final UiPushButtons
<?> Returns the component containing the menu link buttons.protected void
handleItemSelection
(Object item) Handles the selection of a menu item by forwarding it to an event handler registered throughonMenuSelection(Consumer)
.void
onMenuSelection
(Consumer<T> handler) Sets the handler for menu actions.void
Marks a certain menu item as active.void
setMenuItems
(Collection<T> menuItems) Sets the menu items to be displayed.void
setSearchText
(String text) Sets the text to be displayed in the search field (if such exists) or hides the field if the text is NULL.Von Klasse geerbte Methoden de.esoco.process.ui.UiContainer
applyProperties, attachTo, builder, clear, componentAdded, componentListChanged, getComponents, getLayout, isBuilt, onClickInContainerArea, remove, toString
Von Klasse geerbte Methoden de.esoco.process.ui.UiComponent
cell, cell, getComponentStyleName, getImage, getParent, getRootView, getValueImpl, getView, height, icon, image, label, placeBefore, resid, setValueImpl, size, style, style, styleName, tooltip, update, visibleOn, width
Von Klasse geerbte Methoden de.esoco.process.param.ParameterWrapper
clear, disable, enable, fragment, get, getParam, has, hide, id, initiateDownload, isEnabled, isVisible, remove, set, set, set, setEnabled, setFragment, setParam, setParameterEventHandler, setParameterType, setVisible, show, type
Von Klasse geerbte Methoden org.obrel.core.RelatedObject
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, transform, writeRelations
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.obrel.core.Relatable
deleteRelation, deleteRelations, getAll, getOption, getRelationCount, getRelations, hasFlag, hasRelation, hasRelations, init, set, set, set, setOption, streamRelations
-
Konstruktordetails
-
UiNavMenu
Creates a new instance without preset menu items.- Parameter:
parent
- The parent container
-
UiNavMenu
Creates a new instance with preset menu items.- Parameter:
parent
- The parent containermenuItems
- The initial menu items
-
-
Methodendetails
-
getMenuItems
Returns the menu items of this instance.- Gibt zurück:
- The collection of menu item enum values
-
getMenuLinks
Returns the component containing the menu link buttons.- Gibt zurück:
- The menu links parameter
-
onMenuSelection
Sets the handler for menu actions. This will override any previously set menu selection handler.- Parameter:
handler
- The handler to be invoked on menu selection
-
setActive
Marks a certain menu item as active.- Parameter:
menuItem
- The new active item or NULL for none
-
setMenuItems
Sets the menu items to be displayed.- Parameter:
menuItems
- The new menu items (NULL or empty for none)
-
setSearchText
Sets the text to be displayed in the search field (if such exists) or hides the field if the text is NULL.- Parameter:
text
- The search text to show (NULL to hide the search field)
-
addMenuComponents
Adds components to this menu that should appear before the the menu items which are added later withaddMenuItems(UiBuilder)
. Can be overridden by subclasses to add additional components like a logo image and/or a search field.- Parameter:
builder
- The builder to add the menu components with
-
addMenuItems
Adds the menu item components of this menu. May be overridden by subclasses to modify or extend the menu presentation. The default implementation adds menu buttons for each menu item value.- Parameter:
builder
- The builder to add the menu items with
-
addSearchField
protected UiTextField addSearchField(UiBuilder<?> builder, String placeholder, Consumer<String> searchHandler) Adds a search input field with the given builder (which should be a builder from this menu).- Parameter:
builder
- The builder to add the field withplaceholder
- The text to be displayed if the field is emptysearchHandler
- handler The handler to be invoked with the input value if a search is to be performed- Gibt zurück:
- The search input field component
-
buildContent
Builds this menu by first invokingaddMenuComponents(UiBuilder)
and then adds the menu items if such are available.- Setzt außer Kraft:
buildContent
in KlasseUiContainer<UiNavMenu<T>>
- Parameter:
builder
- The builder to create the container UI with- Siehe auch:
-
handleItemSelection
Handles the selection of a menu item by forwarding it to an event handler registered throughonMenuSelection(Consumer)
.- Parameter:
item
- The selected menu item
-