edu.mayo.bsi.ngsportal.client
Class NGSPortalDashboard

java.lang.Object
  extended by edu.mayo.bsi.ngsportal.client.NGSPortalDashboard
All Implemented Interfaces:
com.google.gwt.core.client.EntryPoint, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.shared.EventHandler, com.google.gwt.user.client.rpc.AsyncCallback<ConnectionResponse>

public class NGSPortalDashboard
extends Object
implements com.google.gwt.core.client.EntryPoint, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.user.client.rpc.AsyncCallback<ConnectionResponse>

Entry point classes define onModuleLoad ().


Field Summary
static int kLogLevelDebug
          Display some debugging info
static int kLogLevelLogAllMessages
          Display an excessive amount of debugging info
static int kLogLevelLogDeepDebug
          Display more debugging info
static int kLogLevelLogInfo
          Normal Level
 
Constructor Summary
NGSPortalDashboard()
           
 
Method Summary
 void didLogin(ConnectionResponse result)
           
static com.google.gwt.user.client.ui.Widget getBigSpacer()
          Return a big spacer to divide up sections
static com.google.gwt.user.client.ui.Widget getSpacer()
          Return a spacer to keep things from being too close
 boolean handleStringListResults(String callback, List<String> result)
          Handle the results of a call to the server that returns a list of Strings
 void LogData(String newText, int level)
          Routine to Log data, and display it for the users.
 void lostConnection()
          Called when the connection has been lost, so can re-open it
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
           
 void onFailure(Throwable caught)
           
 void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
           
 void onModuleLoad()
          This is the entry point method.
 void onSuccess(ConnectionResponse response)
          Called after the client has received encryption information from the server
 void showAlert(String title, String message, com.google.gwt.user.client.Command followUp)
          Show a Alert with a title and message, and possible a command to execute when the alert is dismissed
 void showAnalysisResults(List<AnalysisInfo> results)
          Clear out the old analysis results and then display the new results from the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kLogLevelLogInfo

public static final int kLogLevelLogInfo
Normal Level

See Also:
Constant Field Values

kLogLevelDebug

public static final int kLogLevelDebug
Display some debugging info

See Also:
Constant Field Values

kLogLevelLogDeepDebug

public static final int kLogLevelLogDeepDebug
Display more debugging info

See Also:
Constant Field Values

kLogLevelLogAllMessages

public static final int kLogLevelLogAllMessages
Display an excessive amount of debugging info

See Also:
Constant Field Values
Constructor Detail

NGSPortalDashboard

public NGSPortalDashboard()
Method Detail

onModuleLoad

public void onModuleLoad()
This is the entry point method.

Specified by:
onModuleLoad in interface com.google.gwt.core.client.EntryPoint

onKeyPress

public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
Specified by:
onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandler

onClick

public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
Specified by:
onClick in interface com.google.gwt.event.dom.client.ClickHandler

onFailure

public void onFailure(Throwable caught)
Specified by:
onFailure in interface com.google.gwt.user.client.rpc.AsyncCallback<ConnectionResponse>

onSuccess

public void onSuccess(ConnectionResponse response)
Called after the client has received encryption information from the server

Specified by:
onSuccess in interface com.google.gwt.user.client.rpc.AsyncCallback<ConnectionResponse>

showAlert

public void showAlert(String title,
                      String message,
                      com.google.gwt.user.client.Command followUp)
Show a Alert with a title and message, and possible a command to execute when the alert is dismissed

Parameters:
title - title for the Alert box
message - Message for the user
followUp - Command to execute after the user dismisses the alert, or null if no command

getSpacer

public static final com.google.gwt.user.client.ui.Widget getSpacer()
Return a spacer to keep things from being too close

Returns:
A widget to separate things

getBigSpacer

public static final com.google.gwt.user.client.ui.Widget getBigSpacer()
Return a big spacer to divide up sections

Returns:
A widget to separate things

LogData

public void LogData(String newText,
                    int level)
Routine to Log data, and display it for the users.

Parameters:
newText - Text to add to the Log TextField
level - Log level. The lower the level, the more likely it is to get logged.

showAnalysisResults

public void showAnalysisResults(List<AnalysisInfo> results)
Clear out the old analysis results and then display the new results from the server.

Parameters:
results - Results of the latest search

handleStringListResults

public boolean handleStringListResults(String callback,
                                       List<String> result)
Handle the results of a call to the server that returns a list of Strings

Parameters:
callback - String detailing which function was called
result - Results of the function call, a list of Strings
Returns:
True if recognized callback, else false

lostConnection

public void lostConnection()
Called when the connection has been lost, so can re-open it


didLogin

public void didLogin(ConnectionResponse result)
Parameters:
result - The Connection response returned by the server