com.drismo.gui.monitor
Class CalibrationDialog

java.lang.Object
  extended by android.app.Dialog
      extended by com.drismo.gui.monitor.CalibrationDialog
All Implemented Interfaces:
android.content.DialogInterface, android.content.DialogInterface.OnCancelListener, android.view.KeyEvent.Callback, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback

public class CalibrationDialog
extends android.app.Dialog
implements android.content.DialogInterface.OnCancelListener

A dialog to guide the user through the calibration phase.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.content.DialogInterface
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener
 
Field Summary
private  MonitorActivityTemplate context
           
private  android.widget.ImageView image
           
private  android.widget.TextView text
           
 
Fields inherited from interface android.content.DialogInterface
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3
 
Constructor Summary
CalibrationDialog(android.content.Context c)
          Creates the dialog to guide the user through the calibration phase.
 
Method Summary
 void onCancel(android.content.DialogInterface dialogInterface)
          When the dialog is canceled, we must notify the monitor of this action as well.
 void setStateCalibrating()
          Set the state as calibration, notifying the user that the vehicle must remain still.
 void setStateReadyToDrive()
          Change the dialog state, letting the user know its time to drive foreward.
 
Methods inherited from class android.app.Dialog
addContentView, cancel, closeOptionsMenu, dismiss, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getVolumeControlStream, getWindow, hide, isShowing, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

private android.widget.TextView text

image

private android.widget.ImageView image

context

private MonitorActivityTemplate context
Constructor Detail

CalibrationDialog

public CalibrationDialog(android.content.Context c)
Creates the dialog to guide the user through the calibration phase.

Parameters:
c - Context initiating the calibration.
Method Detail

setStateCalibrating

public void setStateCalibrating()
Set the state as calibration, notifying the user that the vehicle must remain still.


setStateReadyToDrive

public void setStateReadyToDrive()
Change the dialog state, letting the user know its time to drive foreward.


onCancel

public void onCancel(android.content.DialogInterface dialogInterface)
When the dialog is canceled, we must notify the monitor of this action as well.

Specified by:
onCancel in interface android.content.DialogInterface.OnCancelListener
Parameters:
dialogInterface - The current dialog interface.