Overview | Module | Use | Devguide | Index

Methods' Summary | Methods' Details | Attributes' Summary | Attributes' Details

:: com :: sun :: star :: awt ::
interface XMenu
  Base Hierarchy
      ::com::sun::star::uno::XInterface
       |
       +-XMenu
Description specifies a simple menu.

Methods' Summary
addMenuListener | adds the specified menu listener to receive events from this menu.
removeMenuListener | removes the specified menu listener so that it no longer receives events from this menu.
insertItem | inserts an item into the menu.
removeItem | removes one or more items from the menu.
getItemCount | returns the number of items in the menu.
getItemId | returns the id of the item at the specified position.
getItemPos | returns the position of the item with the specified id.
enableItem | enables or disables the menu item.
isItemEnabled | returns the state of the menu item.
setItemText | sets the text for the menu item.
getItemText | returns the string for the given item id.
setPopupMenu | sets the popup menu for a specified menu item.
getPopupMenu | returns the popup menu from the menu item.

Methods' Details
addMenuListener
[oneway] void addMenuListener( | [in] XMenuListener | xListener );
Description adds the specified menu listener to receive events from this menu.
removeMenuListener
[oneway] void removeMenuListener( | [in] XMenuListener | xListener );
Description removes the specified menu listener so that it no longer receives events from this menu.
insertItem
[oneway] void insertItem( | [in] short [in] string [in] short [in] short | nItemId, aText, nItemStyle, nPos );
Description inserts an item into the menu. The item is appended if the position is greater than or equal to `getItemCount()` or if it is negative.
removeItem
[oneway] void removeItem( | [in] short [in] short | nPos, nCount );
Description removes one or more items from the menu.
getItemCount
short getItemCount(); |  |
Description returns the number of items in the menu.
getItemId
short getItemId( | [in] short | nPos );
Description returns the id of the item at the specified position.
getItemPos
short getItemPos( | [in] short | nId );
Description returns the position of the item with the specified id.
enableItem
[oneway] void enableItem( | [in] short [in] boolean | nItemId, bEnable );
Description enables or disables the menu item.
isItemEnabled
boolean isItemEnabled( | [in] short | nItemId );
Description returns the state of the menu item.
setItemText
[oneway] void setItemText( | [in] short [in] string | nItemId, aText );
Description sets the text for the menu item.
getItemText
string getItemText( | [in] short | nItemId );
Description returns the string for the given item id.
setPopupMenu
[oneway] void setPopupMenu( | [in] short [in] XPopupMenu | nItemId, aPopupMenu );
Description sets the popup menu for a specified menu item.
getPopupMenu
XPopupMenu getPopupMenu( | [in] short | nItemId );
Description returns the popup menu from the menu item.

Top of Page

Copyright © 2003 Sun Microsystems, Inc.