org.spiffyui.client.nav
Class HasNavBarListenersPanel

java.lang.Object
  extended by FlowPanel
      extended by org.spiffyui.client.nav.HasNavBarListenersPanel
Direct Known Subclasses:
MainHeader, MainNavBar

public class HasNavBarListenersPanel
extends FlowPanel

This is a FlowPanel that calls events by listeners listening for changes in navigation such as MainNavBar or logout on MainHeader.


Constructor Summary
HasNavBarListenersPanel()
           
 
Method Summary
 void addListener(NavBarListener listener)
          Adds a NavBarListener to this navigation bar
 void fireEvent(NavItem item)
          Fires the click event on the specified nav item
protected  void fireEvent(NavItem item, boolean addToHistory)
          Fires the click event on the specified nav item
 boolean firePreEvent(NavItem item)
          Notifies listeners of a request to select an item, giving listeners a change to cancel the event
 boolean isEnabled()
           
 void removeListener(NavBarListener listener)
          Removes a NavBarListener from this navigation bar.
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HasNavBarListenersPanel

public HasNavBarListenersPanel()
Method Detail

isEnabled

public boolean isEnabled()
Returns:
Returns the enabled.

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - The enabled to set.

firePreEvent

public boolean firePreEvent(NavItem item)
Notifies listeners of a request to select an item, giving listeners a change to cancel the event

Parameters:
item - the nav item that was clicked
Returns:
boolean true to continue, false to cancel

fireEvent

public void fireEvent(NavItem item)
Fires the click event on the specified nav item

Parameters:
item - the nav item that was clicked

fireEvent

protected void fireEvent(NavItem item,
                         boolean addToHistory)
Fires the click event on the specified nav item

Parameters:
item - the nav item that was clicked
addToHistory - true if this item should be added to the browser history and false otherwise

addListener

public void addListener(NavBarListener listener)
Adds a NavBarListener to this navigation bar

Parameters:
listener - the listener to add

removeListener

public void removeListener(NavBarListener listener)
Removes a NavBarListener from this navigation bar.

Parameters:
listener - the listener to remove