org.kuali.student.common.ui.client.widgets.menus
Class KSMenuItemData

java.lang.Object
  extended by org.kuali.student.common.ui.client.widgets.menus.KSMenuItemData

public class KSMenuItemData
extends Object

The data object used to populate interactive ui menus.

Author:
Kuali Student Team

Constructor Summary
KSMenuItemData(String label)
           
KSMenuItemData(String label, com.google.gwt.event.dom.client.ClickHandler clickHandler)
           
KSMenuItemData(String label, com.google.gwt.user.client.ui.Image icon, com.google.gwt.event.dom.client.ClickHandler clickHandler)
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addMenuEventHandler(com.google.gwt.event.shared.GwtEvent.Type type, MenuEventHandler meh)
           
 void addSpecialStyle(String style)
           
 void addSubItem(KSMenuItemData item)
          Adds a KSMenuItemData to the list of children for this menu "category".
 com.google.gwt.event.dom.client.ClickHandler getClickHandler()
          Get the ClickHandler for this menu item.
 String getLabel()
          Get the text used for this menu item
 KSMenuItemData getParent()
          Gets the parent of this KSMenuItemData
 com.google.gwt.user.client.ui.Image getShownIcon()
           
 String getSpecialStyle()
           
 List<KSMenuItemData> getSubItems()
          Gets the list of sub items (children) in this KSMenuItemData
 boolean isSelected()
           
 void setClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler)
          Set the click handler for this menu item (what the menu item does when selected).
 void setLabel(String label)
          Set the label to be used in the menu for this menu item
 void setParent(KSMenuItemData parent)
          Set the parent of this KSMenuItemData
 void setSelected(boolean selected)
           
 void setSelected(boolean selected, boolean fireClick)
           
 void setShownIcon(com.google.gwt.user.client.ui.Image shownIcon)
           
 void unhandledSetSelected(boolean selected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KSMenuItemData

public KSMenuItemData(String label)

KSMenuItemData

public KSMenuItemData(String label,
                      com.google.gwt.event.dom.client.ClickHandler clickHandler)

KSMenuItemData

public KSMenuItemData(String label,
                      com.google.gwt.user.client.ui.Image icon,
                      com.google.gwt.event.dom.client.ClickHandler clickHandler)
Method Detail

getLabel

public String getLabel()
Get the text used for this menu item

Returns:
the "label" for this menu item

setLabel

public void setLabel(String label)
Set the label to be used in the menu for this menu item

Parameters:
label - the "label" of this menu item

getClickHandler

public com.google.gwt.event.dom.client.ClickHandler getClickHandler()
Get the ClickHandler for this menu item.

Returns:
ClickHandler which controls what this menu item does when selected

setClickHandler

public void setClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler)
Set the click handler for this menu item (what the menu item does when selected).

Parameters:
clickHandler - a ClickHandler for this menu item.

addSubItem

public void addSubItem(KSMenuItemData item)
Adds a KSMenuItemData to the list of children for this menu "category".

Parameters:
item - a KSMenuItemData that is a child of this KSMenuItemData

getSubItems

public List<KSMenuItemData> getSubItems()
Gets the list of sub items (children) in this KSMenuItemData

Returns:
the list of sub items in this KSMenuItemData

setParent

public void setParent(KSMenuItemData parent)
Set the parent of this KSMenuItemData

Parameters:
parent - the KSMenuItemData which is the parent KSMenuItemData (category)

getParent

public KSMenuItemData getParent()
Gets the parent of this KSMenuItemData

Returns:
the paren of this KSMenuItemData

isSelected

public boolean isSelected()

setSelected

public void setSelected(boolean selected)

setSelected

public void setSelected(boolean selected,
                        boolean fireClick)

unhandledSetSelected

public void unhandledSetSelected(boolean selected)

getShownIcon

public com.google.gwt.user.client.ui.Image getShownIcon()

setShownIcon

public void setShownIcon(com.google.gwt.user.client.ui.Image shownIcon)

addMenuEventHandler

public com.google.gwt.event.shared.HandlerRegistration addMenuEventHandler(com.google.gwt.event.shared.GwtEvent.Type type,
                                                                           MenuEventHandler meh)

addSpecialStyle

public void addSpecialStyle(String style)

getSpecialStyle

public String getSpecialStyle()


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.