|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.AbstractMenuManager oracle.ide.ContextMenu
ContextMenu
class. Use this class to menu items to context
menus such as the navigator, log window, and/or code editor context menus.
Field Summary |
Fields inherited from class oracle.ide.AbstractMenuManager |
containerListener, menuListener |
Fields inherited from interface oracle.ide.MenuManager |
ALPHA_SORT_SECTION_KEY, LAST_POSITION |
Constructor Summary | |
ContextMenu()
Default constructor. |
|
ContextMenu(MnemonicSolver solver)
Constructor. |
Method Summary | |
void |
add(java.awt.Component child)
Appends a component into the MenuManager's GUI. |
void |
add(java.awt.Component child,
boolean fixed)
Add the specified child to the end of this context menu. |
void |
add(java.awt.Component child,
float sectionId)
Add the specified child to the end of this context menu. |
void |
add(java.awt.Component child,
float sectionId,
boolean fixed)
Add the specified child to the end of this context menu. |
void |
addContextMenuListener(ContextMenuListener l)
Adds a context menu listener. |
void |
addContextMenuListener(ContextMenuListener l,
java.lang.Class cls)
Adds a ContextMenuListener that is called when the type
of the data represented by the current Context is
assignable to a variable whose type is of the specified
Class . |
void |
addSeparator()
Adds a Menu separator to the context menu. |
boolean |
fireDefaultAction(Context context)
Invoke this method to fire the deault action associated with this context menu. |
Context |
getContext()
Geth the current context. |
java.awt.Container |
getGUI(boolean create)
Creates the actual popup menu. |
int |
getMenuCount()
Returns the number of elements in the menu. |
MnemonicSolver |
getMnemonicSolver()
Get the menu item mnemonic solver. |
void |
removeAll()
Removes all menu items from the popup menu. |
void |
removeContextMenuListener(ContextMenuListener l)
Removes a context menu listener. |
void |
show(Context context)
Shows the popup menu. |
Methods inherited from class oracle.ide.AbstractMenuManager |
add, add, componentAdded, componentRemoved, createMenu, createMenu, createMenu, createMenu, createMenuItem, createMenuItem, createSubMenu, createSubMenu, createSubMenu, getChildById, getIndexOfChild, getIndexOfCommandId, insert, insert, menuCanceled, menuDeselected, menuSelected, remove, remove, setErrorWeight, sortContainer, sortSectionByName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ContextMenu()
public ContextMenu(MnemonicSolver solver)
solver
- an instance of the MnemonicSolver
class. This
instance will be used to resolve mnemonic conflicts between context
menu items.Method Detail |
public void add(java.awt.Component child)
MenuManager
add
in interface MenuManager
add
in class AbstractMenuManager
public void add(java.awt.Component child, boolean fixed)
child
to the end of this context menu.
child
- menu item to add.fixed
- indicates that the mnemonics used by the specified child
should be respected by any active MnemonicSolver
.public void add(java.awt.Component child, float sectionId)
child
to the end of this context menu.
add
in interface MenuManager
add
in class AbstractMenuManager
child
- menu item to add.sectionId
- floating point number used to group commands by section.
Each section is automatically surrounded with JSeparators.public void add(java.awt.Component child, float sectionId, boolean fixed)
child
to the end of this context menu.
child
- menu item to add.sectionId
- floating point number used to group commands by section.
Each section is automatically surrounded with JSeparators.fixed
- indicates that the mnemonics used by the specified child
should be respected by any active MnemonicSolver
.public void addContextMenuListener(ContextMenuListener l)
l
- the context menu listener.public void addContextMenuListener(ContextMenuListener l, java.lang.Class cls)
ContextMenuListener
that is called when the type
of the data represented by the current Context
is
assignable to a variable whose type is of the specified
Class
.
l
- the ContextMenuListener
to add.cls
- if non-null, the ContextMenuListener
will only
be notified if the current Context
's data object type
is assignable to a variable whose type is of the specified
Class
.public void removeContextMenuListener(ContextMenuListener l)
l
- the context menu listener.public java.awt.Container getGUI(boolean create)
create
- force a creation of the GUI if it does not yet exist.
public int getMenuCount()
public void removeAll()
public final void show(Context context)
context
- the current context. context
cannot be null
and the context's event object must be a MouseEvent.public final Context getContext()
public void addSeparator()
public boolean fireDefaultAction(Context context)
context
- The current context.public MnemonicSolver getMnemonicSolver()
null
if none available.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.