|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.ListView<M>
public class ListView<M extends ModelData>
A mechanism for displaying data using custom layout templates. ListView uses
an XTemplate as its internal templating mechanism.
setItemSelector(String) must
be provided for the ListView to determine what nodes it will be working
with.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ListView()
Creates a new view. |
|
ListView(ListStore<M> store)
Creates a new view. |
|
ListView(ListStore<M> store,
XTemplate template)
Creates a new template list. |
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.Element |
findElement(com.google.gwt.user.client.Element element)
Returns the matching element. |
int |
findElementIndex(com.google.gwt.user.client.Element element)
Returns the element's index. |
java.lang.String |
getDisplayProperty()
Returns the display property. |
com.google.gwt.user.client.Element |
getElement(int index)
Returns the element at the given index. |
java.util.List<com.google.gwt.user.client.Element> |
getElements()
Returns all of the child elements. |
int |
getItemCount()
Returns the number of models in the view. |
java.lang.String |
getItemSelector()
Returns the item selector. |
java.lang.String |
getLoadingText()
Returns the view's loading text. |
ModelProcessor<M> |
getModelProcessor()
Returns the model processor. |
java.lang.String |
getOverStyle()
Returns the over style. |
ListViewSelectionModel<M> |
getSelectionModel()
Returns the view's selection model. |
boolean |
getSelectOnOver()
Returns true if select on hover is enabled. |
java.lang.String |
getSelectStyle()
Returns the select style. |
ListStore<M> |
getStore()
Returns the combo's store. |
XTemplate |
getTemplate()
Returns the list's template. |
int |
indexOf(com.google.gwt.user.client.Element element)
Returns the index of the element. |
void |
moveSelectedDown()
Moves the current selections down one level. |
void |
moveSelectedUp()
Moves the current selections up one level. |
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
void |
refresh()
Refreshes the view by reloading the data from the store and re-rendering the template. |
void |
refreshNode(int index)
Refreshes an individual node's data from the store. |
void |
setDisplayProperty(java.lang.String displayProperty)
Sets the display property. |
void |
setItemSelector(java.lang.String itemSelector)
This is a required setting. |
void |
setLoadingText(java.lang.String loadingText)
Sets the text loading text to be displayed during a load request. |
void |
setModelProcessor(ModelProcessor<M> modelProcessor)
Sets the view's model processor. |
void |
setOverStyle(java.lang.String overStyle)
Sets the style name to apply on mouse over. |
void |
setSelectionModel(ListViewSelectionModel<M> sm)
Sets the selection model. |
void |
setSelectOnOver(boolean selectOnHover)
True to select the item when mousing over a element (defaults to false). |
void |
setSelectStyle(java.lang.String selectStyle)
The style to be applied to each selected item (defaults to 'x-view-item-sel'). |
void |
setSimpleTemplate(java.lang.String html)
Sets the template fragment to be used for the text of each listview item. |
void |
setStore(ListStore<M> store)
Changes the data store bound to this view and refreshes it. |
void |
setTemplate(java.lang.String html)
Sets the view's template. |
void |
setTemplate(XTemplate template)
Sets the view's template. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListView()
public ListView(ListStore<M> store)
public ListView(ListStore<M> store,
XTemplate template)
template - the template| Method Detail |
|---|
public com.google.gwt.user.client.Element findElement(com.google.gwt.user.client.Element element)
element - the element or any child element
public int findElementIndex(com.google.gwt.user.client.Element element)
element - the element or any child element
public java.lang.String getDisplayProperty()
public com.google.gwt.user.client.Element getElement(int index)
index - the index
public java.util.List<com.google.gwt.user.client.Element> getElements()
public int getItemCount()
public java.lang.String getItemSelector()
public java.lang.String getLoadingText()
public ModelProcessor<M> getModelProcessor()
public java.lang.String getOverStyle()
public ListViewSelectionModel<M> getSelectionModel()
public boolean getSelectOnOver()
public java.lang.String getSelectStyle()
public ListStore<M> getStore()
public XTemplate getTemplate()
public int indexOf(com.google.gwt.user.client.Element element)
element - the element
public void moveSelectedDown()
public void moveSelectedUp()
public void onComponentEvent(ComponentEvent ce)
ComponentComponent.onBrowserEvent(com.google.gwt.user.client.Event) method
should not be overridden or modified.
onComponentEvent in class Componentce - the base eventpublic void refresh()
public void refreshNode(int index)
index - the items data index in the storepublic void setDisplayProperty(java.lang.String displayProperty)
displayProperty - the display propertypublic void setItemSelector(java.lang.String itemSelector)
itemSelector - the item selectorpublic void setLoadingText(java.lang.String loadingText)
loadingText - the loading textpublic void setModelProcessor(ModelProcessor<M> modelProcessor)
modelProcessor - ModelProcessorpublic void setOverStyle(java.lang.String overStyle)
overStyle - the over stylepublic void setSelectionModel(ListViewSelectionModel<M> sm)
sm - the selection modelpublic void setSelectOnOver(boolean selectOnHover)
selectOnHover - true to select on mouse overpublic void setSelectStyle(java.lang.String selectStyle)
selectStyle - the select stylepublic void setSimpleTemplate(java.lang.String html)
<code>
listview.setSimpleTemplate("{abbr} {name}");
</code>
html - the html used only for the text of each item in the listpublic void setStore(ListStore<M> store)
store - the store to bind this viewpublic void setTemplate(java.lang.String html)
html - the HTML fragmentpublic void setTemplate(XTemplate template)
template - the template
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||