com.extjs.gxt.ui.client.widget
クラス DataView

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<T>
                      extended by com.extjs.gxt.ui.client.widget.ScrollContainer<DataViewItem>
                          extended by com.extjs.gxt.ui.client.widget.DataView
すべての実装インターフェース:
Observable, Selectable<DataViewItem>, com.google.gwt.user.client.EventListener

public class DataView
extends ScrollContainer<DataViewItem>
implements Selectable<DataViewItem>

A mechanism for displaying data using custom layout templates. DataView uses an Template as its internal templating mechanism.

A itemSelector MUST be provided for the DataView to determine what nodes it will be working with.

Events:
BeforeAdd : DataViewEvent(view, item, index)
Fires before an item is added or inserted. Listeners can set the doit field to false to cancel the action.
BeforeRemove : DataViewEvent(view, item)
Fires before an item is removed. Listeners can set the doit field to false to cancel the action.
Add : DataViewEvent(view, item, index)
Fires after an item has been added or inserted.
Remove : DataViewEvent(view, item)
Fires after an item has been removed.
SelectionChange : DataViewEvent(view, selected)
Fires after the selection changes.
ContextMenu : DataViewEvent(view)
Fires before the view's context menu is shown. Listeners can set the doit field to false to cancel the action.


入れ子クラス 概要
 class DataView.DataViewSelectionModel
          Data view selection model.
 
クラス com.google.gwt.user.client.ui.UIObject から継承された入れ子クラス/インタフェース
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたフィールド(Fields)
DEBUG_ID_PREFIX
 
コンストラクタ 概要
DataView()
          Creates a new data view.
DataView(Template template)
          Creates a new data view with the given template.
 
メソッド 概要
 boolean add(DataViewItem component)
          Adds a item to the container.
 DataViewBinder getBinder()
          Returns the view's binder.
 Menu getContextMenu()
          Returns the component's context menu.
 java.lang.String getDefaultTemplate()
          Returns the default template.
 java.lang.String getItemSelector()
          Returns the item selector.
 java.lang.String getOverStyle()
          Returns the over style.
 DataViewItem getSelectedItem()
          Returns the selected item.
 java.util.List<DataViewItem> getSelectedItems()
          Returns the selected items.
 Style.SelectionMode getSelectionMode()
          Returns the view's selection mode.
 DataView.DataViewSelectionModel 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.
 Template getTemplate()
          Returns the view's template.
 boolean insert(DataViewItem item, int index)
          Addss a item into the container.
 void onComponentEvent(ComponentEvent ce)
          Any events a component receives will be forwarded to this method.
 void onSelectChange(DataViewItem item, boolean select)
          Called when the visual state of a item is changed.
 boolean remove(DataViewItem component)
          Removes the item from the container.
 void setContextMenu(Menu menu)
          Sets the component's context menu.
 void setDefaultTemplate(java.lang.String defaultTemplate)
          Sets the default template.
 void setItemSelector(java.lang.String itemSelector)
          This is a required setting.
 void setOverStyle(java.lang.String overStyle)
          Sets the style name to be applied on mouse over (defaults to 'x-view-item-over').
 void setSelectedItem(DataViewItem item)
          Selects the item.
 void setSelectedItems(java.util.List<DataViewItem> items)
          Selects the items.
 void setSelectionMode(Style.SelectionMode mode)
          Sets the list's selection mode.
 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 setStore(ListStore store)
          Convenience method that create a new DataViewBinder using the given store.
 void setTemplate(java.lang.String html)
          Sets the view's template.
 void setTemplate(Template template)
          Sets the view's template.
 
クラス com.extjs.gxt.ui.client.widget.ScrollContainer から継承されたメソッド
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition
 
クラス com.extjs.gxt.ui.client.widget.Container から継承されたメソッド
findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, removeAll, scrollIntoView
 
クラス com.extjs.gxt.ui.client.widget.BoxComponent から継承されたメソッド
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth
 
クラス com.extjs.gxt.ui.client.widget.Component から継承されたメソッド
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString
 
クラス com.google.gwt.user.client.ui.Widget から継承されたメソッド
getParent, isAttached
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたメソッド
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタ 詳細

DataView

public DataView()
Creates a new data view.


DataView

public DataView(Template template)
Creates a new data view with the given template.

パラメータ:
template - the template
メソッド 詳細

add

public boolean add(DataViewItem component)
Description copied from class: Container
Adds a item to the container. Fires the BeforeAdd event before inserting, then fires the Add event after the widget has been inserted.

パラメータ:
component - the item to be added

getBinder

public DataViewBinder getBinder()
Returns the view's binder. Only applies when set setStore(ListStore) is used.

戻り値:
the binder

getContextMenu

public Menu getContextMenu()
Description copied from class: Component
Returns the component's context menu. This method is marked protected, subclasses can change access to public to expose the contenxt menu.

戻り値:
the context menu

getDefaultTemplate

public java.lang.String getDefaultTemplate()
Returns the default template.

戻り値:
the default template

getItemSelector

public java.lang.String getItemSelector()
Returns the item selector.

戻り値:
the selector

getOverStyle

public java.lang.String getOverStyle()
Returns the over style.

戻り値:
the over style

getSelectedItem

public DataViewItem getSelectedItem()
Description copied from interface: Selectable
Returns the selected item.

Specified by:
getSelectedItem in interface Selectable<DataViewItem>
戻り値:
the selected item

getSelectedItems

public java.util.List<DataViewItem> getSelectedItems()
Description copied from interface: Selectable
Returns the selected items. For single-select, the last selected item is returned.

Specified by:
getSelectedItems in interface Selectable<DataViewItem>
戻り値:
the selected items

getSelectionMode

public Style.SelectionMode getSelectionMode()
Returns the view's selection mode.

戻り値:
the selection mode.

getSelectionModel

public DataView.DataViewSelectionModel getSelectionModel()
Returns the view's selection model.

戻り値:
the selection model

getSelectOnOver

public boolean getSelectOnOver()
Returns true if select on hover is enabled.

戻り値:
the select on hover state

getSelectStyle

public java.lang.String getSelectStyle()
Returns the select style.

戻り値:
the select style

getTemplate

public Template getTemplate()
Returns the view's template.

戻り値:
the template

insert

public boolean insert(DataViewItem item,
                      int index)
Description copied from class: Container
Addss a item into the container. Fires the BeforeAdd event before inserting, then fires the Add event after the widget has been inserted.

パラメータ:
item - the item to insert
index - the insert location

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

オーバーライド:
onComponentEvent in class ScrollContainer<DataViewItem>
パラメータ:
ce - the base event

onSelectChange

public void onSelectChange(DataViewItem item,
                           boolean select)
Description copied from interface: Selectable
Called when the visual state of a item is changed.

Specified by:
onSelectChange in interface Selectable<DataViewItem>
パラメータ:
item - the item
select - the select state

remove

public boolean remove(DataViewItem component)
Description copied from class: Container
Removes the item from the container. Fires the BeforeRemove event before removing, then fires the Remove event after the widget has been removed.

パラメータ:
component - the item to remove
戻り値:
true if the item was removed

setContextMenu

public void setContextMenu(Menu menu)
Description copied from class: Component
Sets the component's context menu.

パラメータ:
menu - the context menu

setDefaultTemplate

public void setDefaultTemplate(java.lang.String defaultTemplate)
Sets the default template.

パラメータ:
defaultTemplate - the default template

setItemSelector

public void setItemSelector(java.lang.String itemSelector)
This is a required setting. A simple CSS selector (e.g. div.some-class or span:first-child) that will be used to determine what nodes this DataView will be working with (defaults to 'x-view-item').

パラメータ:
itemSelector - the item selector

setOverStyle

public void setOverStyle(java.lang.String overStyle)
Sets the style name to be applied on mouse over (defaults to 'x-view-item-over').

パラメータ:
overStyle - the over style

setSelectedItem

public void setSelectedItem(DataViewItem item)
Description copied from interface: Selectable
Selects the item. Any existing selections are cleared.

Specified by:
setSelectedItem in interface Selectable<DataViewItem>
パラメータ:
item - the item to select

setSelectedItems

public void setSelectedItems(java.util.List<DataViewItem> items)
Description copied from interface: Selectable
Selects the items. Only the first item is selected for single-select. Any existing selections are cleared.

Specified by:
setSelectedItems in interface Selectable<DataViewItem>
パラメータ:
items - the items to select

setSelectionMode

public void setSelectionMode(Style.SelectionMode mode)
Sets the list's selection mode.

パラメータ:
mode - the selection mode

setSelectOnOver

public void setSelectOnOver(boolean selectOnHover)
True to select the item when mousing over a element (defaults to false).

パラメータ:
selectOnHover - true to select on mouse over

setSelectStyle

public void setSelectStyle(java.lang.String selectStyle)
The style to be applied to each selected item (defaults to 'x-view-item-sel').

パラメータ:
selectStyle - the select style

setStore

public void setStore(ListStore store)
Convenience method that create a new DataViewBinder using the given store.

パラメータ:
store - the store

setTemplate

public void setTemplate(java.lang.String html)
Sets the view's template.

パラメータ:
html - the HTML fragment

setTemplate

public void setTemplate(Template template)
Sets the view's template.

パラメータ:
template - the template