com.github.gwtbootstrap.client.ui
Class DataGrid<T>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.google.gwt.user.cellview.client.AbstractHasData<T>
                  extended by com.google.gwt.user.cellview.client.AbstractCellTable<T>
                      extended by com.google.gwt.user.cellview.client.DataGrid<T>
                          extended by com.github.gwtbootstrap.client.ui.DataGrid<T>
Type Parameters:
T - the data type of each row
All Implemented Interfaces:
HasStyle, IsResponsive, HasAttachHandlers, HasHandlers, HasKeyboardPagingPolicy, HasKeyboardSelectionPolicy, EventListener, Focusable, HasVisibility, IsRenderable, IsWidget, RequiresResize, HasCellPreviewHandlers<T>, HasData<T>, HasKeyProvider<T>, HasRows

public class DataGrid<T>
extends DataGrid<T>
implements HasStyle, IsResponsive

The Bootstrap style DataGrid

Since:
2.0.4.0
Author:
ohashi keisuke

Nested Class Summary
static interface DataGrid.Resources
          Basic GWT-Bootstrap style Table Resource.
static interface DataGrid.SelectableResources
          Selectable GWT-Bootstrap style Table Resource.
static interface DataGrid.SelectableStyle
           
static interface DataGrid.Style
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy
HasKeyboardPagingPolicy.KeyboardPagingPolicy
 
Nested classes/interfaces inherited from interface com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
HasKeyboardSelectionPolicy.KeyboardSelectionPolicy
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DataGrid()
          Constructs a table with a default page size of 50.
DataGrid(int pageSize)
          Constructs a table with the given page size.
DataGrid(int pageSize, DataGrid.Resources resources)
          Constructs a table with the given page size with the specified DataGrid.Resources.
DataGrid(int pageSize, DataGrid.Resources resources, ProvidesKey<T> keyProvider)
          Constructs a table with the given page size, the specified DataGrid.Resources, and the given key provider.
DataGrid(int pageSize, DataGrid.Resources resources, ProvidesKey<T> keyProvider, Widget loadingIndicator)
          Constructs a table with the given page size, the specified DataGrid.Resources, and the given key provider.
DataGrid(int pageSize, ProvidesKey<T> keyProvider)
          Constructs a table with the given page size and the given key provider.
 
Method Summary
 void addStyle(Style style)
          Adds the provided style to the widget.
 void removeStyle(Style style)
          Removes the provided style from the widget.
 void setBordered(boolean bordered)
          set Bordered style
 void setCondensed(boolean condensed)
          set Condensed style
 void setHideOn(Device device)
          Sets the kind of device, this widget is hidden on.
 void setShowOn(Device device)
          Sets the kind of device, this widget is shown on.
 void setStriped(boolean striped)
          set Striped style
 void setStyle(Style style)
          Replaces the widet's style with the provided one.
 
Methods inherited from class com.google.gwt.user.cellview.client.DataGrid
addColumnStyleName, clearTableWidth, doSetColumnWidth, doSetHeaderVisible, getTableBodyElement, getTableFootElement, getTableHeadElement, onLoadingStateChanged, onResize, refreshColumnWidths, removeColumnStyleName, setEmptyTableWidget, setLoadingIndicator, setMinimumTableWidth, setTableWidth
 
Methods inherited from class com.google.gwt.user.cellview.client.AbstractCellTable
addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnSortHandler, clearColumnWidth, convertToElements, dependsOnSelection, doSelection, flush, getChildContainer, getColumn, getColumnCount, getColumnIndex, getColumnSortList, getColumnWidth, getEmptyTableWidget, getKeyboardSelectedElement, getLoadingIndicator, getRowElement, insertColumn, insertColumn, insertColumn, insertColumn, insertColumn, insertColumn, insertColumn, isKeyboardNavigationSuppressed, onBlur, onBrowserEvent2, onFocus, redraw, redrawFooters, redrawHeaders, removeColumn, removeColumn, renderRowValues, replaceAllChildren, resetFocusOnCell, setColumnWidth, setColumnWidth, setKeyboardSelected, setRowStyles, setSelected
 
Methods inherited from class com.google.gwt.user.cellview.client.AbstractHasData
addCellPreviewHandler, addLoadingStateChangeHandler, addRangeChangeHandler, addRowCountChangeHandler, cellConsumesEventType, checkRowBounds, getAccessKey, getDisplayedItem, getDisplayedItems, getKeyboardPagingPolicy, getKeyboardSelectedRow, getKeyboardSelectionPolicy, getKeyProvider, getPageSize, getPageStart, getRowContainer, getRowCount, getSelectionModel, getTabIndex, getValueKey, getVisibleItem, getVisibleItemCount, getVisibleItems, getVisibleRange, isRowCountExact, isRowWithinBounds, onBrowserEvent, onUnload, onUpdateSelection, replaceChildren, setAccessKey, setFocus, setFocusable, setKeyboardPagingPolicy, setKeyboardSelectionPolicy, setPageSize, setPageStart, setRowCount, setRowCount, setRowData, setRowData, setSelectionModel, setSelectionModel, setTabIndex, setVisibleRange, setVisibleRange, setVisibleRangeAndClearData
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

DataGrid

public DataGrid()
Constructs a table with a default page size of 50.


DataGrid

public DataGrid(int pageSize)
Constructs a table with the given page size.

Parameters:
pageSize - the page size

DataGrid

public DataGrid(int pageSize,
                ProvidesKey<T> keyProvider)
Constructs a table with the given page size and the given key provider.

Parameters:
pageSize - the page size
keyProvider - an instance of ProvidesKey, or null if the record object should act as its own key

DataGrid

public DataGrid(int pageSize,
                DataGrid.Resources resources)
Constructs a table with the given page size with the specified DataGrid.Resources.

Parameters:
pageSize - the page size
resources - the resources to use for this widget

DataGrid

public DataGrid(int pageSize,
                DataGrid.Resources resources,
                ProvidesKey<T> keyProvider)
Constructs a table with the given page size, the specified DataGrid.Resources, and the given key provider.

Parameters:
pageSize - the page size
resources - the resources to use for this widget
keyProvider - an instance of ProvidesKey, or null if the record object should act as its own key

DataGrid

public DataGrid(int pageSize,
                DataGrid.Resources resources,
                ProvidesKey<T> keyProvider,
                Widget loadingIndicator)
Constructs a table with the given page size, the specified DataGrid.Resources, and the given key provider.

Parameters:
pageSize - the page size
resources - the resources to use for this widget
keyProvider - an instance of ProvidesKey, or null if the record object should act as its own key
loadingIndicator - the widget to use as a loading indicator, or null to disable
Method Detail

setStriped

public void setStriped(boolean striped)
set Striped style

Parameters:
striped - true:set false:remove

setBordered

public void setBordered(boolean bordered)
set Bordered style

Parameters:
bordered - true:set false:remove

setCondensed

public void setCondensed(boolean condensed)
set Condensed style

Parameters:
condensed - true:set false:remove

setShowOn

public void setShowOn(Device device)
Sets the kind of device, this widget is shown on.

The widget is not shown on any other device.

Only works if responsive design is turned on!

Specified by:
setShowOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setHideOn(Device)

setHideOn

public void setHideOn(Device device)
Sets the kind of device, this widget is hidden on.

The widget is not hidden on any other device.

Only works if responsive design is turned on!

Specified by:
setHideOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setShowOn(Device)

setStyle

public void setStyle(Style style)
Replaces the widet's style with the provided one.

Specified by:
setStyle in interface HasStyle
Parameters:
style - the style to be applied to the Widget.

addStyle

public void addStyle(Style style)
Adds the provided style to the widget.

Specified by:
addStyle in interface HasStyle
Parameters:
style - the style to be added to the Widget.

removeStyle

public void removeStyle(Style style)
Removes the provided style from the widget.

Specified by:
removeStyle in interface HasStyle
Parameters:
style - the style to be removed from the Widget.


Copyright © 2012 gwtbootstrap. All Rights Reserved.