com.drismo.gui.monitor
Class QualityMeterMonitor

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by com.drismo.gui.monitor.MonitorActivityTemplate
                      extended by com.drismo.gui.monitor.QualityMeterMonitor
All Implemented Interfaces:
android.content.ComponentCallbacks, android.opengl.GLSurfaceView.Renderer, android.view.KeyEvent.Callback, android.view.LayoutInflater.Factory, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback, CalibrationListener, QualityListener

public class QualityMeterMonitor
extends MonitorActivityTemplate
implements android.opengl.GLSurfaceView.Renderer

Monitor that displays the realtime score, with a meter.


Nested Class Summary
private  class QualityMeterMonitor.PointArrow
          This class is an object representation of a PointArrow containing the vertex information, color information and drawing functionality, which is called by the renderer.
private  class QualityMeterMonitor.QualityMeter
           
 
Field Summary
private  float angle
           
private  QualityMeterMonitor.PointArrow pointArrow
           
private  QualityMeterMonitor.QualityMeter qualityMonitor
           
(package private)  int score
           
private static java.lang.String TAG
           
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
QualityMeterMonitor()
           
 
Method Summary
 void onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
          When a new is drawn
 void onQualityUpdate(int newScore)
          Updates the score
 void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl, int width, int height)
          When the surface is changed, from portrait to landscape, set up the new projection.
 void onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl, javax.microedition.khronos.egl.EGLConfig config)
          When the openGL surface is created.
protected  void setUpLayout()
          Sets up the layout
 
Methods inherited from class com.drismo.gui.monitor.MonitorActivityTemplate
onBackPressed, onCalibrationCompleted, onCreate, onCreateDialog, onCreateOptionsMenu, onOffsetCalculationComplete, onOptionsItemSelected, onPause, onResume, prepareQualityMonitor, resetCalibration
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onAttachedToWindow, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDestroy, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

private static final java.lang.String TAG
See Also:
Constant Field Values

score

int score

angle

private float angle

qualityMonitor

private final QualityMeterMonitor.QualityMeter qualityMonitor

pointArrow

private final QualityMeterMonitor.PointArrow pointArrow
Constructor Detail

QualityMeterMonitor

public QualityMeterMonitor()
Method Detail

setUpLayout

protected void setUpLayout()
Sets up the layout

Specified by:
setUpLayout in class MonitorActivityTemplate

onQualityUpdate

public void onQualityUpdate(int newScore)
Updates the score

Specified by:
onQualityUpdate in interface QualityListener
Specified by:
onQualityUpdate in class MonitorActivityTemplate
Parameters:
newScore - The new quality score.
See Also:
Quality

onSurfaceCreated

public void onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl,
                             javax.microedition.khronos.egl.EGLConfig config)
When the openGL surface is created.

Specified by:
onSurfaceCreated in interface android.opengl.GLSurfaceView.Renderer
Parameters:
gl - the context
config - the config

onSurfaceChanged

public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl,
                             int width,
                             int height)
When the surface is changed, from portrait to landscape, set up the new projection.

Specified by:
onSurfaceChanged in interface android.opengl.GLSurfaceView.Renderer
Parameters:
gl - the context
width - the surface width
height - the surface height

onDrawFrame

public void onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
When a new is drawn

Specified by:
onDrawFrame in interface android.opengl.GLSurfaceView.Renderer
Parameters:
gl - context