de.Android_Seminar
Class Graphics

java.lang.Object
  extended by de.Android_Seminar.Graphics
All Implemented Interfaces:
java.lang.Runnable

public class Graphics
extends java.lang.Object
implements java.lang.Runnable

Author:
Kai This class is responsible for drawing the diagram. She first draws the coordinate system and then adds the points present a

Constructor Summary
Graphics(Context context, SensorController sensorController, int width, int height)
          Constructor
 
Method Summary
 void createBitmap()
          This creates us the Canvas and Bitmap object for the diagram
 void diagramm()
          This print us the coordinate system
 ImageView getImageView()
          This give us the ImageView with the coordinate System
 void insertPoints()
          This insert the last 30 points in the coordinate system
 void run()
          This need we for execute the Thread
 void setDimension(int height, int width)
          This method we need for resize the bitmap
 void setStart()
          This Method we need for starting the Thread
 void setStop()
          This Method we need for stopping the Thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graphics

public Graphics(Context context,
                SensorController sensorController,
                int width,
                int height)
Constructor

Parameters:
Context - context
SensorController - sensorController for getting the data's
int - width Width of the bitmap
int - height Height of the bitmap
Method Detail

createBitmap

public void createBitmap()
This creates us the Canvas and Bitmap object for the diagram


diagramm

public void diagramm()
This print us the coordinate system


insertPoints

public void insertPoints()
This insert the last 30 points in the coordinate system


run

public void run()
This need we for execute the Thread

Specified by:
run in interface java.lang.Runnable

getImageView

public ImageView getImageView()
This give us the ImageView with the coordinate System

Returns:
ImageView

setStop

public void setStop()
This Method we need for stopping the Thread


setStart

public void setStart()
This Method we need for starting the Thread


setDimension

public void setDimension(int height,
                         int width)
This method we need for resize the bitmap

Parameters:
height - New Height of the Bitmap
width - New Width of the Bitmap