public class UiAccessKeyBindingImpl extends Object implements UiAccessKeyBinding
UiAccessKeyBinding.| Modifier and Type | Field and Description |
|---|---|
private Map<Character,Collection<AbstractUiWidgetActive<?,?>>> |
accessKey2WidgetsMap |
| Constructor and Description |
|---|
UiAccessKeyBindingImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindAccessKey(char key,
UiWidgetActive widget)
This method registers the given
key for the given widget. |
boolean |
invokeAccessKey(char key)
This method simulates the effect of pressing the access key programmatically.
|
private Collection<AbstractUiWidgetActive<?,?>> |
requireWidgetsForAccessKey(char accessKey)
Gets or creates the
Collection with the widgets for the given accessKey. |
boolean |
unbindAccessKey(char key,
UiWidgetActive widget)
This method unregisters the given
key for the given widget. |
void |
verifyUniqueAccessKeys()
This method verifies that there are no conflicts with multiple bindings of the same access key.
|
private Map<Character,Collection<AbstractUiWidgetActive<?,?>>> accessKey2WidgetsMap
bindAccessKey(char, UiWidgetActive)private Collection<AbstractUiWidgetActive<?,?>> requireWidgetsForAccessKey(char accessKey)
Collection with the widgets for the given accessKey.accessKey - is the access key.Collection.public void bindAccessKey(char key,
UiWidgetActive widget)
key for the given widget.bindAccessKey in interface UiAccessKeyBindingkey - is the access
key.widget - is the active widget that has been bound to the access key.public boolean unbindAccessKey(char key,
UiWidgetActive widget)
key for the given widget.unbindAccessKey in interface UiAccessKeyBindingkey - is the access
key.widget - is the active widget that has been unbound from the access key.true if the access key has been unbound successfully, false otherwise
(it was not bound before).public boolean invokeAccessKey(char key)
invokeAccessKey in interface UiAccessKeyBindingkey - is the access
key.true if the access key has been invoked successfully (as it was bound to a widget
currently visible), false otherwise.public void verifyUniqueAccessKeys()
verifyUniqueAccessKeys in interface UiAccessKeyBindingCopyright © 2001–2016 mmm-Team. All rights reserved.