package com.smartdevicelink.proxy.rpc; import com.smartdevicelink.proxy.RPCStruct; import java.util.Hashtable; /** * Used when adding a sub menu to an application menu or existing sub menu. *

Parameter List

* * * * * * * * * * * * * * * * * * * * * * * * * *
NameTypeDescriptionSmartDeviceLink Ver. Available
parentIDIntegerThe unique ID of an existing submenu to which a command will be added. * If this element is not provided, the command will be added to the top level of the Command Menu. *
    *
  • Min: 0
  • *
  • Max: 2000000000
  • *
*
SmartDeviceLink 1.0
positionIntegerPosition within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. * Position of any submenu will always be located before the return and exit options. *
    *
  • Min Value: 0
  • *
  • Max Value: 1000
  • *
  • If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.
  • *
  • If this element is omitted, the entry will be added at the end of the parent menu.
  • *
*
SmartDeviceLink 1.0
menuNameStringText which appears in menu, representing this command. *
    *
  • Min: 1
  • *
  • Max: 100
  • *
*
SmartDeviceLink 1.0
* @since SmartDeviceLink 1.0 * @see AddCommand * @see AddSubMenu */ public class MenuParams extends RPCStruct { public static final String KEY_PARENT_ID = "parentID"; public static final String KEY_POSITION = "position"; public static final String KEY_MENU_NAME = "menuName"; /** * Constructs a newly allocated MenuParams object */ public MenuParams() { } /** * Constructs a newly allocated MenuParams object indicated by the Hashtable parameter * @param hash The Hashtable to use */ public MenuParams(Hashtable hash) { super(hash); } /** * Get the unique ID of an existing submenu to which a command will be added. * If this element is not provided, the command will be added to the top level of the Command Menu. * @return parentID Min: 0 Max: 2000000000 */ public Integer getParentID() { return getInteger( KEY_PARENT_ID ); } /** * Set the unique ID of an existing submenu to which a command will be added. * If this element is not provided, the command will be added to the top level of the Command Menu. * @param parentID Min: 0; Max: 2000000000 */ public void setParentID( Integer parentID ) { setValue(KEY_PARENT_ID, parentID); } /** * Get the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. * Position of any submenu will always be located before the return and exit options. * * @return the position within the items of the parent Command Menu */ public Integer getPosition() { return getInteger( KEY_POSITION ); } /** * Set the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. * Position of any submenu will always be located before the return and exit options. * * @param position Mix: 0 Max: 1000 */ public void setPosition( Integer position ) { setValue(KEY_POSITION, position); } /** * Get the text which appears in menu, representing this command. * * @return menuName the menu name */ public String getMenuName() { return getString( KEY_MENU_NAME ); } /** * Set text which appears in menu, representing this command. * * @param menuName the menu name */ public void setMenuName( String menuName ) { setValue(KEY_MENU_NAME, menuName); } }