class org.aswing.MenuSelectionManager extends EventDispatcher
Dispatched when the menu selection changed.
@eventType org.aswing.event.InteractiveEvent.SELECTION_CHANGED
Class Fields
static function setDefaultManager(m:MenuSelectionManager): Void
Replaces the default manager by yours.
Instance Fields
![]() | Show inherited public instance fields | Hide inherited public instance fields
|
function addSelectionListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void
Adds a listener to listen the menu seletion change event. @see org.aswing.event.InteractiveEvent#STATE_CHANGED
listener | the listener |
priority | the priority |
useWeakReference | Determines whether the reference to the listener is strong or weak. |
function clearSelectedPath(programmatic:Bool): Void
Tell the menu selection to close and unselect all the menu components. Call this method when a choice has been made.
programmatic | indicate if this is a programmatic change. |
function getSelectedPath(): Array<Dynamic>
Returns the path to the currently selected menu item
returns | an array of MenuElement objects representing the selected path |
function isComponentPartOfCurrentMenu(c:Component): Bool
Return true if c is part of the currently used menu
function removeSelectionListener(listener:Dynamic ->Void): Void
Removes a menu seletion change listener. @see org.aswing.event.InteractiveEvent#STATE_CHANGED
listener | the listener to be removed. |
function setSelectedPath(trigger:InteractiveObject, path:Array<Dynamic>, programmatic:Bool): Void
Changes the selection in the menu hierarchy. The elements in the array are sorted in order from the root menu element to the currently selected menu element.
Note that this method is public but is used by the look and feel engine and should not be called by client applications.
path | an array of |
programmatic | indicate if this is a programmatic change. |