Class ToolbarConfiguration
- java.lang.Object
-
- org.eclipse.nebula.widgets.richtext.toolbar.ToolbarConfiguration
-
@Deprecated public class ToolbarConfiguration extends java.lang.ObjectDeprecated.Use the more generalRichTextEditorConfigurationThe toolbar configuration of the CKEditor toolbar. Contains the default toolbar configuration via toolbar groups and gives the ability to dynamically add/remove custom buttons.To customize the CKEditor buttons shown in the toolbar, you need to override
getToolbarGroupConfiguration()andgetRemoveButtonConfiguration()Note: A
ToolbarConfigurationinstance is directly connected to theBrowserinstance of the editor. It can therefore not be re-used for multipleRichTextEditorinstances.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.browser.BrowserbrowserDeprecated.private java.util.Map<java.lang.String,org.eclipse.swt.browser.BrowserFunction>buttonCallbacksDeprecated.private java.util.Set<ToolbarButton>customButtonsDeprecated.private java.util.Set<java.lang.String>removedButtonsDeprecated.booleanremoveFormatDeprecated.Configure whether to remove format combo box from the toolbar.booleanremovePasteFromWordDeprecated.Configure whether to remove the paste from word button from the toolbar.booleanremovePasteTextDeprecated.Configure whether to remove the paste text button from the toolbar.booleanremoveStylesDeprecated.Configure whether to remove the styles combo box from the toolbar.booleantoolbarCollapsibleDeprecated.Configure if the toolbar should be collapsible.booleantoolbarInitialExpandedDeprecated.Configure if the toolbar should be initially expanded.
-
Constructor Summary
Constructors Constructor Description ToolbarConfiguration()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDefaultToolbarButton(java.lang.String buttonName)Deprecated.Adds the CKEditor default button for the given name to the toolbar.voidaddToolbarButton(ToolbarButton button)Deprecated.Adds a custom button to the CKEditor toolbar.voidaddToolbarButton(ToolbarButton button, org.eclipse.swt.browser.BrowserFunction function)Deprecated.Adds a custom button to the CKEditor toolbar.voidconfigureToolbar()Deprecated.Configures the toolbar of the CKEditor based on the configurations applied in thisToolbarConfiguration.voiddispose()Deprecated.Dispose the registeredBrowserFunctions.org.eclipse.swt.browser.BrowsergetBrowser()Deprecated.java.util.Map<java.lang.String,org.eclipse.swt.browser.BrowserFunction>getButtonCallbacks()Deprecated.protected java.lang.StringgetCustomButtonConfiguration()Deprecated.java.util.Set<ToolbarButton>getCustomButtons()Deprecated.protected java.lang.StringgetRemoveButtonConfiguration()Deprecated.java.util.Set<java.lang.String>getRemovedButtons()Deprecated.java.lang.String[]getToolbarButtonConfigurations()Deprecated.protected java.lang.StringgetToolbarGroupConfiguration()Deprecated.voidremoveDefaultToolbarButton(java.lang.String buttonName)Deprecated.Removes the CKEditor default button for the given name from the toolbar.voidremoveToolbarButton(ToolbarButton button)Deprecated.Removes the givenToolbarButtonfrom the local list of custom toolbar buttons.voidsetBrowser(org.eclipse.swt.browser.Browser browser)Deprecated.
-
-
-
Field Detail
-
removePasteText
public boolean removePasteText
Deprecated.Configure whether to remove the paste text button from the toolbar. Default istrue.
-
removePasteFromWord
public boolean removePasteFromWord
Deprecated.Configure whether to remove the paste from word button from the toolbar. Default istrue.
-
removeStyles
public boolean removeStyles
Deprecated.Configure whether to remove the styles combo box from the toolbar. Default istrue.
-
removeFormat
public boolean removeFormat
Deprecated.Configure whether to remove format combo box from the toolbar. Default istrue.
-
toolbarCollapsible
public boolean toolbarCollapsible
Deprecated.Configure if the toolbar should be collapsible. Default isfalse.
-
toolbarInitialExpanded
public boolean toolbarInitialExpanded
Deprecated.Configure if the toolbar should be initially expanded. Is only interpreted iftoolbarCollapsibleis set totrue. Default istrue.
-
browser
private org.eclipse.swt.browser.Browser browser
Deprecated.
-
customButtons
private java.util.Set<ToolbarButton> customButtons
Deprecated.
-
buttonCallbacks
private java.util.Map<java.lang.String,org.eclipse.swt.browser.BrowserFunction> buttonCallbacks
Deprecated.
-
removedButtons
private java.util.Set<java.lang.String> removedButtons
Deprecated.
-
-
Method Detail
-
configureToolbar
public void configureToolbar()
Deprecated.Configures the toolbar of the CKEditor based on the configurations applied in thisToolbarConfiguration.
-
getToolbarGroupConfiguration
protected java.lang.String getToolbarGroupConfiguration()
Deprecated.- Returns:
- The toolbar group configuration for the CKEditor toolbar.
-
getRemoveButtonConfiguration
protected java.lang.String getRemoveButtonConfiguration()
Deprecated.- Returns:
- The configuration which default buttons should be removed from the toolbar.
-
getCustomButtonConfiguration
protected java.lang.String getCustomButtonConfiguration()
Deprecated.- Returns:
- The configuration for adding custom commands and buttons to the toolbar.
-
addToolbarButton
public void addToolbarButton(ToolbarButton button)
Deprecated.Adds a custom button to the CKEditor toolbar. Internally creates an anonymousBrowserFunctionthat executesToolbarButton.execute()via callback on pressing the button.- Parameters:
button- The button to add.
-
addToolbarButton
public void addToolbarButton(ToolbarButton button, org.eclipse.swt.browser.BrowserFunction function)
Deprecated.Adds a custom button to the CKEditor toolbar. Executes the givenBrowserFunctionvia callback on pressing the button.- Parameters:
button- The button to add.function- TheBrowserFunctionthat should be called on pressing the button.
-
removeToolbarButton
public void removeToolbarButton(ToolbarButton button)
Deprecated.Removes the givenToolbarButtonfrom the local list of custom toolbar buttons.- Parameters:
button- TheToolbarButtonto remove.
-
addDefaultToolbarButton
public void addDefaultToolbarButton(java.lang.String buttonName)
Deprecated.Adds the CKEditor default button for the given name to the toolbar.Note: This works only for buttons that have been removed using
removeDefaultToolbarButton(String)- Parameters:
buttonName- The name of the CKEditor default button to add.
-
removeDefaultToolbarButton
public void removeDefaultToolbarButton(java.lang.String buttonName)
Deprecated.Removes the CKEditor default button for the given name from the toolbar.- Parameters:
buttonName- The name of the CKEditor default button to remove.
-
dispose
public void dispose()
Deprecated.Dispose the registeredBrowserFunctions.
-
getBrowser
public org.eclipse.swt.browser.Browser getBrowser()
Deprecated.- Returns:
- The
Browserinstance to which thisToolbarConfigurationis connected to.
-
setBrowser
public void setBrowser(org.eclipse.swt.browser.Browser browser)
Deprecated.- Parameters:
browser- TheBrowserinstance to which thisToolbarConfigurationshould be connected to.
-
getCustomButtons
public java.util.Set<ToolbarButton> getCustomButtons()
Deprecated.
-
getButtonCallbacks
public java.util.Map<java.lang.String,org.eclipse.swt.browser.BrowserFunction> getButtonCallbacks()
Deprecated.
-
getRemovedButtons
public java.util.Set<java.lang.String> getRemovedButtons()
Deprecated.
-
getToolbarButtonConfigurations
public java.lang.String[] getToolbarButtonConfigurations()
Deprecated.
-
-