com.stringsandints.inventium.khlrooster
Class LessonManagement

java.lang.Object
  extended by Activity
      extended by com.stringsandints.inventium.khlrooster.LessonManagement

public class LessonManagement
extends Activity

This Activity is started after the user chooses the option 'Lesson Management' in the menu. Its purpose is to enable users to pick the lessons they want to follow so they can add them to their schedule.


Field Summary
private  Database db
           
private  java.util.ArrayList<TableRow> rows
           
 
Constructor Summary
LessonManagement()
           
 
Method Summary
 void onClick(View v)
          This method is called when a user pushes a button to delete a lesson.
protected  void onCreate(Bundle savedInstanceState)
          This method is called when the Activity is created.
 void onEdit(View v)
          When something is edited, the Activity is started again.
 void onWindowFocusChanged(boolean hasFocus)
          This method should be called whenever the activity is shown.
 void populateTable()
          This method populates the table in the lesson management window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

private final Database db

rows

private java.util.ArrayList<TableRow> rows
Constructor Detail

LessonManagement

public LessonManagement()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)
This method is called when the Activity is created. It sets the layout to the lesson management layout.


onWindowFocusChanged

public void onWindowFocusChanged(boolean hasFocus)
This method should be called whenever the activity is shown. If the window has the focus, it will be populated.


populateTable

public void populateTable()
This method populates the table in the lesson management window. It first removes all existing rows and then fills them up with the lessons.


onEdit

public void onEdit(View v)
When something is edited, the Activity is started again.

Parameters:
v -

onClick

public void onClick(View v)
This method is called when a user pushes a button to delete a lesson. It deletes the selected lesson from the database and repopulates the table.