com.smartgwt.client.core
Class BaseClass

java.lang.Object
  extended by com.smartgwt.client.core.BaseClass
Direct Known Subclasses:
DataSource, RecordList, SimpleType, Tree, ValuesManager

public abstract class BaseClass
extends Object


Field Summary
protected  JavaScriptObject config
           
protected  String id
           
protected  String scClassName
           
 
Constructor Summary
  BaseClass()
           
protected BaseClass(JavaScriptObject jsObj)
           
 
Method Summary
protected abstract  JavaScriptObject create()
           
 void destroy()
          Destroy this object.
protected
<H extends EventHandler>
HandlerRegistration
doAddHandler(H handler, GwtEvent.Type<H> type)
           
protected  void error(String message)
           
protected  void error(String attribute, String value, boolean allowPostCreate)
           
protected  void errorIfNotCreated(String property)
           
 void fireEvent(GwtEvent<?> event)
           
protected  String getAttribute(String attribute)
           
protected  Boolean getAttributeAsBoolean(String property)
           
protected  Date getAttributeAsDate(String property)
           
protected  Double getAttributeAsDouble(String property)
           
protected  Element getAttributeAsElement(String property)
           
protected  Float getAttributeAsFloat(String property)
           
protected  Integer getAttributeAsInt(String property)
           
protected  JavaScriptObject getAttributeAsJavaScriptObject(String property)
           
protected  String getAttributeAsString(String property)
           
 JavaScriptObject getConfig()
           
 int getHandlerCount(GwtEvent.Type<?> type)
           
 String getID()
          Return the ID
 JavaScriptObject getJsObj()
           
 JavaScriptObject getOrCreateJsObj()
           
static BaseClass getRef(JavaScriptObject jsObj)
           
 boolean isCreated()
           
protected  void onInit()
           
protected  void setAttribute(String attribute, BaseClass[] value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, boolean value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, Boolean value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, DataClass[] value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, DataClass value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, Date value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, double value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, Element value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, int[] value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, int value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, Map value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, String[] value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, String value, boolean allowPostCreate)
           
protected  void setAttribute(String attribute, ValueEnum[] value, boolean allowPostCreate)
           
 void setID(String id)
           
 void setProperty(String property, boolean value)
           
 void setProperty(String property, double value)
           
 void setProperty(String property, JavaScriptObject value)
           
 void setProperty(String property, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id

config

protected JavaScriptObject config

scClassName

protected String scClassName
Constructor Detail

BaseClass

public BaseClass()

BaseClass

protected BaseClass(JavaScriptObject jsObj)
Method Detail

getID

public String getID()
Return the ID

Returns:
the ID

setID

public void setID(String id)

getConfig

public JavaScriptObject getConfig()

isCreated

public boolean isCreated()

getJsObj

public JavaScriptObject getJsObj()

getOrCreateJsObj

public JavaScriptObject getOrCreateJsObj()

getRef

public static BaseClass getRef(JavaScriptObject jsObj)

destroy

public void destroy()
Destroy this object.


error

protected void error(String attribute,
                     String value,
                     boolean allowPostCreate)
              throws IllegalStateException
Throws:
IllegalStateException

errorIfNotCreated

protected void errorIfNotCreated(String property)
                          throws IllegalStateException
Throws:
IllegalStateException

error

protected void error(String message)
              throws IllegalStateException
Throws:
IllegalStateException

create

protected abstract JavaScriptObject create()

onInit

protected void onInit()

getAttribute

protected String getAttribute(String attribute)

getAttributeAsString

protected String getAttributeAsString(String property)

getAttributeAsDate

protected Date getAttributeAsDate(String property)

getAttributeAsInt

protected Integer getAttributeAsInt(String property)

getAttributeAsDouble

protected Double getAttributeAsDouble(String property)

getAttributeAsElement

protected Element getAttributeAsElement(String property)

getAttributeAsJavaScriptObject

protected JavaScriptObject getAttributeAsJavaScriptObject(String property)

getAttributeAsFloat

protected Float getAttributeAsFloat(String property)

getAttributeAsBoolean

protected Boolean getAttributeAsBoolean(String property)

setAttribute

protected void setAttribute(String attribute,
                            String value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            Boolean value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            Map value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            int[] value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            BaseClass[] value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            DataClass[] value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            double value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            int value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            Date value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            ValueEnum[] value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            DataClass value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            JavaScriptObject value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            String[] value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            boolean value,
                            boolean allowPostCreate)

setAttribute

protected void setAttribute(String attribute,
                            Element value,
                            boolean allowPostCreate)

setProperty

public void setProperty(String property,
                        String value)

setProperty

public void setProperty(String property,
                        boolean value)

setProperty

public void setProperty(String property,
                        double value)

setProperty

public void setProperty(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)