站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.0

Actions.SubMenuModel (NetBeans UI Utilities API) - NetBeans API Javadoc 5.5.0

org.openide.awt 6.7.22

org.openide.awt
Interface Actions.SubMenuModel

Enclosing class:
Actions

public static interface Actions.SubMenuModel

Interface for the creating Actions.SubMenu. It provides the methods for all items in submenu: name shortcut and perform method. Also has methods for notification of changes of the model.


Method Summary
 void addChangeListener(ChangeListener l)
          Adds change listener for changes of the model.
 int getCount()
           
 HelpCtx getHelpCtx(int index)
          Get context help for the specified item.
 String getLabel(int index)
          Gets label for specific index
 void performActionAt(int index)
          Perform the action on the specific index
 void removeChangeListener(ChangeListener l)
          Removes change listener for changes of the model.
 

Method Detail

getCount

int getCount()
Returns:
count of the submenu items.

getLabel

String getLabel(int index)
Gets label for specific index

Parameters:
index - of the submenu item
Returns:
label for this menu item (or null for a separator)

getHelpCtx

HelpCtx getHelpCtx(int index)
Get context help for the specified item. This can be used to associate help with individual items. You may return null to just use the context help for the associated system action (if any). Note that only help IDs will work, not URLs.

Returns:
the context help, or null

performActionAt

void performActionAt(int index)
Perform the action on the specific index

Parameters:
index - of the submenu item which should be performed

addChangeListener

void addChangeListener(ChangeListener l)
Adds change listener for changes of the model.


removeChangeListener

void removeChangeListener(ChangeListener l)
Removes change listener for changes of the model.


org.openide.awt 6.7.22

Built on May 28 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.