|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface allows the host application to customize the context menus in the viewer. The different context menus in the viewer (on the content pane or when selecting text) implement this interface to allow the host application to modify the menus.
| Method Summary | |
JMenuItem |
add(JMenuItem menuItem)
Appends the specified menu item to the end of this menu. |
void |
addPopupMenuListener(PopupMenuListener listener)
Adds a PopupMenuListener to the context menu. |
void |
addSeparator()
Appends a new separator at the end of the menu. |
Component |
getComponent(int index)
Returns the component at the specified index. |
int |
getComponentCount()
Returns the number of components in the context menu. |
int |
getComponentIndex(Component component)
Returns the index of the component. |
void |
insert(Component component,
int index)
Insert a new item into the popup menu. |
void |
remove(int index)
Removes the component at the specified index. |
void |
removePopupMenuListener(PopupMenuListener listener)
Removes the PopupMenuListener from the context menu. |
| Method Detail |
public JMenuItem add(JMenuItem menuItem)
menuItem - the JMenuItem to addpublic void addSeparator()
public void insert(Component component,
int index)
component - the Component to insertindex - specifies the position at which to insert the componentpublic void remove(int index)
index - the index of the component to removepublic int getComponentIndex(Component component)
component -
public int getComponentCount()
public Component getComponent(int index)
index -
public void addPopupMenuListener(PopupMenuListener listener)
listener - public void removePopupMenuListener(PopupMenuListener listener)
listener -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||