All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.JMenuBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JMenuBar
- public class JMenuBar
- extends JComponent
An implementation of a MenuBar
-
selectionModel
- Model for the selected subcontrol
-
JMenuBar()
-
-
add(JMenu)
-
-
deleteShortcut(MenuShortcut)
-
-
getComponentAt(int, int)
- Returns the subcomponent at the given coordinates in this
menubar's coordinate space.
-
getComponentAtIndex(int)
-
-
getComponentIndex(Component)
-
-
getHelpMenu()
-
-
getMenu(int)
-
-
getMenuCount()
-
-
getSelectionModel()
-
-
getShortcutMenuItem(MenuShortcut)
-
-
getShortcuts()
-
-
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 menubar's current UI.
-
isBorderPainted()
-
-
isOpaque()
-
-
isSelected()
-
-
remove(int)
-
-
setBorderPainted(boolean)
-
-
setHelpMenu(JMenu)
-
-
setSelected(Component)
-
-
setSelectionModel(SingleSelectionModel)
-
-
setUI(MenuBarUI)
- Sets the menubar's UI.
-
setVisible(boolean)
-
-
updateUI()
- Gets a new UI object from the default UIFactory.
selectionModel
protected SingleSelectionModel selectionModel
- Model for the selected subcontrol
JMenuBar
public JMenuBar()
getUI
public MenuBarUI getUI()
- Returns the menubar's current UI.
- See Also:
- setUI
setUI
public void setUI(MenuBarUI ui)
- Sets the menubar's UI.
- Parameters:
- ui - the new MenuBarUI
- 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 JMenu add(JMenu c)
getMenu
public JMenu getMenu(int index)
getMenuCount
public int getMenuCount()
remove
public void remove(int index)
- Overrides:
- remove in class Container
setHelpMenu
public void setHelpMenu(JMenu menu)
getHelpMenu
public JMenu getHelpMenu()
getShortcutMenuItem
public JMenuItem getShortcutMenuItem(MenuShortcut m)
getShortcuts
public Enumeration getShortcuts()
deleteShortcut
public void deleteShortcut(MenuShortcut m)
setVisible
public void setVisible(boolean b)
- Overrides:
- setVisible in class Component
getComponentAtIndex
public Component getComponentAtIndex(int i)
getComponentAt
public Component getComponentAt(int x,
int y)
- Returns the subcomponent at the given coordinates in this
menubar's coordinate space.
- Overrides:
- getComponentAt in class Container
getComponentIndex
public int getComponentIndex(Component c)
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 be a menu-parent of
the to component.
setSelected
public void setSelected(Component sel)
isSelected
public boolean isSelected()
isBorderPainted
public boolean isBorderPainted()
setBorderPainted
public void setBorderPainted(boolean s)
isOpaque
public boolean isOpaque()
- Overrides:
- isOpaque in class JComponent
All Packages Class Hierarchy This Package Previous Next Index