All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.JPopupMenu
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JPopupMenu
- public class JPopupMenu
- extends JComponent
An implementation of a Popup Menu
-
componentListener
-
-
popupListener
-
-
popupListenerList
- The lists of client listeners.
-
selectionModel
- Model for the selected subcontrol
-
windowListener
-
-
JPopupMenu()
-
-
add(Component)
-
-
add(JMenuItem)
-
-
addWindowListener(WindowListener)
-
-
createComponentListener(JPopupMenu)
-
-
createPopupListener(JPopupMenu)
-
-
createWinListener(JPopupMenu)
-
-
getComponentAt(int, int)
- Returns the menu subcomponent at the given coordinates in this
menu's coordinate space.
-
getComponentAtIndex(int)
-
-
getComponentIndex(Component)
-
-
getInvoker()
-
-
getRootPopupMenu()
-
-
getSelectionModel()
-
-
getTranslatedPoint(int, int, Component, Component)
- Returns the given point in the from components coordinate
space translated into the to components coordinate space.
-
getUI()
- Returns the popupmenu's current UI.
-
insert(Action, int)
-
-
insert(Component, int)
-
-
isBackgroundPainted()
- Checks whether the background should be painted
-
isBorderPainted()
- Checks whether the border should be painted.
-
isOpaque()
-
-
isPopupMenu()
-
-
isVisible()
-
-
pack()
-
-
removeWindowListener(WindowListener)
-
-
setBackgroundPainted(boolean)
- Sets whether the background should be painted.
-
setBorderPainted(boolean)
- Sets whether the border should be painted.
-
setInvoker(Component)
-
-
setLocation(int, int)
-
-
setPopupMenu(boolean)
-
-
setPopupSize(Dimension)
-
-
setPopupSize(int, int)
-
-
setSelected(Component)
-
-
setSelectionModel(SingleSelectionModel)
-
-
setUI(PopupMenuUI)
- Sets the popupmenu's UI.
-
setVisible(boolean)
-
-
show(Component, int, int)
-
-
updateUI()
- Gets a new UI object from the default UIFactory.
popupListenerList
protected WindowListener popupListenerList
- The lists of client listeners.
selectionModel
protected SingleSelectionModel selectionModel
- Model for the selected subcontrol
popupListener
protected JPopupMenu. PopupListener popupListener
windowListener
protected JPopupMenu. WinListener windowListener
componentListener
protected JPopupMenu. ComponentListener componentListener
JPopupMenu
public JPopupMenu()
getUI
public PopupMenuUI getUI()
- Returns the popupmenu's current UI.
- See Also:
- setUI
setUI
public void setUI(PopupMenuUI ui)
- Sets the popupmenu's UI.
- Parameters:
- ui - the new PopupMenuUI
- See Also:
- getUI
updateUI
public void updateUI()
- Gets a new UI object from the default UIFactory.
- Overrides:
- updateUI in class JComponent
getSelectionModel
public SingleSelectionModel getSelectionModel()
setSelectionModel
public void setSelectionModel(SingleSelectionModel model)
add
public JMenuItem add(JMenuItem menuItem)
add
public Component add(Component c)
- Overrides:
- add in class Container
insert
public void insert(Action a,
int index)
insert
public void insert(Component component,
int index)
pack
public void pack()
setVisible
public void setVisible(boolean b)
- Overrides:
- setVisible in class Component
isVisible
public boolean isVisible()
- Overrides:
- isVisible in class Component
setLocation
public void setLocation(int x,
int y)
- Overrides:
- setLocation in class Component
isPopupMenu
public boolean isPopupMenu()
setPopupMenu
public void setPopupMenu(boolean b)
getInvoker
public Component getInvoker()
setInvoker
public void setInvoker(Component invoker)
show
public void show(Component invoker,
int x,
int y)
getRootPopupMenu
public JPopupMenu getRootPopupMenu()
getComponentAt
public Component getComponentAt(int x,
int y)
- Returns the menu subcomponent at the given coordinates in this
menu's coordinate space.
- Overrides:
- getComponentAt in class Container
getComponentIndex
public int getComponentIndex(Component c)
getComponentAtIndex
public Component getComponentAtIndex(int i)
getTranslatedPoint
public Point getTranslatedPoint(int x,
int y,
Component from,
Component to)
- Returns the given point in the from components coordinate
space translated into the to components coordinate space.
The from component is expected to parent the to
component.
setPopupSize
public void setPopupSize(Dimension d)
setPopupSize
public void setPopupSize(int width,
int height)
setSelected
public void setSelected(Component sel)
isBorderPainted
public boolean isBorderPainted()
- Checks whether the border should be painted.
- See Also:
- setBorderPainted
setBorderPainted
public void setBorderPainted(boolean b)
- Sets whether the border should be painted.
- Parameters:
- b - if true, the border is painted.
- See Also:
- isBorderPainted
isBackgroundPainted
public boolean isBackgroundPainted()
- Checks whether the background should be painted
isOpaque
public boolean isOpaque()
- Overrides:
- isOpaque in class JComponent
setBackgroundPainted
public void setBackgroundPainted(boolean b)
- Sets whether the background should be painted.
- Parameters:
- b - if true, the background is painted.
- See Also:
- isBorderPainted
addWindowListener
public void addWindowListener(WindowListener w)
removeWindowListener
public void removeWindowListener(WindowListener w)
createPopupListener
protected JPopupMenu. PopupListener createPopupListener(JPopupMenu p)
createWinListener
protected JPopupMenu. WinListener createWinListener(JPopupMenu p)
createComponentListener
protected JPopupMenu. ComponentListener createComponentListener(JPopupMenu p)
All Packages Class Hierarchy This Package Previous Next Index