Class JmixSideMenuWidget
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
io.jmix.ui.widget.client.verticalmenu.FocusableFlowPanel
io.jmix.ui.widget.client.verticalmenu.JmixSideMenuWidget
- All Implemented Interfaces:
com.google.gwt.event.dom.client.BlurHandler
,com.google.gwt.event.dom.client.FocusHandler
,com.google.gwt.event.dom.client.HasBlurHandlers
,com.google.gwt.event.dom.client.HasFocusHandlers
,com.google.gwt.event.dom.client.HasKeyDownHandlers
,com.google.gwt.event.dom.client.HasKeyPressHandlers
,com.google.gwt.event.dom.client.KeyDownHandler
,com.google.gwt.event.dom.client.KeyPressHandler
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasEnabled
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.InsertPanel
,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.vaadin.client.Focusable
,Iterable<com.google.gwt.user.client.ui.Widget>
public class JmixSideMenuWidget
extends FocusableFlowPanel
implements com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.event.dom.client.BlurHandler
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected boolean
protected boolean
protected JmixSideMenuWidget.MenuItemWidget
protected JmixSideMenuWidget.MenuItemWidget
boolean
boolean
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addItems
(elemental.json.JsonArray items, com.google.gwt.user.client.ui.HasWidgets container) void
buildMenu
(elemental.json.JsonArray itemsJson) protected List<JmixSideMenuWidget.MenuTreeNode>
buildVisibleTree
(com.google.gwt.user.client.ui.ComplexPanel container) protected JmixSideMenuWidget.MenuItemWidget
findNextMenuItem
(JmixSideMenuWidget.MenuItemWidget currentItem) protected JmixSideMenuWidget.MenuItemWidget
findPreviousMenuItem
(JmixSideMenuWidget.MenuItemWidget currentItem) getTooltip
(com.google.gwt.dom.client.Element element) protected boolean
handleNavigation
(int keyCode, boolean ctrl, boolean shift) boolean
protected void
menuTreeCollect
(JmixSideMenuWidget.MenuTreeNode element, List<JmixSideMenuWidget.MenuItemWidget> list) protected List<JmixSideMenuWidget.MenuItemWidget>
menuTreeToList
(List<JmixSideMenuWidget.MenuTreeNode> menuTree) void
onBlur
(com.google.gwt.event.dom.client.BlurEvent event) void
onBrowserEvent
(com.google.gwt.user.client.Event event) void
onFocus
(com.google.gwt.event.dom.client.FocusEvent event) protected void
void
onKeyDown
(com.google.gwt.event.dom.client.KeyDownEvent event) void
onKeyPress
(com.google.gwt.event.dom.client.KeyPressEvent event) protected void
void
selectItem
(String itemId) void
setEnabled
(boolean enabled) void
setFocusedItem
(JmixSideMenuWidget.MenuItemWidget focusedItem) void
setSelectedItem
(JmixSideMenuWidget.MenuItemWidget selectedItem) void
updateBadges
(Map<String, String> badgeUpdates) protected boolean
walkItems
(com.google.gwt.user.client.ui.ComplexPanel container, Function<JmixSideMenuWidget.MenuItemWidget, Boolean> walker) Methods inherited from class io.jmix.ui.widget.client.verticalmenu.FocusableFlowPanel
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, focus, setFocus
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, clear, insert, insert
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
CLASS_NAME
- See Also:
-
enabled
protected boolean enabled -
focused
protected boolean focused -
focusedItem
-
selectedItem
-
headerItemExpandHandler
-
selectOnTrigger
public boolean selectOnTrigger -
singleExpandedMenu
public boolean singleExpandedMenu
-
-
Constructor Details
-
JmixSideMenuWidget
public JmixSideMenuWidget()
-
-
Method Details
-
getFocusedItem
-
getSelectedItem
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event) - Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
-
onFocus
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event) - Specified by:
onFocus
in interfacecom.google.gwt.event.dom.client.FocusHandler
-
onBlur
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event) - Specified by:
onBlur
in interfacecom.google.gwt.event.dom.client.BlurHandler
-
onKeyDown
public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) - Specified by:
onKeyDown
in interfacecom.google.gwt.event.dom.client.KeyDownHandler
-
onKeyPress
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event) - Specified by:
onKeyPress
in interfacecom.google.gwt.event.dom.client.KeyPressHandler
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
buildMenu
public void buildMenu(elemental.json.JsonArray itemsJson) -
getTooltip
-
selectItem
-
updateBadges
-
addItems
protected void addItems(elemental.json.JsonArray items, com.google.gwt.user.client.ui.HasWidgets container) -
walkItems
protected boolean walkItems(com.google.gwt.user.client.ui.ComplexPanel container, Function<JmixSideMenuWidget.MenuItemWidget, Boolean> walker) -
buildVisibleTree
protected List<JmixSideMenuWidget.MenuTreeNode> buildVisibleTree(com.google.gwt.user.client.ui.ComplexPanel container)