org.utgenome.gwt.utgb.client.db
Class DatabaseTable

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 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 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
static int LABEL_ROW
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DatabaseTable()
           
DatabaseTable(Relation relation)
           
 
Method Summary
 void addRow(com.google.gwt.json.client.JSONValue rowValue)
           
 void addRow(String jsonData)
           
 void setRelation(Relation relation)
           
 void setTableData(String jsonData)
           
 void setValue(int row, int column, com.google.gwt.json.client.JSONValue value)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LABEL_ROW

public static final int LABEL_ROW
See Also:
Constant Field Values
Constructor Detail

DatabaseTable

public DatabaseTable()

DatabaseTable

public DatabaseTable(Relation relation)
Method Detail

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.