Class HtmlEdit

All Implemented Interfaces:
Control, Enableable, Focusable, HasAttribute, HasClassName, HasComputedStyle, HasControlText, HasDestroy, HasStyle, HasTooltip, HasVisibility, TabTraversable

public final class HtmlEdit extends AbstractDwcControl implements Focusable, TabTraversable
  • Constructor Details

    • HtmlEdit

      public HtmlEdit()
  • Method Details

    • create

      protected void create(AbstractDwcjPanel p)
      Description copied from class: AbstractControl
      Create the object on a panel p. The preferred way of creating an object is using the Panel::add(Control) method, instead of this
      Overrides:
      create in class AbstractControl
      Parameters:
      p - the panel to add this control on
    • getAllToolbarStyles

      public List<String> getAllToolbarStyles()
      This method returns a List of strings that specifies all available styles in the HtmlEdit toolbar.
      Returns:
      List of strings that specifies all available styles in the HtmlEdit toolbar.
    • getAvailableSpellCheckLanguages

      public List<String> getAvailableSpellCheckLanguages()
      This method returns the list of available spell-check languages for a HtmlEdit control.
      Returns:
      Returns a List of strings of available spell-check languages for a HtmlEdit control.
    • getAvailableStates

      public List<String> getAvailableStates()
      This method returns a List of strings that specifies all available editor states in the HTMLEditor toolbar.
      Returns:
      Returns a list of strings that specifies all available editor stattes in the HTMLEditor toolbar.
    • isBasicToolbar

      public boolean isBasicToolbar()
      This method returns a boolean that indicates whether this HtmlEdit control is currently set to use a basic toolbar.
      Returns:
      Returns a boolean that indicates whether this HtmlEdit control is currently set to use a basic toolbar .
    • getBasicToolbarStyles

      public List<String> getBasicToolbarStyles()
      This method returns a List of strings that specifies the styles to be included when the HtmlEdit basic toolbar is selected.
      Returns:
      Returns a List of strings that specifies the styles to be included when the HtmlEdit basic toolbar is selected.
    • getClientType

      public String getClientType()
      This method returns a string representing the client type for this HTMLEdit control.
      Returns:
      Returns a string representing the client type for the HtmlEdit control ("Browser" (BUI or DWC), "Swing" (basic HTML 3.2), "JavaFX" (WebKit), "Chromium").
    • getClientVersion

      public String getClientVersion()
      This method returns the client version for this BBjHtmlEdit control.
      Returns:
      Returns the version of the HtmlEdit control - the client versions will change over time.
    • getLocale

      public String getLocale()
      This method returns the UI locale of an HTMLEdit control.
      Returns:
      A string representing the UI locale of the HTMLEdit control.
    • getLocales

      public List<String> getLocales()
      This method returns the list of available UI Locales for an HTMLEdit control.
      Returns:
      a List of strings representing the available UI locales for an HTMLEdit control.
    • getPlainText

      public String getPlainText()
      This method returns the plain text content of an HTMLEditor control, without any HTML markup.
      Returns:
      A string representing only the plaintext content of the HTML control.
    • getSpellCheckLanguage

      public String getSpellCheckLanguage()
      This method returns the spell-check language of an HTMLEdit control.
      Returns:
      A string representing the spell-check language of an HTMLEdit control.
    • getState

      public boolean getState(String state)
      This method returns the Boolean value of a specified state in the HtmlEdit toolbar.
      Parameters:
      state - specifying one of the state names from HTMLEdit::getAvailableStates
      Returns:
      Boolean value of the specified state in the HtmlEdit toolbar.
    • isSpellChecked

      public boolean isSpellChecked()
      This method returns a boolean that indicates whether spell-checking is currently enabled on this HTMLEdit control.
      Returns:
      a boolean representing whether or not spell-check is enabled on this control.
    • setBasicToolbar

      public HtmlEdit setBasicToolbar(boolean basicToolbar)
      This method specifies whether this HTMLEdit control should use a basic toolbar
      Parameters:
      basicToolbar - - Boolean representing whether or not to use a basic toolbar, true for yes, false for no
      Returns:
      Returns this
    • setBasicToolbarStyles

      public HtmlEdit setBasicToolbarStyles(List<String> styles)
      This method specifies the styles to be included when the HTMLEdit basic toolbar is used
      Parameters:
      styles - - A List of styles to be shown when the basic toolbar is selected, should be an array of Strings
      Returns:
      Returns this
    • setLocale

      public HtmlEdit setLocale(String locale)
      Sets the UI locale of the HTMLEdit control
      Parameters:
      locale - - A String representing the locale you wish to set the HTMLEdit to.
      Returns:
      Returns this
    • setPlainText

      public HtmlEdit setPlainText(String text)
      Sets the text of an HtmlEdit control
      Parameters:
      text - - A String representing the text you wish to set.
      Returns:
      Returns this
    • setState

      public HtmlEdit setState(String state, boolean value)
      Sets a specified state in the HtmlEdit toolbar to the specified boolean value
      Parameters:
      state - - One of the state names from HtmlEdit::getAvailableStates()
      value - - Boolean value - true activates the specified state while false deactivates it. The null() method toggles it. Empty parameter is assumed null()
      Returns:
      Returns this
    • setSpellChecked

      public HtmlEdit setSpellChecked(boolean spellChecked)
      Specifies whether or not spell checking should be enabled in this HtmlEdit control
      Parameters:
      spellChecked - - boolean value - true enables spell checking, false disables it.
      Returns:
      Returns this
    • setSpellCheckLanguage

      public HtmlEdit setSpellCheckLanguage(String language)
      Sets the spell check language for this HtmlEdit control.
      Parameters:
      language - - String representing the desired language for spell checking
      Returns:
      Returns this
    • isFocusable

      public Boolean isFocusable()
      Description copied from interface: Focusable
      isFocusable returns a value indicating whether or not the user can focus the control. Note: A focused control is the control to which keyboard interaction is directed. Typically, the focused control is indicated visually, often via a dotted grey border. A control which is not focusable, therefore, cannot be manipulated via the keyboard. It is still possible to interact with a non-focusable control via the mouse.
      Specified by:
      isFocusable in interface Focusable
      Returns:
      True if object can be focused, False if not.
    • setFocusable

      public HtmlEdit setFocusable(Boolean focusable)
      Description copied from interface: Focusable
      setFocusable sets whether a control can be focused. Note: A focused control is the control to which keyboard interaction is directed. Typically, the focused control is indicated visually, often via a dotted grey border. A control which is not focusable, therefore, cannot be manipulated via the keyboard. It is still possible to interact with a non-focusable control via the mouse. To disable all interaction, including the mouse, see setEnabled() and setReadOnly().
      Specified by:
      setFocusable in interface Focusable
      Parameters:
      focusable - Boolean True for allowing focusing, False to disable focus
      Returns:
      Object itself
    • isTabTraversable

      public Boolean isTabTraversable()
      Description copied from interface: TabTraversable
      Returns a boolean indicating whether or not the user can navigate to the control using the tab key.
      Specified by:
      isTabTraversable in interface TabTraversable
      Returns:
      True if user can navigate to control with Tab key, False if not
    • setTabTraversable

      public HtmlEdit setTabTraversable(Boolean traversable)
      Description copied from interface: TabTraversable
      Sets whether or not the user can navigate to the control using the tab key.
      Specified by:
      setTabTraversable in interface TabTraversable
      Parameters:
      traversable - Boolean dictating tab traversal. True if control can be navigated to with Tab, False if not.
      Returns:
      The control itself
    • setText

      public HtmlEdit setText(String text)
      Description copied from interface: HasControlText
      set the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at all
      Specified by:
      setText in interface HasControlText
      Overrides:
      setText in class AbstractDwcControl
      Returns:
      the control itself
    • setVisible

      public HtmlEdit setVisible(Boolean visible)
      Description copied from interface: HasVisibility
      Set whether the control is visible or invisible
      Specified by:
      setVisible in interface HasVisibility
      Overrides:
      setVisible in class AbstractDwcControl
      Returns:
      the control itself
    • setEnabled

      public HtmlEdit setEnabled(Boolean enabled)
      Description copied from interface: Enableable
      Set whether the control is to be enabled
      Specified by:
      setEnabled in interface Enableable
      Overrides:
      setEnabled in class AbstractDwcControl
      Returns:
      the control itself
    • setTooltipText

      public HtmlEdit setTooltipText(String text)
      Description copied from interface: HasTooltip
      Set the tooltip text of the control
      Specified by:
      setTooltipText in interface HasTooltip
      Overrides:
      setTooltipText in class AbstractDwcControl
      Returns:
      the control itself
    • setAttribute

      public HtmlEdit setAttribute(String attribute, String value)
      Description copied from class: AbstractDwcControl
      set the value for an attribute in the control
      Specified by:
      setAttribute in interface HasAttribute
      Overrides:
      setAttribute in class AbstractDwcControl
      Parameters:
      attribute - the name of the attribute
      value - the value to be set
      Returns:
      the control itself
    • setId

      public HtmlEdit setId(String elementId)
      Description copied from interface: Control
      Assigns the ID of a control
      Specified by:
      setId in interface Control
      Overrides:
      setId in class AbstractControl
      Parameters:
      elementId - Desired ID designation
      Returns:
      The control itself
    • setStyle

      public HtmlEdit setStyle(String property, String value)
      Description copied from interface: HasStyle
      Assigns specified value to the specified CSS property
      Specified by:
      setStyle in interface HasStyle
      Overrides:
      setStyle in class AbstractDwcControl
      Parameters:
      property - The CSS property to be changed
      value - The value of the selected CSS property
      Returns:
      The control itself
    • addClassName

      public HtmlEdit addClassName(String selector)
      Description copied from interface: HasClassName
      Adds a CSS class to the list of CSS classes for the control.
      Specified by:
      addClassName in interface HasClassName
      Overrides:
      addClassName in class AbstractDwcControl
      Returns:
      The control itself
    • removeClassName

      public HtmlEdit removeClassName(String selector)
      Description copied from interface: HasClassName
      Removes a CSS class from the list of CSS classes for the control.
      Specified by:
      removeClassName in interface HasClassName
      Overrides:
      removeClassName in class AbstractDwcControl
      Returns:
      The control itself
    • setExpanse

      public HtmlEdit setExpanse(HtmlEdit.Expanse expanse)
    • catchUp

      protected void catchUp() throws IllegalAccessException
      Description copied from class: AbstractDwcControl
      The catchUp method is used to replay attributes and settings that the API user might have added to a control before its creation. A control is not created before it's added to a panel. Anything that is added between instantiation of a control and its addition to a panel has to be recorded and replayed in this method
      Overrides:
      catchUp in class AbstractDwcControl
      Throws:
      IllegalAccessException - - thrown if an attempt is made to call this method more than once