JaRMoS  1.1
Java Reduced Model Simulations
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
jarmos.app.activity.rb.RBActivity Class Reference

This is the main Activity class for the app. More...

Inheritance diagram for jarmos.app.activity.rb.RBActivity:

Public Member Functions

void onCreate (Bundle savedInstanceState)
 Called when the activity is first created. More...
 
void onBackPressed ()
 

Static Public Attributes

static int mOnlineNForGui = 1
 Array of TextViews and SeekBars for constructing the parameter selection. More...
 
static RBContainer rb
 The RB Container with all the system and model data (from JRB) More...
 
static ColorGenerator cg
 The color generator used to color the field values. More...
 
static FloatBuffer floatBuf
 
static ShortBuffer shortBuf
 

Protected Member Functions

void onDestroy ()
 Called when the activity is destroyed. More...
 
Dialog onCreateDialog (int id)
 This function takes care of constructing the dialogs that pop up. More...
 
void delete_downloaded_files ()
 

Protected Attributes

String jarFileName = "AffineFunctions.jar"
 The current parameter constructed by the GUI. More...
 

Package Attributes

final Handler downloadHandler
 Initialize the list view depending on the number of parameters in the system and on the parameter ranges. More...
 

Static Package Attributes

static final int DOWNLOAD_DIALOG_ID = 0
 
static final int PROGRESS_DIALOG_ID = 1
 
static final int DOWNLOAD_FAILED_DIALOG_ID = 2
 
static final int RB_SOLVE_DIALOG_ID = 3
 
static final int LOAD_DEMO_DIALOG_ID = 4
 
static final int SWEEP_DIALOG_ID = 5
 
static final int PARAM_DIALOG_ID = 6
 
static final int SELECT_PROBLEM_TYPE = 0
 
static final String DEBUG_TAG = "RBActivity"
 

Detailed Description

This is the main Activity class for the app.

This Activity handles downloading the stored data, initializing the systems and performing the RB solve.

This class has been taken from the original rbAppMIT package and modified to fit into the current JaRMoS framework.

Author
Daniel Wirtz
Date
Aug 10, 2011

Definition at line 53 of file RBActivity.java.

Member Function Documentation

void jarmos.app.activity.rb.RBActivity.delete_downloaded_files ( )
protected

Definition at line 339 of file RBActivity.java.

void jarmos.app.activity.rb.RBActivity.onBackPressed ( )
See Also
android.app.Activity::onBackPressed()

Definition at line 228 of file RBActivity.java.

void jarmos.app.activity.rb.RBActivity.onCreate ( Bundle  savedInstanceState)

Called when the activity is first created.

Initialize the buffers here as they are stored with the RBActivity for low memory requirements on subsequent visualizations.

See Also
android.os.Handler::handleMessage(android.os.Message)

Definition at line 138 of file RBActivity.java.

Dialog jarmos.app.activity.rb.RBActivity.onCreateDialog ( int  id)
protected

This function takes care of constructing the dialogs that pop up.

Definition at line 245 of file RBActivity.java.

void jarmos.app.activity.rb.RBActivity.onDestroy ( )
protected

Called when the activity is destroyed.

Definition at line 235 of file RBActivity.java.

Member Data Documentation

ColorGenerator jarmos.app.activity.rb.RBActivity.cg
static

The color generator used to color the field values.

Definition at line 125 of file RBActivity.java.

final String jarmos.app.activity.rb.RBActivity.DEBUG_TAG = "RBActivity"
staticpackage

Definition at line 68 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.DOWNLOAD_DIALOG_ID = 0
staticpackage

Definition at line 56 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.DOWNLOAD_FAILED_DIALOG_ID = 2
staticpackage

Definition at line 58 of file RBActivity.java.

final Handler jarmos.app.activity.rb.RBActivity.downloadHandler
package

Initialize the list view depending on the number of parameters in the system and on the parameter ranges.

Add a new button to perform a parameter sweep

Definition at line 562 of file RBActivity.java.

FloatBuffer jarmos.app.activity.rb.RBActivity.floatBuf
static

Definition at line 131 of file RBActivity.java.

String jarmos.app.activity.rb.RBActivity.jarFileName = "AffineFunctions.jar"
protected

The current parameter constructed by the GUI.

We set the RBSystem's current parameter to this before performing a solve. The index for the parameter sweep, -1 implies no sweep. The name of the jar file (containing compiled files in .dex form) that we download from the server.

Definition at line 111 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.LOAD_DEMO_DIALOG_ID = 4
staticpackage

Definition at line 60 of file RBActivity.java.

int jarmos.app.activity.rb.RBActivity.mOnlineNForGui = 1
static

Array of TextViews and SeekBars for constructing the parameter selection.

Member variable to store index number of currently selected parameter button The online N constructed by the GUI. We use this value when we call RB_solve.

Changed the default value to 1 as simulations with zero N makes little sense. Up to now, an error was thrown when N=1 from the model and thus the seekBar could not be moved, never invoking the onProgressChanged event and hence leaving this value at zero.

Definition at line 95 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.PARAM_DIALOG_ID = 6
staticpackage

Definition at line 62 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.PROGRESS_DIALOG_ID = 1
staticpackage

Definition at line 57 of file RBActivity.java.

RBContainer jarmos.app.activity.rb.RBActivity.rb
static

The RB Container with all the system and model data (from JRB)

Definition at line 120 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.RB_SOLVE_DIALOG_ID = 3
staticpackage

Definition at line 59 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.SELECT_PROBLEM_TYPE = 0
staticpackage

Definition at line 65 of file RBActivity.java.

ShortBuffer jarmos.app.activity.rb.RBActivity.shortBuf
static

Definition at line 132 of file RBActivity.java.

final int jarmos.app.activity.rb.RBActivity.SWEEP_DIALOG_ID = 5
staticpackage

Definition at line 61 of file RBActivity.java.


The documentation for this class was generated from the following file: