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 fieldsHide inherited public instance fields

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

function new(): Void

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 isEnterKey(code:Int): Bool

function isEscKey(code:Int): Bool

function isItemNavKey(code:Int): Bool

function isKeyEnabled(): Bool

function isNavigatingKey(code:Int): Bool

function isNextItemKey(code:Int): Bool

function isNextPageKey(code:Int): Bool

function isPageNavKey(code:Int): Bool

function isPrevItemKey(code:Int): Bool

function isPrevPageKey(code:Int): Bool

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 setKeyEnabled(b:Bool): Void

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 MenuElement objects specifying the selected path.

programmatic

indicate if this is a programmatic change.