java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPopupMenu
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, MenuElement
- Direct Known Subclasses:
- BasicComboPopup
- See Also:
- Top Examples, Source Code,
XMLEncoder
public JMenuItem add(String s)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public JMenuItem add(Action a)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public JMenuItem add(JMenuItem menuItem)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[104]Pop-up menu
By Anonymous on 2002/10/18 17:55:26 Rate
// Create the submenu items
JMenuItem menuItem1 = new JMenuItem ( ??Copy?? ) ;
JMenuItem menuItem2 = new JMenuItem ( ??Cut?? ) ;
JMenuItem menuItem3 = new JMenuItem ( ??Paste?? ) ;
// Constructor the pop-up menu
JPopupMenu popupMenu = new JPopupMenu ( ) ;
popupMenu.add ( menuItem1 ) ;
popupMenu.add ( menuItem2 ) ;
popupMenu.add ( menuItem3 ) ;
public void addMenuKeyListener(MenuKeyListener l)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void addPopupMenuListener(PopupMenuListener l)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void addSeparator()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected PropertyChangeListener createActionChangeListener(JMenuItem b)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected JMenuItem createActionComponent(Action a)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void firePopupMenuCanceled()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void firePopupMenuWillBecomeInvisible()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void firePopupMenuWillBecomeVisible()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public AccessibleContext getAccessibleContext()
- See Also:
- JComponent, Accessible
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Component getComponent()
- See Also:
- MenuElement
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
@Deprecated
public Component getComponentAtIndex(int i)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int getComponentIndex(Component c)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static boolean getDefaultLightWeightPopupEnabled()
- See Also:
setDefaultLightWeightPopupEnabled(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Component getInvoker()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getLabel()
- See Also:
setLabel(java.lang.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Insets getMargin()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public MenuKeyListener[] getMenuKeyListeners()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public PopupMenuListener[] getPopupMenuListeners()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public SingleSelectionModel getSelectionModel()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public MenuElement[] getSubElements()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public PopupMenuUI getUI()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getUIClassID()
- See Also:
UIDefaults.getUI(javax.swing.JComponent)
, JComponent
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void insert(Component component,
int index)
- See Also:
- IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void insert(Action a,
int index)
- See Also:
- IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean isBorderPainted()
- See Also:
setBorderPainted(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean isLightWeightPopupEnabled()
- See Also:
setLightWeightPopupEnabled(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean isPopupTrigger(MouseEvent e)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean isVisible()
- See Also:
Component.setVisible(boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public JPopupMenu()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public JPopupMenu(String label)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void menuSelectionChanged(boolean isIncluded)
- See Also:
- MenuElement
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void pack()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void paintBorder(Graphics g)
- See Also:
JComponent.setBorder(javax.swing.border.Border)
, JComponent.paint(java.awt.Graphics)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected String paramString()
- See Also:
- JComponent
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void processFocusEvent(FocusEvent evt)
- See Also:
Component.dispatchEvent(java.awt.AWTEvent)
, Component.enableEvents(long)
, Component.addFocusListener(java.awt.event.FocusListener)
, KeyboardFocusManager
, FocusListener
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected void processKeyEvent(KeyEvent evt)
- See Also:
Component.isShowing()
, Component.enableEvents(long)
, Component.addKeyListener(java.awt.event.KeyListener)
, Component.dispatchEvent(java.awt.AWTEvent)
, Component.processEvent(java.awt.AWTEvent)
, DefaultKeyboardFocusManager
, KeyboardFocusManager
, KeyListener
, JComponent
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void processKeyEvent(KeyEvent e,
MenuElement[] path,
MenuSelectionManager manager)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void processMouseEvent(MouseEvent event,
MenuElement[] path,
MenuSelectionManager manager)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void remove(int pos)
- See Also:
Container.add(java.awt.Component)
, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void removeMenuKeyListener(MenuKeyListener l)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void removePopupMenuListener(PopupMenuListener l)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setBorderPainted(boolean b)
- See Also:
isBorderPainted()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static void setDefaultLightWeightPopupEnabled(boolean aFlag)
- See Also:
setLightWeightPopupEnabled(boolean)
, getDefaultLightWeightPopupEnabled()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setInvoker(Component invoker)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setLabel(String label)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setLightWeightPopupEnabled(boolean aFlag)
- See Also:
isLightWeightPopupEnabled()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setLocation(int x,
int y)
- See Also:
Component.setBounds(int, int, int, int)
, Component.getLocation()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setPopupSize(int width,
int height)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setPopupSize(Dimension d)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setSelected(Component sel)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setSelectionModel(SingleSelectionModel model)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setUI(PopupMenuUI ui)
- See Also:
UIDefaults.getUI(javax.swing.JComponent)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setVisible(boolean b)
- See Also:
Component.isVisible()
, JComponent
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void show(Component invoker,
int x,
int y)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void updateUI()
- See Also:
- JComponent
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples