Class ToolbarConfiguration

java.lang.Object
org.eclipse.nebula.widgets.richtext.toolbar.ToolbarConfiguration

@Deprecated
public class ToolbarConfiguration
extends java.lang.Object
Deprecated.
Use the more general RichTextEditorConfiguration
The 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() and getRemoveButtonConfiguration()

Note: A ToolbarConfiguration instance is directly connected to the Browser instance of the editor. It can therefore not be re-used for multiple RichTextEditor instances.

  • Field Summary

    Fields 
    Modifier and Type Field Description
    boolean removeFormat
    Deprecated.
    Configure whether to remove format combo box from the toolbar.
    boolean removePasteFromWord
    Deprecated.
    Configure whether to remove the paste from word button from the toolbar.
    boolean removePasteText
    Deprecated.
    Configure whether to remove the paste text button from the toolbar.
    boolean removeStyles
    Deprecated.
    Configure whether to remove the styles combo box from the toolbar.
    boolean toolbarCollapsible
    Deprecated.
    Configure if the toolbar should be collapsible.
    boolean toolbarInitialExpanded
    Deprecated.
    Configure if the toolbar should be initially expanded.
  • Constructor Summary

    Constructors 
    Constructor Description
    ToolbarConfiguration()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    void addDefaultToolbarButton​(java.lang.String buttonName)
    Deprecated.
    Adds the CKEditor default button for the given name to the toolbar.
    void addToolbarButton​(ToolbarButton button)
    Deprecated.
    Adds a custom button to the CKEditor toolbar.
    void addToolbarButton​(ToolbarButton button, org.eclipse.swt.browser.BrowserFunction function)
    Deprecated.
    Adds a custom button to the CKEditor toolbar.
    void configureToolbar()
    Deprecated.
    Configures the toolbar of the CKEditor based on the configurations applied in this ToolbarConfiguration.
    void dispose()
    Deprecated.
    Dispose the registered BrowserFunctions.
    org.eclipse.swt.browser.Browser getBrowser()
    Deprecated.
     
    java.util.Map<java.lang.String,​org.eclipse.swt.browser.BrowserFunction> getButtonCallbacks()
    Deprecated.
     
    protected java.lang.String getCustomButtonConfiguration()
    Deprecated.
     
    java.util.Set<ToolbarButton> getCustomButtons()
    Deprecated.
     
    protected java.lang.String getRemoveButtonConfiguration()
    Deprecated.
     
    java.util.Set<java.lang.String> getRemovedButtons()
    Deprecated.
     
    java.lang.String[] getToolbarButtonConfigurations()
    Deprecated.
     
    protected java.lang.String getToolbarGroupConfiguration()
    Deprecated.
     
    void removeDefaultToolbarButton​(java.lang.String buttonName)
    Deprecated.
    Removes the CKEditor default button for the given name from the toolbar.
    void removeToolbarButton​(ToolbarButton button)
    Deprecated.
    Removes the given ToolbarButton from the local list of custom toolbar buttons.
    void setBrowser​(org.eclipse.swt.browser.Browser browser)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • removePasteText

      public boolean removePasteText
      Deprecated.
      Configure whether to remove the paste text button from the toolbar. Default is true.
    • removePasteFromWord

      public boolean removePasteFromWord
      Deprecated.
      Configure whether to remove the paste from word button from the toolbar. Default is true.
    • removeStyles

      public boolean removeStyles
      Deprecated.
      Configure whether to remove the styles combo box from the toolbar. Default is true.
    • removeFormat

      public boolean removeFormat
      Deprecated.
      Configure whether to remove format combo box from the toolbar. Default is true.
    • toolbarCollapsible

      public boolean toolbarCollapsible
      Deprecated.
      Configure if the toolbar should be collapsible. Default is false.
    • toolbarInitialExpanded

      public boolean toolbarInitialExpanded
      Deprecated.
      Configure if the toolbar should be initially expanded. Is only interpreted if toolbarCollapsible is set to true. Default is true.
  • Constructor Details

  • Method Details

    • configureToolbar

      public void configureToolbar()
      Deprecated.
      Configures the toolbar of the CKEditor based on the configurations applied in this ToolbarConfiguration.
    • 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 anonymous BrowserFunction that executes ToolbarButton.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 given BrowserFunction via callback on pressing the button.
      Parameters:
      button - The button to add.
      function - The BrowserFunction that should be called on pressing the button.
    • removeToolbarButton

      public void removeToolbarButton​(ToolbarButton button)
      Deprecated.
      Removes the given ToolbarButton from the local list of custom toolbar buttons.
      Parameters:
      button - The ToolbarButton to 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 registered BrowserFunctions.
    • getBrowser

      public org.eclipse.swt.browser.Browser getBrowser()
      Deprecated.
      Returns:
      The Browser instance to which this ToolbarConfiguration is connected to.
    • setBrowser

      public void setBrowser​(org.eclipse.swt.browser.Browser browser)
      Deprecated.
      Parameters:
      browser - The Browser instance to which this ToolbarConfiguration should 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.