org.araneaframework.uilib.core
Class BaseMenuWidget
java.lang.Object
org.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
org.araneaframework.framework.container.StandardFlowContainerWidget
org.araneaframework.framework.container.ExceptionHandlingFlowContainerWidget
org.araneaframework.uilib.core.BaseMenuWidget
- All Implemented Interfaces:
- ApplicationComponent, ApplicationService, ApplicationWidget, Component, Composite, Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, FlowContext, FlowContextWidget, MenuContext, Serializable, Service, Viewable, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget, Widget
- public abstract class BaseMenuWidget
- extends ExceptionHandlingFlowContainerWidget
- implements MenuContext
The base implementation of the menu context that handles a menu. All custom
menu contexts should extend it, and describe the menu structure in
buildMenu().
- Author:
- Taimo Peelo (taimo@araneaframework.org)
- See Also:
- Serialized Form
|
Field Summary |
protected MenuItem |
menu
The container (a root) that holds the menu items. |
|
Constructor Summary |
BaseMenuWidget(Widget topWidget)
Constructor that initializes the menu widget and sets the
topWidget as its parent |
| Methods inherited from class org.araneaframework.framework.container.StandardFlowContainerWidget |
addFrameWidget, addNestedEnvironmentEntry, cancel, destroy, doCancel, doFinish, doReplace, doReset, doStart, doTransition, finish, getActiveCallFrame, getActiveFlow, getCallStack, getCurrentReference, getTransitionHandler, isNested, makeCallFrame, putLocalEnvironmentEntries, replace, replace, reset, setFinishable, setTop, setTransitionHandler, start, start, start |
| Methods inherited from class org.araneaframework.core.BaseApplicationWidget |
_getComposite, _getViewable, action, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, getActionId, getChildEnvironment, getChildren, getEnvironment, getEventId, getViewModel, getWidget, handleAction, handleEvent, handleUpdate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, setGlobalEventListener |
| Methods inherited from class org.araneaframework.core.BaseComponent |
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, disable, enable, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
menu
protected MenuItem menu
- The container (a root) that holds the menu items.
BaseMenuWidget
public BaseMenuWidget(Widget topWidget)
throws Exception
- Constructor that initializes the menu widget and sets the
topWidget as its parent
- Parameters:
topWidget - The parent widget.
- Throws:
Exception - Any non-specific runtime exception that may occur.
init
protected void init()
throws Exception
- Initializes the menu. Also marks it as not finishable (it means that this
widget does not inovke
FlowContext.finish() nor
FlowContext.cancel()).
- Overrides:
init in class ExceptionHandlingFlowContainerWidget
- Throws:
Exception - Any non-specific exception that may occur.
getChildWidgetEnvironment
protected Environment getChildWidgetEnvironment()
throws Exception
- Description copied from class:
BaseApplicationWidget
- Returns the widget's Environment by default. Usually overridden.
- Overrides:
getChildWidgetEnvironment in class StandardFlowContainerWidget
- Throws:
Exception
initMenuSelectorMountSupport
protected void initMenuSelectorMountSupport()
- Initializes the menu selector that works with bookmarks.
- Since:
- 1.1.1
selectMenuItem
public void selectMenuItem(String menuItemPath)
throws Exception
- Description copied from interface:
MenuContext
- Selects (activates) the requested menu item.
- Specified by:
selectMenuItem in interface MenuContext
- Parameters:
menuItemPath - The full path of the menu item.
- Throws:
Exception - Any non-specific exception that may occur.
buildMenu
protected abstract MenuItem buildMenu()
throws Exception
- Method that must be implemented to build the menu.
- Returns:
- built menu.
- Throws:
Exception - Any non-specific runtime exception that may occur.
getSelectionPath
public String getSelectionPath()
- Provides the
Path of the currently selected
menu item as a String.
- Returns:
- the path of the currently selected menu item, or
null - Since:
- 1.1.1
getMenu
public MenuItem getMenu()
- Description copied from interface:
MenuContext
- Provides access to the (full) menu.
- Specified by:
getMenu in interface MenuContext
- Returns:
- the menu.
setMenu
public void setMenu(MenuItem menu)
- Description copied from interface:
MenuContext
- Specifies the menu to use and show.
- Specified by:
setMenu in interface MenuContext
- Parameters:
menu - the new menu