|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.data.BaseModelData
com.extjs.gxt.ui.client.data.BaseModel
public class BaseModel
Models are generic data structures that notify listeners when
changed. The structure allows a form of 'introspection' as all property names
and values can be queried and retrieved at runtime.
All events fired by the model will bubble to all parents.
Model objects implement Serializable and can therefore be used
with GWT RPC. A model's children are not marked transient and will be passed
in remote procedure calls.
ChangeListener,
Serializable,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource |
|---|
Add, Remove, Update |
| Constructor Summary | |
|---|---|
BaseModel()
Creates a new base model. |
|
BaseModel(java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a new base model. |
|
| Method Summary | ||
|---|---|---|
void |
addChangeListener(ChangeListener... listener)
Adds a listener to receive change events. |
|
void |
addChangeListener(java.util.List<ChangeListener> listeners)
Adds the listeners to receive change events. |
|
void |
notify(ChangeEvent evt)
Notifies listeners of the given change event. |
|
|
remove(java.lang.String name)
Removes the named property from this model instance. |
|
void |
removeChangeListener(ChangeListener... listener)
Removes a previously added change listener. |
|
void |
removeChangeListeners()
Removes all change listeners. |
|
|
set(java.lang.String name,
X value)
Sets the property and fires an Update event. |
|
void |
setSilent(boolean silent)
Sets whether change events are fired. |
|
| Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData |
|---|
get, get, getProperties, getPropertyNames, isAllowNestedValues, setAllowNestedValues, setProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData |
|---|
get, getProperties, getPropertyNames |
| Constructor Detail |
|---|
public BaseModel()
public BaseModel(java.util.Map<java.lang.String,java.lang.Object> properties)
properties - the initial values| Method Detail |
|---|
public void addChangeListener(ChangeListener... listener)
addChangeListener in interface ChangeEventSourcelistener - the listener to be addedpublic void addChangeListener(java.util.List<ChangeListener> listeners)
listeners - the listeners to addpublic void notify(ChangeEvent evt)
ChangeEventSource
notify in interface ChangeEventSourceevt - the change eventpublic <X> X remove(java.lang.String name)
ModelData
remove in interface ModelDataremove in class BaseModelDataname - the property name
public void removeChangeListener(ChangeListener... listener)
removeChangeListener in interface ChangeEventSourcelistener - the listener to be removedpublic void removeChangeListeners()
ChangeEventSource
removeChangeListeners in interface ChangeEventSource
public <X> X set(java.lang.String name,
X value)
BaseModelData
set in interface ModelDataset in class BaseModelDataname - the property namevalue - the property value
public void setSilent(boolean silent)
ChangeEventSource
setSilent in interface ChangeEventSourcesilent - true to disable change event, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||