org.cruxframework.crux.widgets.client.stackmenu
Class StackMenu

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.cruxframework.crux.widgets.client.stackmenu.StackMenu
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasSelectionHandlers<StackMenuItem>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Filterable<StackMenuItem>

public class StackMenu
extends com.google.gwt.user.client.ui.Composite
implements Filterable<StackMenuItem>, com.google.gwt.event.logical.shared.HasSelectionHandlers<StackMenuItem>

A vertical hierarchical menu.

Author:
Gesse Dafe

Nested Class Summary
 
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 org.cruxframework.crux.widgets.client.filter.Filterable
Filterable.FilterResult<T>
 
Field Summary
static String DEFAULT_STYLE_NAME
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
StackMenu()
          Empty constructor
 
Method Summary
 void add(StackMenuItem item)
          Adds an item.
 com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<StackMenuItem> handler)
           
 void clear()
          Removes all items.
 List<Filterable.FilterResult<StackMenuItem>> filter(String query)
          Returns the fiterable's contents that match the query.
 List<StackMenuItem> getItems()
          Returns all items.
 void onSelectItem(StackMenuItem selectedItem)
          A chance for executing some logic when a item is selected after a filtering operation.
 void remove(StackMenuItem item)
          Removes an item.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, 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
 

Field Detail

DEFAULT_STYLE_NAME

public static final String DEFAULT_STYLE_NAME
See Also:
Constant Field Values
Constructor Detail

StackMenu

public StackMenu()
Empty constructor

Method Detail

add

public void add(StackMenuItem item)
Adds an item.

Parameters:
item -

remove

public void remove(StackMenuItem item)
Removes an item.

Parameters:
item -

clear

public void clear()
Removes all items.


getItems

public List<StackMenuItem> getItems()
Returns all items.


addSelectionHandler

public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<StackMenuItem> handler)
Specified by:
addSelectionHandler in interface com.google.gwt.event.logical.shared.HasSelectionHandlers<StackMenuItem>
See Also:
HasSelectionHandlers.addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler)

onSelectItem

public void onSelectItem(StackMenuItem selectedItem)
Description copied from interface: Filterable
A chance for executing some logic when a item is selected after a filtering operation.

Specified by:
onSelectItem in interface Filterable<StackMenuItem>
See Also:
Filterable.onSelectItem(java.lang.Object)

filter

public List<Filterable.FilterResult<StackMenuItem>> filter(String query)
Description copied from interface: Filterable
Returns the fiterable's contents that match the query.

Specified by:
filter in interface Filterable<StackMenuItem>
Returns:
See Also:
Filterable.filter(java.lang.String)


Copyright © 2014. All rights reserved.