Class TLcyActionBarUtil
A class containing static utility methods to facilitate working with action bars.
When you encounter a problem related to actions or active settables and action bars like for example action which do not appear, appear in the wrong location, appear in the wrong order, ...
the TLcyDebugAddOn
can be of great help.
The most important methods of this class are illustrated in the Lucy developer guide in the "Modifying the menu and tool bars" chapter. This chapter contains code examples for all common operations with action bars.
The most important functions of this class are:
-
Using configuration options to insert an action / active settable in action bars:
the
insertInConfiguredActionBars
methods allow you to pass in an action or active settable and the configuration file, and the item will automatically be inserted in all action bars which are present in the configuration file. -
Setting up your own action bar:
the
setupAsConfiguredActionBar
method allows you to create your own action bar in which actions can be inserted using theinsertInConfiguredActionBars
methods. This also allows to configure existing actions to appear in it.
Note: when you run into problems with action bars, you could try the debugging options outlined
in the class javadoc of TLcyActionBarMediatorBuilder
.
- Since:
- 8.1
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILcdAction
createGlobalProxyAction
(String aActionID, String aActionBarID, TLcyActionBarManager aActionBarManager) Creates an action that delegates its behaviour to the action in the active context.static ILcyActiveSettable
createGlobalProxyActiveSettable
(String aActiveSettableID, String aActionBarID, TLcyActionBarManager aActionBarManager) Equivalent ofcreateGlobalProxyAction(String, String, TLcyActionBarManager)
forILcyActiveSettable
.static ILcdAction
findAction
(String aActionID, ILcyActionBar aActionBar) Method which loops over all actions present inaActionBar
, and returns the action with valueaActionID
for the keyID_KEY
.static ILcdAction
findAction
(String aActionID, String aActionBarID, Object aActionBarContext, TLcyActionBarManager aActionBarManager) Returns the action with idaActionID
from the action bar identified byaActionBarID
andaActionBarContext
.static Object
findActionItem
(String aActionID, ILcyActionBar aActionBar) Searches for theILcdAction
orILcyActiveSettable
corresponding to the givenaActionID
in the givenaActionBar
.static ILcyActiveSettable
findActiveSettable
(String aActiveSettableID, ILcyActionBar aActionBar) Method which loops over all active settables present inaActionBar
, and returns the active settable with valueaActiveSettableID
for the keyID_KEY
.static ILcyActiveSettable
findActiveSettable
(String aActiveSettableID, String aActionBarID, Object aActionBarContext, TLcyActionBarManager aActionBarManager) Returns the active settable with idaActiveSettableID
from the action bar identified byaActionBarID
andaActionBarContext
.static Object
findFirstDefaultActionItem
(ILcyActionBar aActionBar) Searches for the first defaultILcdAction
orILcyActiveSettable
in the givenaActionBar
.static ILcdAction
findWrapperAction
(ILcdAction aAction, ILcyActionBar aActionBar) Searches for theILcdAction
corresponding to the givenaAction
in the givenaActionBar
.static ILcyActiveSettable
findWrapperActiveSettable
(ILcyActiveSettable aActiveSettable, ILcyActionBar aActionBar) Searches for theILcyActiveSettable
corresponding to the givenaActiveSettable
in the givenaActionBar
.static String[]
getConfiguredActionBarIDs
(ALcyProperties aConfiguration, String aID) Searches the given configuration for the ID's of the action bars in which an action with the given ID would be inserted.static void
insertInConfiguredActionBars
(ILcdAction aAction, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration) Inserts the given action in all the configured action bars.static void
insertInConfiguredActionBars
(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration) Equivalent ofinsertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
forILcyActiveSettable
.static void
insertInConfiguredActionBars
(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration, boolean aDeactivatePossible) Equivalent ofinsertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
forILcyActiveSettable
.static void
mediate
(ILcyActionBar aFirst, ILcyActionBar aSecond) Deprecated.static void
mediate
(ILcyActionBar aSource, ILcyActionBar aTarget, boolean aBidirectional) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classstatic void
mediate
(ILcyActionBar aTargetActionBar, String aActionBarID, boolean aMerge, TLcyActionBarManager aActionBarManager) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classstatic void
mediate
(ILcyActionBar aTargetActionBar, String aActionBarID, Object aContext, TLcyActionBarManager aActionBarManager) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classstatic ILcdDisposable
mediateAcceleratorKeys
(ILcyActionBar aActionBar, JComponent aTargetComponent) Mediates the accelerator keys between theILcyActionBar
and theJComponent
.static void
removeFromConfiguredActionBars
(ILcdAction aAction, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aProperties) Removes the given action from all the action bars in which it would have been inserted byinsertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
.static void
removeFromConfiguredActionBars
(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aProperties) Removes the given active settable from all the action bars in which it would have been inserted byinsertInConfiguredActionBars(ILcyActiveSettable, Object, TLcyActionBarManager, ALcyProperties)
.static ILcdDisposable
setupAsConfiguredActionBar
(ILcyActionBar aActionBarSFCT, String aActionBarID, Object aContext, ALcyProperties aProperties, String aPropertiesPrefix, JComponent aTargetAcceleratorKeysComponent, TLcyActionBarManager aActionBarManager) Utility method to setup anILcyActionBar
as 'configured action bar' designed to contain actions and active settables for the specified context.
-
Field Details
-
ID_KEY
The key with which the ActionID is saved in an action or active settable. The ID is for example used in
The ID could for example be set like this:insertInConfiguredActionBars
.ILcdAction action = ...; String actionID = "MyAddOn.someAction"; //prefix used in config file action.putValue(TLcyActionBarUtil.ID_KEY, actionID);
When configuring actions,
TLcyDebugAddOn
can be of great help.- See Also:
-
-
Method Details
-
setupAsConfiguredActionBar
public static ILcdDisposable setupAsConfiguredActionBar(ILcyActionBar aActionBarSFCT, String aActionBarID, Object aContext, ALcyProperties aProperties, String aPropertiesPrefix, JComponent aTargetAcceleratorKeysComponent, TLcyActionBarManager aActionBarManager) Utility method to setup an
ILcyActionBar
as 'configured action bar' designed to contain actions and active settables for the specified context.You typically call this method when you created your own action bar to insert into the UI, and you want it to behave like the standard Lucy action bars. Consult the "Modifying the menu and tool bars" chapter in the Lucy developer guide for more information.
This method will ensure that:
-
Actions and active settables registered at the action bar manager appear in
aActionBarSFCT
.
When the specified context is notnull
, the action bar will also contain all global actions and active settables registered foraActionBarID
. The major benefit is that this allows you to configure global actions (e.g. File | New | Map ) into a map specific action bar like the map tool bar. -
The sorting of the different groups specified as specified in the configuration files is respected.
This requires that
aActionBarSFCT
is anALcyActionBar
instance. -
The accelerator keys of all existing and future actions and active settables are added to the action map of
aTargetAcceleratorKeysComponent
. Triggering the accelerator key of such action or active settable onaTargetAcceleratorKeysComponent
will trigger the corresponding action or active settable.
Suppose there is a UI panel with some functionality, and it contains a tool bar. If a short cut key is used while the focus is in one of the sub-components of the panel, you probably want it to trigger the respective tool bar action. This is ensured by calling this method.
- Parameters:
aActionBarSFCT
- The action bar. Must not benull
. The sorting defined inaProperties
will only be respected when this is aALcyActionBar
instance.aActionBarID
- The ID for the action baraContext
- The context for the action bar. Typicallynull
or anILcyGenericMapComponent
aProperties
- The properties instance containing the settings of the action bar. Consult the javadoc ofALcyActionBar.setProperties(ALcyProperties)
for more information.aPropertiesPrefix
- The prefix used inaProperties
aTargetAcceleratorKeysComponent
- The component that should respond to pressing accelerator keys (a.k.a. hot keys) that are configured in the action bar. This is typically the panel to which the action bar 'belongs'. For example, the map tool bar would provide the map here. May benull
.aActionBarManager
- The action bar manager- Returns:
- an
ILcdDisposable
, allowing to clean up all bindings betweenaActionBarSFCT
andaTargetAcceleratorKeysComponent
. In most cases you can ignore the return value. You only need to call dispose on theILcdDisposable
when the lifetime ofaActionBarSFCT
is different from the lifetime ofaTargetAcceleratorKeysComponent
. In that case, you need to dispose the disposable when one of both instances is end-of-life.
-
Actions and active settables registered at the action bar manager appear in
-
mediateAcceleratorKeys
public static ILcdDisposable mediateAcceleratorKeys(ILcyActionBar aActionBar, JComponent aTargetComponent) Mediates the accelerator keys between the
ILcyActionBar
and theJComponent
. All existing and futureILcdAction
andILcyActiveSettable
accelerator keys will be added in the action map of theJComponent
, and triggering the accelerator key on theJComponent
will trigger the correspondingILcdAction
orILcyActiveSettable
.Suppose there is a UI panel with some functionality, and it contains a tool bar. If a short cut key is used while the focus is in one of the sub-components of the panel, you probably want it to trigger the respective tool bar action. For this to work, this method needs to be called.
- Parameters:
aActionBar
- The action bar. Must not benull
aTargetComponent
- The target component. Must not benull
- Returns:
- an
ILcdDisposable
, allowing to stop mediating the two instances. Calling theILcdDisposable.dispose()
method will clean up all bindings betweenaActionBar
andaTargetComponent
, and will remove all accelerator keys ofaActionBar
fromaTargetComponent
. Typically the life time ofaActionBar
andaTargetComponent
is the same. In such case, there is no need to call the dispose method.
-
mediate
Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classMediates between the two given action bars. Short for:
TLcyActionBarMediatorBuilder.newInstance(aActionBarManager) .sourceActionBar(aFirst) .targetActionBar(aSecond) .bidirectional() .mediate();
Consult the documentation of
TLcyActionBarMediatorBuilder
for more information.- Parameters:
aFirst
- The first action bar. Note that this method will only keep aWeakReference
to this action bar.aSecond
- The second action bar. Note that this method will only keep aWeakReference
to this action bar.
-
mediate
@Deprecated public static void mediate(ILcyActionBar aSource, ILcyActionBar aTarget, boolean aBidirectional) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classMediates between the two given action bars. Short for:
TLcyActionBarMediatorBuilder mediator = TLcyActionBarMediatorBuilder.newInstance( aActionBarManager ) .sourceActionBar(aSource) .targetActionBar(aTarget); if ( aBidirectional ){ mediator.bidirectional(); } mediator.mediate();
Consult the documentation of
TLcyActionBarMediatorBuilder
for more information.Note that if bidirectional synchronization is required, it is not valid to call this method twice with
aBidirectional
set tofalse
, e.g.mediate( aBar, aOtherBar, false ); mediate( aOtherBar, aBar, false );
- Parameters:
aSource
- The action bar with which the other action bar should be mediated. It should not benull
. Note that this method will only keep aWeakReference
to this action bar.aTarget
- The action bar with whichaSource
should be mediated. It must not benull
. Note that this method will only keep aWeakReference
to this action bar.aBidirectional
-true
if synchronization between the two actions bars should happen in both directions,false
to only synchronize from source to target.
-
mediate
@Deprecated public static void mediate(ILcyActionBar aTargetActionBar, String aActionBarID, boolean aMerge, TLcyActionBarManager aActionBarManager) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classMediates between the two given action bars. Short for:
if ( aMerge ) { TLcyActionBarMediatorBuilder.newInstance(aActionBarManager) .sourceActionBarIncludingActiveContexts(aActionBarID) .targetActionBar(aTargetActionBar) .bidirectional() .mediate(); } else { TLcyActionBarMediatorBuilder.newInstance(aActionBarManager) .sourceActionBar(aActionBarID, null) .targetActionBar(aTargetActionBar) .bidirectional() .mediate(); }
Consult the documentation of
TLcyActionBarMediatorBuilder
for more information.- Parameters:
aTargetActionBar
- TheILcyActionBar
to which the actions of the global action bar, and possibly the actions of the action bars of the active contexts, should be added. Note that this method will only keep aWeakReference
to this action bar.aActionBarID
- The ID of the action bar in the action manager.aMerge
- Iftrue
, the actions of the action bars of the active contexts will also be added to the givenaTargetActionBar
. Iffalse
, this method acts exactly asmediate(aTargetActionBar, aActionBarID, null,aActionBarManager)
aActionBarManager
- The action bar manager containing the requested action bars.- See Also:
-
mediate
@Deprecated public static void mediate(ILcyActionBar aTargetActionBar, String aActionBarID, Object aContext, TLcyActionBarManager aActionBarManager) Deprecated.The recommended way to mediate between two action bars is to use theTLcyActionBarMediatorBuilder
classMediates between the two given action bars. Short for:
TLcyActionBarMediatorBuilder.newInstance(aActionBarManager) .sourceActionBar(aActionBarID, aContext) .targetActionBar(aTargetActionBar) .bidirectional() .mediate();
Consult the documentation of
TLcyActionBarMediatorBuilder
for more information.- Parameters:
aTargetActionBar
- The action bar with which the other action bar should be mediated. It should not benull
. Note that this method will only keep aWeakReference
to this action bar.aActionBarID
- The ID of the action bar in theTLcyActionBarManager
.aContext
- The context of the action bar in theTLcyActionBarManager
.aActionBarManager
- The action bar manager.- See Also:
-
findAction
public static ILcdAction findAction(String aActionID, String aActionBarID, Object aActionBarContext, TLcyActionBarManager aActionBarManager) Returns the action with id
Short for:aActionID
from the action bar identified byaActionBarID
andaActionBarContext
.TLcyActionBarUtil.findAction(aActionID, aActionBarManager.getActionBar(aActionBarID, aActionBarContext))
- Parameters:
aActionID
- The id of the actionaActionBarID
- The id of the action baraActionBarContext
- The context of the action baraActionBarManager
- The action bar manager- Returns:
- the action with the specified id from the action bar, or
null
when not found - Since:
- 2014.0
- See Also:
-
findAction
Method which loops over all actions present in
aActionBar
, and returns the action with valueaActionID
for the keyID_KEY
.- Parameters:
aActionID
- The id of the searched actionaActionBar
- The action bar to search- Returns:
- The action with the specified id, or
null
when no such action exists inaActionBar
. - Since:
- 2014.0
- See Also:
-
findActiveSettable
public static ILcyActiveSettable findActiveSettable(String aActiveSettableID, String aActionBarID, Object aActionBarContext, TLcyActionBarManager aActionBarManager) Returns the active settable with id
Short for:aActiveSettableID
from the action bar identified byaActionBarID
andaActionBarContext
.TLcyActionBarUtil.findActiveSettable(aActiveSettableID, aActionBarManager.getActionBar(aActionBarID, aActionBarContext))
- Parameters:
aActiveSettableID
- The id of the active settableaActionBarID
- The id of the action baraActionBarContext
- The context of the action baraActionBarManager
- The action bar manager- Returns:
- the active settable with the specified id from the action bar, or
null
when not found - Since:
- 2014.0
- See Also:
-
findActiveSettable
public static ILcyActiveSettable findActiveSettable(String aActiveSettableID, ILcyActionBar aActionBar) Method which loops over all active settables present in
aActionBar
, and returns the active settable with valueaActiveSettableID
for the keyID_KEY
.- Parameters:
aActiveSettableID
- The id of the searched active settableaActionBar
- The action bar to search- Returns:
- The active settable with the specified id, or
null
when no such active settable exists inaActionBar
. - Since:
- 2014.0
- See Also:
-
getConfiguredActionBarIDs
Searches the given configuration for the ID's of the action bars in which an action with the given ID would be inserted.
For instance, if the the id is
'YourAddOn.yourAction'
, and the configuration contains following keys:YourAddOn.yourAction.fooBar.item=... ... YourAddOn.yourAction.yourActionBar.item=... ... YourAddOn.yourAction.menuBar.item=... ...
Then the returned ids would be
{"fooBar", "yourActionBar", "menuBar"}
.- Parameters:
aConfiguration
- The configuration in which to look for the action bar IDs. It must not benull
.aID
- The ID of the action or active settable for which to retrieve the configured action bars. It must not benull
. Note that is should be the ID of the action or active settable without the trailing dot.- Returns:
- An array containing the IDs of the action bars found in the configuration. It is never
null
. It may be an empty array with length zero.
-
insertInConfiguredActionBars
public static void insertInConfiguredActionBars(ILcdAction aAction, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration) Inserts the given action in all the configured action bars. The IDs of the configured action bars (e.g. 'menuBar', 'toolBar') are retrieved using the
getConfiguredActionBarIDs
method. The 'ActionID' of the action or active settable itself (that is, the ID passed togetConfiguredActionBarIDs
) is taken from the givenILcdAction
usingaAction.getValue(ID_KEY)
. So the properties to configure an action could for example look like this:
which inserts the action into the bar named 'menuBar' and into the bar named 'toolBar'. In the 'menuBar' the action is in the sub-menu 'Menu' and has an accelerator key. On the 'toolBar', the action is represented using a larger icon 'someLargerIcon.png'.ActionID.menuBar.item = Menu, Action ActionID.menuBar.groups = MenuGroup, ActionGroup ActionID.menuBar.acceleratorKey = ctrl A ActionID.menuBar.smallIcon = someIcon.png ActionID.toolBar.item = Action ActionID.toolBar.groups = ActionGroup ActionID.toolBar.smallIcon = someLargerIcon.png
The given
ILcdAction
is not inserted directly, but instead wrapped by anotherILcdAction
that prevents the values set withputValue
on the wrapper action to be set on the original action. Since these values determine the name, icon, short description etc. of the action, wrapping the original action allows it to be configured to look different in the different menu and tool bars.- Parameters:
aAction
- The action to insert into the configured action bars. It must not benull
. It must have a unique ID as value for theID_KEY
key. This ID is used to retrieve the configured action bars (e.g. 'menuBar', 'toolBar'), as specified ingetConfiguredActionBarIDs
. This action is wrapped by another action to allow for different names, icons, short descriptions, ... in the different action bars.aContext
- The context for the action bars. If this context isnull
, the global context is used. Refer to theTLcyActionBarManager
for more details about contexts.aActionBarManager
- TheTLcyActionBarManager
that should be used to retrieve the action bars. One can be retrieved usingILcyLucyEnv.getUserInterfaceManager().getActionBarManager()
.aConfiguration
- TheALcyProperties
instance containing the configuration of the action. Can for example be parsed from a file like this:new TLcyStringPropertiesCodec().decode("myConfigFile.cfg")
- See Also:
-
insertInConfiguredActionBars
public static void insertInConfiguredActionBars(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration) Equivalent ofinsertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
forILcyActiveSettable
. -
insertInConfiguredActionBars
public static void insertInConfiguredActionBars(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aConfiguration, boolean aDeactivatePossible) Equivalent ofinsertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
forILcyActiveSettable
.- Parameters:
aDeactivatePossible
- Specifies whether one should be able to deactivate the givenILcyActiveSettable
.
-
createGlobalProxyAction
public static ILcdAction createGlobalProxyAction(String aActionID, String aActionBarID, TLcyActionBarManager aActionBarManager) Creates an action that delegates its behaviour to the action in the active context. The action is specified by the given
aActionID
. If no action can be found in any of the active contexts with the specified ID, the action returned by this method is disabled.- Parameters:
aActionID
- The ID of the action to which the behaviour should be delegated. Should not benull
.aActionBarID
- The ID of the action bar in which the specified action can be found. Should not benull
.aActionBarManager
- The action bar manager in which the specified action bar can be found. Should not benull
.- Returns:
- An action whose behaviour is delegated to the action in the active context if the
action can be found in that active context. Never
null
. - See Also:
-
createGlobalProxyActiveSettable
public static ILcyActiveSettable createGlobalProxyActiveSettable(String aActiveSettableID, String aActionBarID, TLcyActionBarManager aActionBarManager) Equivalent of
createGlobalProxyAction(String, String, TLcyActionBarManager)
forILcyActiveSettable
. -
findFirstDefaultActionItem
Searches for the first default
ILcdAction
orILcyActiveSettable
in the givenaActionBar
. A default action has itsAction.DEFAULT
property set to true.- Parameters:
aActionBar
- TheILcyActionBar
in which to search for the specifiedILcdAction
orILcyActiveSettable
. Should not benull
.- Returns:
- The first default
ILcdAction
orILcyActiveSettable
if it could be found,null
otherwise.
-
findActionItem
Searches for the
ILcdAction
orILcyActiveSettable
corresponding to the givenaActionID
in the givenaActionBar
.- Parameters:
aActionID
- The ID of theILcdAction
orILcyActiveSettable
for which to search. Should not benull
.aActionBar
- TheILcyActionBar
in which to search for the specifiedILcdAction
orILcyActiveSettable
. Should not benull
.- Returns:
- The
ILcdAction
orILcyActiveSettable
for the given ID if it could be found,null
otherwise.
-
findWrapperAction
Searches for the
ILcdAction
corresponding to the givenaAction
in the givenaActionBar
.This method either returns
.aAction
itself, a proxy action that delegates its behaviour toaAction
, or null if no such actions could be found- Parameters:
aAction
- AnILcdAction
for which to search. Should not benull
.aActionBar
- TheILcyActionBar
in which to search for the specifiedILcdAction
. Should not benull
.- Returns:
- The
ILcdAction
for the given aAction if it could be found,null
otherwise.
-
findWrapperActiveSettable
public static ILcyActiveSettable findWrapperActiveSettable(ILcyActiveSettable aActiveSettable, ILcyActionBar aActionBar) Searches for the
ILcyActiveSettable
corresponding to the givenaActiveSettable
in the givenaActionBar
.This method either returns
.aActiveSettable
itself, a proxy active settable that delegates its behaviour toaActiveSettable
, or null if no such active settables could be found- Parameters:
aActiveSettable
- AnILcyActiveSettable
for which to search. Should not benull
.aActionBar
- TheILcyActionBar
in which to search for the specifiedILcyActiveSettable
. Should not benull
.- Returns:
- The
ILcyActiveSettable
for the given aActiveSettable if it could be found,null
otherwise.
-
removeFromConfiguredActionBars
public static void removeFromConfiguredActionBars(ILcdAction aAction, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aProperties) Removes the given action from all the action bars in which it would have been inserted by
insertInConfiguredActionBars(ILcdAction, Object, TLcyActionBarManager, ALcyProperties)
.- Parameters:
aAction
- The action to remove from the configured action bars. It must not benull
. It must have a unique ID as value for theID_KEY
key. This ID is used to retrieve the configured action bars (e.g. 'menuBar', 'toolBar'), as specified ingetConfiguredActionBarIDs
.aContext
- The context for the action bars. If this context isnull
, the global context is used. Refer to theTLcyActionBarManager
for more details about contexts.aActionBarManager
- TheTLcyActionBarManager
that should be used to retrieve the action bars. One can be retrieved usingILcyLucyEnv.getUserInterfaceManager().getActionBarManager()
.aProperties
- TheALcyProperties
instance containing the configuration of the actions. Can for example be parsed from a file like this:new TLcyStringPropertiesCodec().decode("myConfigFile.cfg")
-
removeFromConfiguredActionBars
public static void removeFromConfiguredActionBars(ILcyActiveSettable aActiveSettable, Object aContext, TLcyActionBarManager aActionBarManager, ALcyProperties aProperties) Removes the given active settable from all the action bars in which it would have been inserted by
insertInConfiguredActionBars(ILcyActiveSettable, Object, TLcyActionBarManager, ALcyProperties)
.- Parameters:
aActiveSettable
- The active settable to remove from the configured action bars. It must not benull
. It must have a unique ID as value for theID_KEY
key. This ID is used to retrieve the configured action bars (e.g. 'menuBar', 'toolBar'), as specified ingetConfiguredActionBarIDs
.aContext
- The context for the action bars. If this context isnull
, the global context is used. Refer to theTLcyActionBarManager
for more details about contexts.aActionBarManager
- TheTLcyActionBarManager
that should be used to retrieve the action bars. One can be retrieved usingILcyLucyEnv.getUserInterfaceManager().getActionBarManager()
.aProperties
- TheALcyProperties
instance containing the configuration of the actions. Can for example be parsed from a file like this:new TLcyStringPropertiesCodec().decode("myConfigFile.cfg")
-
TLcyActionBarMediatorBuilder
class