|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ephox.editlive.custom.ActionController
public class ActionController
Central point for managing menubar and toolbar items from the configuration file. Menu items and toolbar buttons are both
created referencing an EphoxAction
- see AbstractButton.setAction(Action)
for more details on Action / Button interaction.
Action instances are unique, so changing one action will automatically update any menu items or toolbar buttons that reference it.
Action instances are indexed using the name from the configuration file. Valid actions that can be accessed are:
Instance available via ELJBean.getActionController()
.
NOTE: Methods on this class must not be called before the editor has finished loading.
Method Summary | |
---|---|
EphoxAction |
getAction(Map<String,String> map)
Get an action and override existing settings. |
EphoxAction |
getAction(String name)
Get the action with the specified name. |
EphoxAction |
getToolbarFromConfigItem(ConfigItem configItem)
Creates an EphoxAction containing all items for a given toolbar in EphoxAction.getSubItems() . |
EphoxAction |
updateAction(String name,
Map<String,?> actionSettings)
Populate an action from a map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public EphoxAction getAction(String name)
name
- the name of the action to retrieve.
EphoxAction
matching name or null
if no action is defined with that name.public EphoxAction getAction(Map<String,String> map)
map
- Action definition to search for and update
null
if no Action matches the name specified in the mappublic EphoxAction updateAction(String name, Map<String,?> actionSettings)
If the name refers to a valid action, this calls Action.putValue(String, Object)
for each item in the map and then returns the action.
This differs from getAction(Map)
in that everything in the map is passed to the Action, not just valid custom settings.
name
- Action to updateactionSettings
- Map of settings to put in the action
null
if no action is defined with that namepublic EphoxAction getToolbarFromConfigItem(ConfigItem configItem)
EphoxAction.getSubItems()
.
Useful for passing to ToolbarFactory.createInlineToolbar(EphoxAction,boolean)
.
configItem
- Configuration reference for the parent "toolbar" or "inlineToolbar" configuration element
EphoxAction
instance, or null if configItem
does not reference a toolbar
|
Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |