|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseEvent
com.extjs.gxt.ui.client.mvc.AppEvent
public class AppEvent
AppEvents
are used to pass messages between
Controllers
and Views
. All events have a specific
type which are used to identify the event. Typically, applications will
define all application events in a constants class.
Constructor Summary | |
---|---|
AppEvent(EventType type)
Creates a new application event. |
|
AppEvent(EventType type,
java.lang.Object data)
Creates a new application event. |
|
AppEvent(EventType type,
java.lang.Object data,
java.lang.String token)
Creates a new application event. |
Method Summary | ||
---|---|---|
|
getData()
Returns the application specified data. |
|
|
getData(java.lang.String key)
Returns the application defined property for the given name, or null if it has not been set. |
|
java.lang.String |
getToken()
Returns the history token. |
|
boolean |
isHistoryEvent()
Returns true if the event is a history event. |
|
void |
setData(java.lang.Object data)
Sets the application defined data. |
|
void |
setData(java.lang.String key,
java.lang.Object data)
Sets the application defined property with the given name. |
|
void |
setHistoryEvent(boolean historyEvent)
True to create a history item for this event when passed through the dispatcher (defaults to false). |
|
void |
setToken(java.lang.String token)
The optional history token (defaults to null). |
|
java.lang.String |
toString()
|
Methods inherited from class com.extjs.gxt.ui.client.event.BaseEvent |
---|
getSource, getType, isCancelled, setCancelled, setSource, setType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AppEvent(EventType type)
type
- the event typepublic AppEvent(EventType type, java.lang.Object data)
type
- the event typedata
- the datapublic AppEvent(EventType type, java.lang.Object data, java.lang.String token)
type
- the event typedata
- the event datatoken
- the history tokenMethod Detail |
---|
public <X> X getData()
X
- the data type
public <X> X getData(java.lang.String key)
null
if it has not been set.
key
- the name of the property
null
if it has not been setpublic java.lang.String getToken()
public boolean isHistoryEvent()
public void setData(java.lang.Object data)
data
- the datapublic void setData(java.lang.String key, java.lang.Object data)
key
- the name of the propertydata
- the new value for the propertypublic void setHistoryEvent(boolean historyEvent)
historyEvent
- true for a history eventpublic void setToken(java.lang.String token)
token
- the history tokenpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |