org.utgenome.gwt.utgb.client.db
Class DatabaseTable
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.utgenome.gwt.utgb.client.db.DatabaseTable
- All Implemented Interfaces:
- com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget
public class DatabaseTable
- extends com.google.gwt.user.client.ui.Composite
A DatabaseTable makes easier to display table data, the schema of which is given by a Relation object, and its raw
data are described with the JSON format.
For example, a JSON string
String s = "{\"data\" : [{\"name\" : \"leo\", \"id\" : 1 }, {\"name\" : \"ahsan\", \"id\" : 2 }]}"
holds two persons' data : (leo, 1) and (ahsan, 2).
Thus,
DatabaseTable t(r); //r = (name:string, id:integer)
t.setTableData(s);
will provide the following table: ----------------- | name | id | ----------------- | leo | 1 | | ahsan | 2 |
-----------------
- Author:
- leo
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 |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
DEBUG_ID_PREFIX |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, 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, onUnload, 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 |
LABEL_ROW
public static final int LABEL_ROW
- See Also:
- Constant Field Values
DatabaseTable
public DatabaseTable()
DatabaseTable
public DatabaseTable(Relation relation)
setRelation
public void setRelation(Relation relation)
setTableData
public void setTableData(String jsonData)
addRow
public void addRow(String jsonData)
addRow
public void addRow(com.google.gwt.json.client.JSONValue rowValue)
setValue
public void setValue(int row,
int column,
com.google.gwt.json.client.JSONValue value)
Copyright © 2007-2012 utgenome.org. All Rights Reserved.