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

ExtKit.BuildPopupMenuAction (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor.ext
Class ExtKit.BuildPopupMenuAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by javax.swing.text.TextAction
          extended by org.netbeans.editor.BaseAction
              extended by org.netbeans.editor.ext.ExtKit.BuildPopupMenuAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Enclosing class:
ExtKit

public static class ExtKit.BuildPopupMenuAction
extends BaseAction

Called before the popup menu is shown to possibly rebuild the popup menu.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.netbeans.editor.BaseAction
ABBREV_RESET, CLEAR_STATUS_TEXT, ICON_RESOURCE_PROPERTY, LOCALE_DESC_PREFIX, LOCALE_POPUP_PREFIX, MAGIC_POSITION_RESET, NO_KEYBINDING, NO_RECORDING, POPUP_MENU_TEXT, SAVE_POSITION, SELECTION_REMOVE, UNDO_MERGE_RESET, updateMask, WORD_MATCH_RESET
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ExtKit.BuildPopupMenuAction()
           
 
Method Summary
 void actionPerformed(ActionEvent evt, JTextComponent target)
          The target method that performs the real action functionality.
protected  void addAction(JTextComponent target, JPopupMenu popupMenu, String actionName)
          Add the action to the popup menu.
protected  JPopupMenu buildPopupMenu(JTextComponent target)
           
protected  JPopupMenu createPopupMenu(JTextComponent target)
           
protected  void debugPopupMenuItem(JMenuItem item, Action action)
           
protected  String getItemText(JTextComponent target, String actionName, Action a)
           
 
Methods inherited from class org.netbeans.editor.BaseAction
actionPerformed, asynchonous, createDefaultValue, findValue, getDefaultShortDescription, getPopupMenuItem, getPopupMenuText, getValue, settingsChange, updateComponent, updateComponent
 
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtKit.BuildPopupMenuAction

public ExtKit.BuildPopupMenuAction()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent evt,
                            JTextComponent target)
Description copied from class: BaseAction
The target method that performs the real action functionality.

Specified by:
actionPerformed in class BaseAction
Parameters:
evt - action event describing the action that occured
target - target component where the action occured. It's retrieved by the TextAction.getTextComponent(evt).

createPopupMenu

protected JPopupMenu createPopupMenu(JTextComponent target)

buildPopupMenu

protected JPopupMenu buildPopupMenu(JTextComponent target)

addAction

protected void addAction(JTextComponent target,
                         JPopupMenu popupMenu,
                         String actionName)
Add the action to the popup menu. This method is called for each action-name found in the action-name-list. It should add the appopriate menu item to the popup menu.

Parameters:
target - target component for which the menu is being constructed.
popupMenu - popup menu to which this method should add the item corresponding to the action-name.
actionName - name of the action to add. The real action can be retrieved from the kit by calling getActionByName().

debugPopupMenuItem

protected final void debugPopupMenuItem(JMenuItem item,
                                        Action action)

getItemText

protected String getItemText(JTextComponent target,
                             String actionName,
                             Action a)

org.netbeans.modules.editor.lib/1 1.14.0 3

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