public abstract class BaseWidget extends com.google.gwt.user.client.ui.Widget implements com.google.gwt.event.shared.HasHandlers, LogicalStructure
Modifier and Type | Field and Description |
---|---|
protected com.google.gwt.core.client.JavaScriptObject |
config |
protected boolean |
configOnly |
protected boolean |
factoryCreated |
protected java.util.Map<java.lang.String,java.lang.Object> |
factoryProperties |
protected java.lang.String |
id |
NativeObject |
nativeObject |
protected java.lang.String |
scClassName |
Constructor and Description |
---|
BaseWidget() |
BaseWidget(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addDrawHandler(DrawHandler handler) |
void |
applyFactoryProperties() |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
void |
destroy()
Permanently destroy a Canvas and all of it's children / members, recursively.
|
protected <H extends com.google.gwt.event.shared.EventHandler> |
doAddHandler(H handler,
com.google.gwt.event.shared.GwtEvent.Type<H> type)
Adds this handler to the widget.
|
protected void |
doInit() |
void |
doOnRender(Function function) |
void |
draw()
Draws the widget on the page.
|
boolean |
equals(java.lang.Object obj) |
protected void |
error(java.lang.String message) |
protected void |
errorIfNotCreated(java.lang.String property) |
java.lang.String |
getAttribute(java.lang.String attribute) |
protected java.lang.Boolean |
getAttributeAsBoolean(java.lang.String property) |
protected java.util.Date |
getAttributeAsDate(java.lang.String property) |
protected java.util.Date[] |
getAttributeAsDateArray(java.lang.String property) |
protected java.lang.Double |
getAttributeAsDouble(java.lang.String property) |
protected com.google.gwt.user.client.Element |
getAttributeAsElement(java.lang.String property) |
protected java.lang.Float |
getAttributeAsFloat(java.lang.String property) |
protected java.lang.Float[] |
getAttributeAsFloatArray(java.lang.String property) |
protected java.lang.Integer |
getAttributeAsInt(java.lang.String property) |
protected int[] |
getAttributeAsIntArray(java.lang.String property) |
protected com.google.gwt.core.client.JavaScriptObject |
getAttributeAsJavaScriptObject(java.lang.String property) |
protected java.util.Map |
getAttributeAsMap(java.lang.String property) |
protected Record |
getAttributeAsRecord(java.lang.String property) |
protected 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.
|
com.google.gwt.core.client.JavaScriptObject |
getConfig() |
com.google.gwt.user.client.Element |
getDOM() |
int |
getHandlerCount(com.google.gwt.event.shared.GwtEvent.Type<?> type) |
java.lang.String |
getID() |
java.lang.String |
getInnerHTML()
Return the inner HTML for this canvas.
|
com.google.gwt.core.client.JavaScriptObject |
getJsObj() |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure() |
com.google.gwt.core.client.JavaScriptObject |
getOrCreateJsObj() |
static BaseWidget |
getRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getScClassName()
Get the name of the underlying SmartClient class
|
java.lang.String |
getTitle() |
static boolean |
hasAutoAssignedID(com.google.gwt.core.client.JavaScriptObject jsObj) |
int |
hashCode() |
void |
initNativeObject() |
protected void |
internalSetID(com.google.gwt.core.client.JavaScriptObject jsObj) |
protected void |
internalSetID(java.lang.String id,
boolean autoAssigned) |
boolean |
isConfigOnly() |
boolean |
isCreated() |
protected java.lang.Boolean |
isDrawn() |
boolean |
isFactoryCreated() |
protected void |
onBind() |
protected void |
onDestroy() |
protected void |
onDraw() |
protected void |
onInit() |
protected void |
setAttribute(java.lang.String attribute,
BaseClass[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
BaseWidget[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
BaseWidget value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.lang.Boolean value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
DataClass[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
DataClass value,
boolean allowPostCreate) |
protected 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,
double value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
com.google.gwt.user.client.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) |
protected void |
setAttribute(java.lang.String attribute,
float value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
int[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.lang.Integer value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
com.google.gwt.core.client.JavaScriptObject[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
com.google.gwt.core.client.JavaScriptObject value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.util.Map value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.lang.Object[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.lang.String[] value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
java.lang.String value,
boolean allowPostCreate) |
protected void |
setAttribute(java.lang.String attribute,
ValueEnum value,
boolean allowPostCreate) |
void |
setConfig(com.google.gwt.core.client.JavaScriptObject config) |
void |
setConfigOnly(boolean configOnly) |
protected boolean |
setDragTracker() |
void |
setFactoryCreated(boolean createdByBeanFactory) |
void |
setHtmlElement(com.google.gwt.user.client.Element element) |
void |
setID(java.lang.String id) |
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.core.LogicalStructureObject s) |
void |
setNullProperty(java.lang.String property) |
void |
setPosition(java.lang.String position) |
void |
setProperty(java.lang.String property,
boolean value) |
void |
setProperty(java.lang.String property,
double value) |
void |
setProperty(java.lang.String property,
com.google.gwt.user.client.Element value) |
void |
setProperty(java.lang.String property,
float value) |
void |
setProperty(java.lang.String property,
int value) |
void |
setProperty(java.lang.String property,
com.google.gwt.core.client.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.
|
void |
setTitle(java.lang.String title) |
java.lang.String |
toString() |
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent
protected java.lang.String id
protected com.google.gwt.core.client.JavaScriptObject config
protected java.lang.String scClassName
protected boolean configOnly
protected java.util.Map<java.lang.String,java.lang.Object> factoryProperties
protected boolean factoryCreated
public NativeObject nativeObject
public void setFactoryCreated(boolean createdByBeanFactory)
public boolean isFactoryCreated()
protected final <H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration doAddHandler(H handler, com.google.gwt.event.shared.GwtEvent.Type<H> type)
H
- the type of handler to addtype
- the event typehandler
- the handlerHandlerRegistration
used to remove the handlerpublic int getHandlerCount(com.google.gwt.event.shared.GwtEvent.Type<?> type)
getHandlerCount
in class com.google.gwt.user.client.ui.Widget
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
public static BaseWidget getRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static boolean hasAutoAssignedID(com.google.gwt.core.client.JavaScriptObject jsObj)
public java.lang.String getClassName()
public java.lang.String getScClassName()
public void setScClassName(java.lang.String scClassName)
scClassName
- the SmartClient classprotected final void doInit()
protected void onInit()
protected void onBind()
public boolean isConfigOnly()
public void setConfigOnly(boolean configOnly)
protected boolean setDragTracker()
public java.lang.String getInnerHTML()
Note : Canvas.setRedrawOnResize(java.lang.Boolean)
should be set to true for components whose inner HTML
will not automatically reflow to fit the component's new size.
public void draw()
public void destroy()
Like Canvas.clear()
calling destroy()
removes all HTML for the component;
unlike clear(), a destroyed Canvas is permanently unusable: it cannot be draw()'n again and
cannot be referenced by its global ID. This method also removes all JavaScript references to
the Canvas outside of application code, making it eligible for garbage collection (though
developers will need to release any references to the canvas held in application code themselves).
Any attempt to call a method on a destroyed Canvas will generally result in an error. If your
application is forced to hold onto Canvas's that might be destroy()d without warning, you can
avoid errors by checking for the Canvas.getDestroyed()
property. If you override certain Canvas
methods, your code may be called while a Canvas is being destroy()d; in this case you can avoid
extra work (and possibly errors) by checking for the +Canvas.getDestroying()
property.
Note that destroy()
should not be called directly in event handling code for this
canvas. For this reason, wherever possible we recommend using Canvas.markForDestroy()
instead of calling this method directly.
Note: This is an override point
public void doOnRender(Function function)
public com.google.gwt.event.shared.HandlerRegistration addDrawHandler(DrawHandler handler)
protected void onDraw()
protected void onDestroy()
public void setPosition(java.lang.String position)
public void setHtmlElement(com.google.gwt.user.client.Element element)
public com.google.gwt.user.client.Element getDOM()
public java.lang.String getID()
protected final void internalSetID(com.google.gwt.core.client.JavaScriptObject jsObj)
protected final void internalSetID(java.lang.String id, boolean autoAssigned)
public void setID(java.lang.String id)
public com.google.gwt.core.client.JavaScriptObject getConfig()
public void setConfig(com.google.gwt.core.client.JavaScriptObject config)
public boolean isCreated()
protected java.lang.Boolean isDrawn()
public com.google.gwt.core.client.JavaScriptObject getJsObj()
public com.google.gwt.core.client.JavaScriptObject getOrCreateJsObj()
protected com.google.gwt.core.client.JavaScriptObject create()
public void applyFactoryProperties()
public java.lang.String getAttribute(java.lang.String attribute)
protected java.lang.String getAttributeAsString(java.lang.String property)
protected java.lang.String[] getAttributeAsStringArray(java.lang.String property)
protected int[] getAttributeAsIntArray(java.lang.String property)
protected java.lang.Float[] getAttributeAsFloatArray(java.lang.String property)
protected java.util.Date getAttributeAsDate(java.lang.String property)
protected java.util.Date[] getAttributeAsDateArray(java.lang.String property)
protected java.lang.Integer getAttributeAsInt(java.lang.String property)
protected java.lang.Double getAttributeAsDouble(java.lang.String property)
protected com.google.gwt.user.client.Element getAttributeAsElement(java.lang.String property)
protected com.google.gwt.core.client.JavaScriptObject getAttributeAsJavaScriptObject(java.lang.String property)
protected java.lang.Float getAttributeAsFloat(java.lang.String property)
protected java.lang.Boolean getAttributeAsBoolean(java.lang.String property)
protected java.util.Map getAttributeAsMap(java.lang.String property)
protected Record getAttributeAsRecord(java.lang.String property)
protected void errorIfNotCreated(java.lang.String property) throws java.lang.IllegalStateException
java.lang.IllegalStateException
protected void error(java.lang.String message) throws java.lang.IllegalStateException
java.lang.IllegalStateException
protected void setAttribute(java.lang.String attribute, java.lang.String value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, ValueEnum value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, BaseWidget value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.util.Map value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, int[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, float[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, double[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.lang.Float[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, DataClass value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, DataClass[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, com.google.gwt.core.client.JavaScriptObject[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, BaseClass[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, BaseWidget[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, float value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, double value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.lang.Integer value, boolean allowPostCreate)
public void setNullProperty(java.lang.String property)
public void setProperty(java.lang.String property, java.lang.String value)
public void setProperty(java.lang.String property, boolean value)
public void setProperty(java.lang.String property, int value)
public void setProperty(java.lang.String property, float value)
public void setProperty(java.lang.String property, double value)
public void setProperty(java.lang.String property, com.google.gwt.user.client.Element value)
public void setProperty(java.lang.String property, com.google.gwt.core.client.JavaScriptObject value)
protected void setAttribute(java.lang.String attribute, java.util.Date value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, com.google.gwt.core.client.JavaScriptObject value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.lang.String[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.lang.Object[] value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, java.lang.Boolean value, boolean allowPostCreate)
protected void setAttribute(java.lang.String attribute, com.google.gwt.user.client.Element value, boolean allowPostCreate)
public void setTitle(java.lang.String title)
setTitle
in class com.google.gwt.user.client.ui.UIObject
public java.lang.String getTitle()
getTitle
in class com.google.gwt.user.client.ui.UIObject
public java.lang.String toString()
toString
in class com.google.gwt.user.client.ui.UIObject
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.core.LogicalStructureObject s)
setLogicalStructure
in interface LogicalStructure
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure
in interface LogicalStructure
public void initNativeObject()
initNativeObject
in interface LogicalStructure