com.actionbarsherlock.internal.view.menu
Class SubMenuWrapper

java.lang.Object
  extended by com.actionbarsherlock.internal.view.menu.MenuWrapper
      extended by com.actionbarsherlock.internal.view.menu.SubMenuWrapper
All Implemented Interfaces:
Menu, SubMenu

public class SubMenuWrapper
extends MenuWrapper
implements SubMenu


Field Summary
 
Fields inherited from interface com.actionbarsherlock.view.Menu
CATEGORY_ALTERNATIVE, CATEGORY_CONTAINER, CATEGORY_MASK, CATEGORY_SECONDARY, CATEGORY_SHIFT, CATEGORY_SYSTEM, FIRST, FLAG_ALWAYS_PERFORM_CLOSE, FLAG_APPEND_TO_GROUP, FLAG_PERFORM_NO_CLOSE, NONE, USER_MASK, USER_SHIFT
 
Constructor Summary
SubMenuWrapper(android.view.SubMenu nativeSubMenu)
           
 
Method Summary
 void clearHeader()
          Clears the header of the submenu.
 MenuItem getItem()
          Gets the MenuItem that represents this submenu in the parent menu.
 SubMenu setHeaderIcon(android.graphics.drawable.Drawable icon)
          Sets the submenu header's icon to the icon given in icon Drawable.
 SubMenu setHeaderIcon(int iconRes)
          Sets the submenu header's icon to the icon given in iconRes resource id.
 SubMenu setHeaderTitle(CharSequence title)
          Sets the submenu header's title to the title given in title.
 SubMenu setHeaderTitle(int titleRes)
          Sets the submenu header's title to the title given in titleRes resource identifier.
 SubMenu setHeaderView(android.view.View view)
          Sets the header of the submenu to the View given in view.
 SubMenu setIcon(android.graphics.drawable.Drawable icon)
          Change the icon associated with this submenu's item in its parent menu.
 SubMenu setIcon(int iconRes)
          Change the icon associated with this submenu's item in its parent menu.
 
Methods inherited from class com.actionbarsherlock.internal.view.menu.MenuWrapper
add, add, add, add, addIntentOptions, addSubMenu, addSubMenu, addSubMenu, addSubMenu, clear, close, findItem, findItem, getItem, hasVisibleItems, invalidate, isShortcutKey, performIdentifierAction, performShortcut, removeGroup, removeItem, setGroupCheckable, setGroupEnabled, setGroupVisible, setQwertyMode, size, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.actionbarsherlock.view.Menu
add, add, add, add, addIntentOptions, addSubMenu, addSubMenu, addSubMenu, addSubMenu, clear, close, findItem, getItem, hasVisibleItems, isShortcutKey, performIdentifierAction, performShortcut, removeGroup, removeItem, setGroupCheckable, setGroupEnabled, setGroupVisible, setQwertyMode, size
 

Constructor Detail

SubMenuWrapper

public SubMenuWrapper(android.view.SubMenu nativeSubMenu)
Method Detail

setHeaderTitle

public SubMenu setHeaderTitle(int titleRes)
Description copied from interface: SubMenu
Sets the submenu header's title to the title given in titleRes resource identifier.

Specified by:
setHeaderTitle in interface SubMenu
Parameters:
titleRes - The string resource identifier used for the title.
Returns:
This SubMenu so additional setters can be called.

setHeaderTitle

public SubMenu setHeaderTitle(CharSequence title)
Description copied from interface: SubMenu
Sets the submenu header's title to the title given in title.

Specified by:
setHeaderTitle in interface SubMenu
Parameters:
title - The character sequence used for the title.
Returns:
This SubMenu so additional setters can be called.

setHeaderIcon

public SubMenu setHeaderIcon(int iconRes)
Description copied from interface: SubMenu
Sets the submenu header's icon to the icon given in iconRes resource id.

Specified by:
setHeaderIcon in interface SubMenu
Parameters:
iconRes - The resource identifier used for the icon.
Returns:
This SubMenu so additional setters can be called.

setHeaderIcon

public SubMenu setHeaderIcon(android.graphics.drawable.Drawable icon)
Description copied from interface: SubMenu
Sets the submenu header's icon to the icon given in icon Drawable.

Specified by:
setHeaderIcon in interface SubMenu
Parameters:
icon - The Drawable used for the icon.
Returns:
This SubMenu so additional setters can be called.

setHeaderView

public SubMenu setHeaderView(android.view.View view)
Description copied from interface: SubMenu
Sets the header of the submenu to the View given in view. This replaces the header title and icon (and those replace this).

Specified by:
setHeaderView in interface SubMenu
Parameters:
view - The View used for the header.
Returns:
This SubMenu so additional setters can be called.

clearHeader

public void clearHeader()
Description copied from interface: SubMenu
Clears the header of the submenu.

Specified by:
clearHeader in interface SubMenu

setIcon

public SubMenu setIcon(int iconRes)
Description copied from interface: SubMenu
Change the icon associated with this submenu's item in its parent menu.

Specified by:
setIcon in interface SubMenu
Parameters:
iconRes - The new icon (as a resource ID) to be displayed.
Returns:
This SubMenu so additional setters can be called.
See Also:
MenuItem.setIcon(int)

setIcon

public SubMenu setIcon(android.graphics.drawable.Drawable icon)
Description copied from interface: SubMenu
Change the icon associated with this submenu's item in its parent menu.

Specified by:
setIcon in interface SubMenu
Parameters:
icon - The new icon (as a Drawable) to be displayed.
Returns:
This SubMenu so additional setters can be called.
See Also:
MenuItem.setIcon(Drawable)

getItem

public MenuItem getItem()
Description copied from interface: SubMenu
Gets the MenuItem that represents this submenu in the parent menu. Use this for setting additional item attributes.

Specified by:
getItem in interface SubMenu
Returns:
The MenuItem that launches the submenu when invoked.


Copyright © 2012-2013. All Rights Reserved.