Class AbstractDwcControl

java.lang.Object
org.dwcj.controls.AbstractControl
org.dwcj.controls.AbstractDwcControl
All Implemented Interfaces:
Control, Enableable, HasAttribute, HasClassName, HasComputedStyle, HasControlText, HasDestroy, HasStyle, HasTooltip, HasVisibility
Direct Known Subclasses:
AbstractDwcjPanel, AbstractDwclistControl, Button, CheckBox, ColorPicker, DateEditBox, FileChooser, FontChooser, GridExWidget, HtmlContainer, HtmlEdit, ImageControl, Label, MenuButton, MenuItem, Navigator, NumericBox, OpenFileDialog, PopupMenu, PrintPreview, ProgressBar, RadioButton, ScrollBar, Slider, StringEditBox, TabControl, TextArea, TextBox, TreeView

public abstract class AbstractDwcControl extends AbstractControl implements HasAttribute, HasControlText, HasComputedStyle, HasClassName, HasStyle, Enableable, HasTooltip, HasVisibility
The base class for most DWC/BBj controls. Extends the AbstractControl class, and implements default behaviors for the implemented interface methods.
  • Field Details

    • STR_EXPANSE

      public static final String STR_EXPANSE
      See Also:
    • STR_THEME

      public static final String STR_THEME
      See Also:
    • BASISNUMBER_1

      protected static final com.basis.util.common.BasisNumber BASISNUMBER_1
    • BASISNUMBER_25

      protected static final com.basis.util.common.BasisNumber BASISNUMBER_25
    • BASISNUMBER_250

      protected static final com.basis.util.common.BasisNumber BASISNUMBER_250
    • readOnly

      protected Boolean readOnly
    • focusable

      protected Boolean focusable
    • tabTraversable

      protected Boolean tabTraversable
    • textAlignment

      protected TextAlignable.Alignment textAlignment
    • horizontalScrollBarPosition

      protected Integer horizontalScrollBarPosition
    • verticalScrollBarPosition

      protected Integer verticalScrollBarPosition
    • mouseWheelCondition

      protected HasMouseWheelCondition.MouseWheelCondition mouseWheelCondition
    • textHighlight

      protected TextHighlightable.Highlight textHighlight
  • Constructor Details

    • AbstractDwcControl

      public AbstractDwcControl()
  • Method Details

    • getAttribute

      public String getAttribute(String attribute)
      Description copied from interface: HasAttribute
      retrieve the value of the given attribute
      Specified by:
      getAttribute in interface HasAttribute
      Parameters:
      attribute - the key/name of the attribute
      Returns:
      the value
    • setAttribute

      public AbstractDwcControl setAttribute(String attribute, String value)
      set the value for an attribute in the control
      Specified by:
      setAttribute in interface HasAttribute
      Parameters:
      attribute - the name of the attribute
      value - the value to be set
      Returns:
      the control itself
    • getText

      public String getText()
      Description copied from interface: HasControlText
      get the text property of the control
      Specified by:
      getText in interface HasControlText
      Returns:
      the text
    • setText

      public AbstractDwcControl 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
      Returns:
      the control itself
    • getComputedStyle

      public String getComputedStyle(String property)
      Description copied from interface: HasComputedStyle
      Returns a String containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.
      Specified by:
      getComputedStyle in interface HasComputedStyle
      Returns:
      String containing all computed styles
    • addClassName

      public AbstractDwcControl 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
      Returns:
      The control itself
    • removeClassName

      public AbstractDwcControl 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
      Returns:
      The control itself
    • setStyle

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

      public Boolean isEnabled()
      Specified by:
      isEnabled in interface Enableable
      Returns:
      if control is enabled (=true) or disabled (=false)
    • setEnabled

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

      public String getTooltipText()
      Description copied from interface: HasTooltip
      get the tooltip text property of the control
      Specified by:
      getTooltipText in interface HasTooltip
      Returns:
      the tooltip text
    • setTooltipText

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

      public Boolean isVisible()
      Specified by:
      isVisible in interface HasVisibility
      Returns:
      if control is visible (=true) or invisible (=false)
    • setVisible

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

      protected void setControlTheme(Enum<?> theme)
    • setControlExpanse

      protected void setControlExpanse(Enum<?> expanse)
    • catchUp

      protected void catchUp() throws IllegalAccessException
      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 AbstractControl
      Throws:
      IllegalAccessException - - thrown if an attempt is made to call this method more than once
    • destroy

      public void destroy()
      Description copied from interface: HasDestroy
      Destroy the control and remove it from the panel
      Specified by:
      destroy in interface HasDestroy
      Overrides:
      destroy in class AbstractControl