class org.aswing.JMenuBar extends Container
| Interfaces | |||
![]() | MenuElement |
| |
An implementation of a menu bar. You add JMenu objects to the
menu bar to construct a menu. When the user selects a JMenu
object, its associated JPopupMenu is displayed, allowing the
user to select one of the JMenuItem on it.
@author paling
Instance Fields
function addMenu(menu:JMenu): JMenu
Adds a menu to the menu bar.
| menu | the menu to be added |
| returns | the menu be added |
function getMenu(index:Int): JMenu
Returns the menu component at index, if it is not a menu component at that index, null will be returned.
| returns | a menu instance or null |
function getSelectionModel(): SingleSelectionModel
Returns the model object that handles single selections.
@see SingleSelectionModel
| returns | the |
function isSelected(): Bool
Returns true if the menu bar currently has a component selected.
| returns | true if a selection has been made, else false |
function setSelected(sel:Component): Void
Sets the currently selected component, producing a a change to the selection model.
| sel | the |
function setSelectionModel(model:SingleSelectionModel): Void
Sets the model object to handle single selections.
@see SingleSelectionModel
| model | the |
