Class AbstractControl

java.lang.Object
org.dwcj.controls.AbstractControl
All Implemented Interfaces:
Control, HasDestroy
Direct Known Subclasses:
AbstractDwcControl

public abstract class AbstractControl extends Object implements Control, HasDestroy
Abstract base class for all engine controls. Implements default behaviors for the implemented interface methods. Extended by AbstractDwcControl.
  • Field Details

    • ctrl

      protected com.basis.bbj.proxies.sysgui.BBjControl ctrl
    • elementId

      protected String elementId
    • userData

      protected final Map<String,Object> userData
    • destroyed

      protected Boolean destroyed
  • Constructor Details

    • AbstractControl

      public AbstractControl()
  • Method Details

    • create

      protected void create(AbstractDwcjPanel p)
      Create the object on a panel p. The preferred way of creating an object is using the Panel::add(Control) method, instead of this
      Parameters:
      p - the panel to add this control on
    • getId

      public String getId()
      Description copied from interface: Control
      Returns the control's ID
      Specified by:
      getId in interface Control
      Returns:
      Control's ID
    • setId

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

      public Object getUserData(String key)
      Description copied from interface: Control
      Allows user to fetch extraneous, user-included information from the control
      Specified by:
      getUserData in interface Control
      Returns:
      Desired piece of user data
    • setUserData

      public AbstractControl setUserData(String key, Object data)
      Description copied from interface: Control
      Allows user to include extraneous information in the control
      Specified by:
      setUserData in interface Control
      Parameters:
      key - Key of the data
      data - Desired piece of information
      Returns:
      The control itself
    • getCaughtUp

      public Boolean getCaughtUp()
    • 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
      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
    • isDestroyed

      public Boolean isDestroyed()
      Description copied from interface: HasDestroy
      Returns whether or not the control is destroyed
      Specified by:
      isDestroyed in interface HasDestroy
      Returns:
      True if the control will is destroyed, false otherwise