edu.mayo.bsi.ngsportal.client
Class SGEBarGraphImpl

java.lang.Object
  extended by edu.mayo.bsi.ngsportal.client.SGEBarGraph
      extended by edu.mayo.bsi.ngsportal.client.SGEBarGraphImpl

public class SGEBarGraphImpl
extends SGEBarGraph

SGEBarGraphImpl provides a concrete implementation of SGEBarGraph and is responsible for filling the grid engine metrics graph with data obtained from the server at the direction of the SGETabController.

Author:
m102772

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.mayo.bsi.ngsportal.client.SGEBarGraph
SGEBarGraph.SGEGraphType
 
Constructor Summary
SGEBarGraphImpl(NGSPortal portal)
          Construct a new SGEBarGraph of the specified type @see SGEBarGraph.SGEGraphType
 
Method Summary
 com.google.gwt.visualization.client.visualizations.corechart.BarChart createBarChart()
          Sets options and creates the bar chart with an empty data table (call SGEBarGraph.UpdateTable to fill with real data).
 com.smartgwt.client.widgets.grid.ListGrid createListGrid()
          Returns an empty ListGrid for holding Chart data
 com.google.gwt.visualization.client.DataTable getDataTable()
          Returns the DataTable contained in the bargraph resource.
 com.google.gwt.visualization.client.visualizations.corechart.Options getOptions()
          Returns the Visualization Options for the bar graph.
 void setFilter(SGEFilter filter)
           
 void setSGEData(SGEBarGraph.SGEGraphType datatype)
          Sets the type of data to display from the types contained in SGEBarGraph; See SGEBarGraph Type Constants for possible values.
 void setType(SGEBarGraph.SGEGraphType t)
          Set the type of bargraph to construct.
 void updateTable()
          Updates the DataTable by RPC call to NGSPortal and redraws the bargraph.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SGEBarGraphImpl

public SGEBarGraphImpl(NGSPortal portal)
Construct a new SGEBarGraph of the specified type @see SGEBarGraph.SGEGraphType

Parameters:
portal - the NGSPortal object that will define the server connection
Method Detail

setType

public void setType(SGEBarGraph.SGEGraphType t)
Set the type of bargraph to construct.

Parameters:
t -

getDataTable

public com.google.gwt.visualization.client.DataTable getDataTable()
Description copied from class: SGEBarGraph
Returns the DataTable contained in the bargraph resource.

Specified by:
getDataTable in class SGEBarGraph
Returns:
DataTable can be null if the graph is empty

getOptions

public com.google.gwt.visualization.client.visualizations.corechart.Options getOptions()
Description copied from class: SGEBarGraph
Returns the Visualization Options for the bar graph.

Specified by:
getOptions in class SGEBarGraph
Returns:
Options can be null if the graph has not been created

updateTable

public void updateTable()
Description copied from class: SGEBarGraph
Updates the DataTable by RPC call to NGSPortal and redraws the bargraph. This method is responsible for calling the appropriate method in NGSPortalImpl on the server and creating the callback.

Specified by:
updateTable in class SGEBarGraph

createBarChart

public com.google.gwt.visualization.client.visualizations.corechart.BarChart createBarChart()
Description copied from class: SGEBarGraph
Sets options and creates the bar chart with an empty data table (call SGEBarGraph.UpdateTable to fill with real data).

Specified by:
createBarChart in class SGEBarGraph
Returns:
BarChart not null

setSGEData

public void setSGEData(SGEBarGraph.SGEGraphType datatype)
Description copied from class: SGEBarGraph
Sets the type of data to display from the types contained in SGEBarGraph; See SGEBarGraph Type Constants for possible values.

Specified by:
setSGEData in class SGEBarGraph
Parameters:
datatype - The enumerated type of graph to draw

setFilter

public void setFilter(SGEFilter filter)
Parameters:
filter -

createListGrid

public com.smartgwt.client.widgets.grid.ListGrid createListGrid()
Description copied from class: SGEBarGraph
Returns an empty ListGrid for holding Chart data

Specified by:
createListGrid in class SGEBarGraph
Returns:
ListGrid not null