com.smartgwt.client.core

## Class BaseClass

- java.lang.Object
- - com.smartgwt.client.core.BaseClass

- Direct Known Subclasses:
    CellSelection, DataSource, DrawItem, EditContext, EditProxy, HiddenPalette, JSONEncoder, ProcessElement, RecordList, SchemaSet, SimpleType, SyntaxHiliter, TextSettings, ValuesManager, WebService

      public abstract class BaseClass
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JavaScriptObject` | `config`
    `protected boolean` | `factoryCreated`
    `protected java.util.Map<java.lang.String,java.lang.Object>` | `factoryProperties`
    `protected java.lang.String` | `id`
    `protected java.lang.String` | `scClassName`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `BaseClass()`
    `protected` | `BaseClass(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyFactoryProperties()`
    `static <T extends BaseClass> T` | `asSGWTComponent(JavaScriptObject jsObj)` Returns the existing SGWT component, or creates and returns one if none exist, associated with the supplied `JavaScriptObject`.
    `protected abstract JavaScriptObject` | `create()`
    `protected JavaScriptObject` | `createJsObj()`
    `void` | `destroy()` Destroy this object.
    `protected <H extends EventHandler> HandlerRegistration` | `doAddHandler(H handler, GwtEvent.Type<H> type)`
    `protected void` | `doInit()`
    `protected void` | `error(java.lang.String message)`
    `protected void` | `error(java.lang.String attribute, java.lang.String value, boolean allowPostCreate)`
    `protected void` | `errorIfNotCreated(java.lang.String property)`
    `void` | `fireEvent(GwtEvent<?> event)`
    `java.lang.String` | `getAttribute(java.lang.String attribute)`
    `java.lang.Boolean` | `getAttributeAsBoolean(java.lang.String property)`
    `java.util.Date` | `getAttributeAsDate(java.lang.String property)`
    `java.lang.Double` | `getAttributeAsDouble(java.lang.String property)`
    `Element` | `getAttributeAsElement(java.lang.String property)`
    `java.lang.Float` | `getAttributeAsFloat(java.lang.String property)`
    `java.lang.Integer` | `getAttributeAsInt(java.lang.String property)`
    `JavaScriptObject` | `getAttributeAsJavaScriptObject(java.lang.String property)`
    `java.util.Map` | `getAttributeAsMap(java.lang.String property)`
    `java.lang.String` | `getAttributeAsString(java.lang.String property)`
    `protected java.lang.String[]` | `getAttributeAsStringArray(java.lang.String property)`
    `java.lang.String` | `getClassName()` Returns the javascript class name.
    `JavaScriptObject` | `getConfig()`
    `int` | `getHandlerCount(GwtEvent.Type<?> type)`
    `java.lang.String` | `getID()` Return the ID
    `JavaScriptObject` | `getJsObj()`
    `JavaScriptObject` | `getOrCreateJsObj()`
    `static BaseClass` | `getRef(JavaScriptObject jsObj)`
    `java.lang.String` | `getScClassName()` Get the name of the underlying SmartClient class
    `protected BaseClass` | `getTestInstance()`
    `static boolean` | `hasAutoAssignedID(JavaScriptObject jsObj)`
    `protected void` | `internalSetID(JavaScriptObject jsObj)`
    `protected void` | `internalSetID(java.lang.String id, boolean autoAssigned)`
    `boolean` | `isCreated()`
    `boolean` | `isFactoryCreated()`
    `protected void` | `onBind()`
    `protected void` | `onInit()`
    `protected void` | `registerID(java.lang.String id, boolean skipUniqueJSIdentifierCheck)`
    `void` | `setAttribute(java.lang.String attribute, BaseClass[] value, boolean allowPostCreate)`
    `protected void` | `setAttribute(java.lang.String attribute, boolean value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.lang.Boolean value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, DataClass[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, DataClass value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.util.Date value, boolean allowPostCreate)`
    `protected void` | `setAttribute(java.lang.String attribute, double[] value, boolean allowPostCreate)`
    `protected void` | `setAttribute(java.lang.String attribute, java.lang.Double[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, double value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, Element value, boolean allowPostCreate)`
    `protected void` | `setAttribute(java.lang.String attribute, float[] value, boolean allowPostCreate)`
    `protected void` | `setAttribute(java.lang.String attribute, java.lang.Float[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, int[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, int value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.lang.Integer[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, JavaScriptObject value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.util.Map value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.lang.String[] value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, java.lang.String value, boolean allowPostCreate)`
    `void` | `setAttribute(java.lang.String attribute, ValueEnum[] value, boolean allowPostCreate)`
    `void` | `setConfig(JavaScriptObject config)`
    `void` | `setFactoryCreated(boolean createdByBeanFactory)`
    `void` | `setID(java.lang.String id)`
    `void` | `setJavaScriptObject(JavaScriptObject jsObj)`
    `void` | `setProperty(java.lang.String property, boolean value)`
    `void` | `setProperty(java.lang.String property, double value)`
    `void` | `setProperty(java.lang.String property, JavaScriptObject value)`
    `void` | `setProperty(java.lang.String property, java.lang.String value)`
    `void` | `setScClassName(java.lang.String scClassName)` Set the name of the underlying SmartClient class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### factoryProperties

          protected java.util.Map<java.lang.String,java.lang.Object> factoryProperties

    - #### factoryCreated

          protected boolean factoryCreated

    - #### id

          protected java.lang.String id

    - #### config

          protected JavaScriptObject config

    - #### scClassName

          protected java.lang.String scClassName

  - ### Constructor Detail

    - #### BaseClass

          public BaseClass()

    - #### BaseClass

          protected BaseClass(JavaScriptObject jsObj)

  - ### Method Detail

    - #### applyFactoryProperties

          public void applyFactoryProperties()

    - #### setFactoryCreated

          public void setFactoryCreated(boolean createdByBeanFactory)

    - #### isFactoryCreated

          public boolean isFactoryCreated()

    - #### getTestInstance

          protected BaseClass getTestInstance()

    - #### setJavaScriptObject

          public void setJavaScriptObject(JavaScriptObject jsObj)

    - #### getID

          public java.lang.String getID()

      Return the ID
      Returns:
        the ID

    - #### registerID

          protected void registerID(java.lang.String id,
                        boolean skipUniqueJSIdentifierCheck)

    - #### internalSetID

          protected void internalSetID(JavaScriptObject jsObj)

    - #### internalSetID

          protected void internalSetID(java.lang.String id,
                           boolean autoAssigned)

    - #### setID

          public void setID(java.lang.String id)

    - #### getClassName

          public java.lang.String getClassName()

      Returns the javascript class name.
      Returns:

    - #### getScClassName

          public java.lang.String getScClassName()

      Get the name of the underlying SmartClient class
      Returns:
        the SmartClient class name

    - #### setScClassName

          public void setScClassName(java.lang.String scClassName)

      Set the name of the underlying SmartClient class. This is an advanced setting.
      Parameters:
        `scClassName` - the SmartClient class

    - #### getConfig

          public JavaScriptObject getConfig()

    - #### setConfig

          public void setConfig(JavaScriptObject config)

    - #### isCreated

          public boolean isCreated()

    - #### getJsObj

          public JavaScriptObject getJsObj()

    - #### createJsObj

          protected JavaScriptObject createJsObj()

    - #### getOrCreateJsObj

          public JavaScriptObject getOrCreateJsObj()

    - #### getRef

          public static BaseClass getRef(JavaScriptObject jsObj)

    - #### hasAutoAssignedID

          public static boolean hasAutoAssignedID(JavaScriptObject jsObj)

    - #### asSGWTComponent

          public static <T extends BaseClass> T asSGWTComponent(JavaScriptObject jsObj)

      Returns the existing SGWT component, or creates and returns one if none exist, associated with the supplied `JavaScriptObject`. If the supplied object is not representable as a SGWT component descended from BaseClass, or if this method is not capable of creating the SGWT wrapper, a warning will be logged and null returned. In the latter case, you must call asSGWTComponent on a more specific class (e.g. `ResultSet.asSGWTComponent`), or if no such method exists, simply build the wrapper with new, supplying the `JavaScriptObject`.
      Parameters:
        `jsObj` - SmartClient component whose wrapper is wanted
      Returns:
        wrapping SGWT component (instance of BaseClass-descended class) or null

    - #### destroy

          public void destroy()

      Destroy this object.

    - #### error

          protected void error(java.lang.String attribute,
                   java.lang.String value,
                   boolean allowPostCreate)
                        throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`

    - #### errorIfNotCreated

          protected void errorIfNotCreated(java.lang.String property)
                                    throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`

    - #### error

          protected void error(java.lang.String message)
                        throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`

    - #### create

          protected abstract JavaScriptObject create()

    - #### doInit

          protected final void doInit()

    - #### onInit

          protected void onInit()

    - #### onBind

          protected void onBind()

    - #### getAttribute

          public java.lang.String getAttribute(java.lang.String attribute)

    - #### getAttributeAsString

          public java.lang.String getAttributeAsString(java.lang.String property)

    - #### getAttributeAsDate

          public java.util.Date getAttributeAsDate(java.lang.String property)

    - #### getAttributeAsInt

          public java.lang.Integer getAttributeAsInt(java.lang.String property)

    - #### getAttributeAsDouble

          public java.lang.Double getAttributeAsDouble(java.lang.String property)

    - #### getAttributeAsElement

          public Element getAttributeAsElement(java.lang.String property)

    - #### getAttributeAsJavaScriptObject

          public JavaScriptObject getAttributeAsJavaScriptObject(java.lang.String property)

    - #### getAttributeAsFloat

          public java.lang.Float getAttributeAsFloat(java.lang.String property)

    - #### getAttributeAsBoolean

          public java.lang.Boolean getAttributeAsBoolean(java.lang.String property)

    - #### getAttributeAsStringArray

          protected java.lang.String[] getAttributeAsStringArray(java.lang.String property)

    - #### getAttributeAsMap

          public java.util.Map getAttributeAsMap(java.lang.String property)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.lang.String value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.lang.Boolean value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.util.Map value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          int[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.lang.Integer[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          BaseClass[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          DataClass[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          double value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          int value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.util.Date value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          ValueEnum[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          DataClass value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          JavaScriptObject value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          java.lang.String[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          protected void setAttribute(java.lang.String attribute,
                          float[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          protected void setAttribute(java.lang.String attribute,
                          java.lang.Float[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          protected void setAttribute(java.lang.String attribute,
                          double[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          protected void setAttribute(java.lang.String attribute,
                          java.lang.Double[] value,
                          boolean allowPostCreate)

    - #### setAttribute

          protected void setAttribute(java.lang.String attribute,
                          boolean value,
                          boolean allowPostCreate)

    - #### setAttribute

          public void setAttribute(java.lang.String attribute,
                          Element value,
                          boolean allowPostCreate)

    - #### setProperty

          public void setProperty(java.lang.String property,
                         java.lang.String value)

    - #### setProperty

          public void setProperty(java.lang.String property,
                         boolean value)

    - #### setProperty

          public void setProperty(java.lang.String property,
                         double value)

    - #### setProperty

          public void setProperty(java.lang.String property,
                         JavaScriptObject value)

    - #### fireEvent

          public void fireEvent(GwtEvent<?> event)

    - #### doAddHandler

          protected final <H extends EventHandler> HandlerRegistration doAddHandler(H handler,
                                                                  GwtEvent.Type<H> type)

    - #### getHandlerCount

          public int getHandlerCount(GwtEvent.Type<?> type)