| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TOOLBAR_FEATURES
The list of features this controller will attempt to place on the tool bar by default if the configuration
doesn't specify the tool bar features.
|
static String |
TOOLBAR_ROLE
The string used to identify the tool bar extension point.
|
| Constructor and Description |
|---|
ToolBarController(ToolBar toolBar)
Creates a new tool bar controller.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this tool bar controller.
|
void |
fill(Config config,
PluginManager pluginManager)
Fills the tool bar with the features specified in the configuration.
|
List<String> |
split(String toolBar,
PluginManager pluginManager)
Splits a string representing the tool bar feature list into its components, i.e.
|
void |
update(RichTextArea richTextArea,
SyntaxValidator syntaxValidator)
Updates the tool bar state, i.e.
|
public static final String TOOLBAR_ROLE
public static final String DEFAULT_TOOLBAR_FEATURES
public ToolBarController(ToolBar toolBar)
toolBar - the tool bar to be managedpublic void fill(Config config, PluginManager pluginManager)
config - the configuration objectpluginManager - the object used to access the tool bar UIExtensionspublic void update(RichTextArea richTextArea, SyntaxValidator syntaxValidator)
richTextArea - the rich text area whose state is used to determine if a feature must be enabled or disabledsyntaxValidator - the object used to assert if a feature must be enabled or disabled in the current state of
the rich text areapublic List<String> split(String toolBar, PluginManager pluginManager)
toolBar - a string listing the tool bar features separated by ToolBarSeparator.VERTICAL_BAR or
ToolBarSeparator.LINE_BREAKpluginManager - the object used to check which tool bar features are availablepublic void destroy()
Copyright © 2004–2016 XWiki. All rights reserved.