org.spiffyui.client.nav
Class NavItem

java.lang.Object
  extended by Widget
      extended by org.spiffyui.client.nav.NavItem
All Implemented Interfaces:
NavWidget

public class NavItem
extends Widget
implements NavWidget

A NavItem represents a single item on the navigation menu


Constructor Summary
NavItem(java.lang.String id, java.lang.String displayName)
          Create a new NavItem
NavItem(java.lang.String id, java.lang.String displayName, java.lang.String title)
          Create a new NavItem
NavItem(java.lang.String id, java.lang.String displayName, java.lang.String title, java.lang.String link)
          Create a new NavItem
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Anchor getAnchor()
          Gets the anchor for this nav item
 java.lang.String getDisplayName()
          Gets the display name for this nav item
 java.lang.String getId()
          Retrieve the Id for the NavItem.
 int hashCode()
           
 void setAccessKey(char key)
          Set the access key for this menu item
 void setDisplayName(java.lang.String displayName)
          Set the display name for this nav item
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavItem

public NavItem(java.lang.String id,
               java.lang.String displayName)
Create a new NavItem

Parameters:
id - the id of the navigator item
displayName - the display name of the navigation item

NavItem

public NavItem(java.lang.String id,
               java.lang.String displayName,
               java.lang.String title)
Create a new NavItem

Parameters:
id - the id of the navigator item
displayName - the display name of the navigation item
title - the title or tooltip of this navigation item

NavItem

public NavItem(java.lang.String id,
               java.lang.String displayName,
               java.lang.String title,
               java.lang.String link)
Create a new NavItem

Parameters:
id - the id of the navigator item
displayName - the display name of the navigation item
title - the title or tooltip of this navigation item
link - the link location - this affects the location if the user right-mouse clicks and opens the link in a new tab
Method Detail

getId

public java.lang.String getId()
Retrieve the Id for the NavItem.

Returns:
The Id value for this instance

getAnchor

public Anchor getAnchor()
Gets the anchor for this nav item

Returns:
the anchor

getDisplayName

public java.lang.String getDisplayName()
Gets the display name for this nav item

Returns:
the display name

setDisplayName

public void setDisplayName(java.lang.String displayName)
Set the display name for this nav item

Parameters:
displayName - the new display name

setAccessKey

public void setAccessKey(char key)
Set the access key for this menu item

Parameters:
key - the key

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)