Spiffy UI Framework

org.spiffyui.client.nav
Class NavSection

java.lang.Object
  extended by ComplexPanel
      extended by org.spiffyui.client.nav.NavSection
All Implemented Interfaces:
NavWidget

public class NavSection
extends ComplexPanel
implements NavWidget

This widget represents a single section that contains multiple items in the navigation menu.


Constructor Summary
NavSection(java.lang.String id, java.lang.String displayName)
          Creates a new section in the navigation bar
 
Method Summary
 void add(Widget w)
           
 java.lang.String getDisplayName()
          Gets the display name of this section
 NavItem getNavItem(Anchor a)
          Returns the NavItem that owns the specified Anchor
 java.lang.String getTitle()
           
protected  void setNavBar(MainNavBar bar)
          Set the navigation bar reference so the navigation bar can add listeners to the anchors in this section
 void setTitle(java.lang.String title)
           
protected  void updateSelectedState(Anchor a)
          Updates the selection state to mark the specified anchor selected and the rest unselected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavSection

public NavSection(java.lang.String id,
                  java.lang.String displayName)
Creates a new section in the navigation bar

Parameters:
id - the id for the section
displayName - the display name for that section
Method Detail

setTitle

public void setTitle(java.lang.String title)

getTitle

public java.lang.String getTitle()

add

public void add(Widget w)

getDisplayName

public java.lang.String getDisplayName()
Gets the display name of this section

Returns:
the display name

setNavBar

protected void setNavBar(MainNavBar bar)
Set the navigation bar reference so the navigation bar can add listeners to the anchors in this section

Parameters:
bar - the navigation bar

updateSelectedState

protected void updateSelectedState(Anchor a)
Updates the selection state to mark the specified anchor selected and the rest unselected

Parameters:
a - the anchor to select

getNavItem

public NavItem getNavItem(Anchor a)
Returns the NavItem that owns the specified Anchor

Parameters:
a - - the Anchor of interest
Returns:
the NavItem that the Anchor is a part of

Spiffy UI Framework