org.android.activityminer.app.db
Class ExpandableDBRecordingStatisticAdapter

Package class diagram package ExpandableDBRecordingStatisticAdapter
java.lang.Object
  extended by android.widget.BaseExpandableListAdapter
      extended by org.android.activityminer.app.db.ExpandableDBRecordingStatisticAdapter
All Implemented Interfaces:
ExpandableListAdapter, HeterogeneousExpandableList

public class ExpandableDBRecordingStatisticAdapter
extends BaseExpandableListAdapter

The adapter for the recording sequences statistics.


Field Summary
private  Activity context
          The activity context
private  SimpleDateFormat dateFormatter
          The date formatter.
private  List<DBRecordingStatisticSequenceEntry> entries
          The list with the entries.
private  SimpleDateFormat timeFormatter
          The time formatter.
 
Constructor Summary
ExpandableDBRecordingStatisticAdapter(Activity context, DBRecordingStatistic statistic)
          Constructor
 
Method Summary
 Object getChild(int groupPosition, int childPosition)
           
 long getChildId(int groupPosition, int childPosition)
           
 int getChildrenCount(int groupPosition)
           
 View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
           
 Object getGroup(int groupPosition)
           
 int getGroupCount()
           
 long getGroupId(int groupPosition)
           
 View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
           
 DBRecordingStatisticEntry getRecording(int groupPosition, int childPosition)
          Getter for a recording by group and child position
 DBRecordingStatisticSequenceEntry getSequence(int groupPosition)
          Getter for sequences by position
 boolean hasStableIds()
           
 boolean isChildSelectable(int groupPosition, int childPosition)
           
 
Methods inherited from class android.widget.BaseExpandableListAdapter
areAllItemsEnabled, getChildType, getChildTypeCount, getCombinedChildId, getCombinedGroupId, getGroupType, getGroupTypeCount, isEmpty, notifyDataSetChanged, notifyDataSetInvalidated, onGroupCollapsed, onGroupExpanded, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private final Activity context
The activity context


entries

private final List<DBRecordingStatisticSequenceEntry> entries
The list with the entries.


dateFormatter

private final SimpleDateFormat dateFormatter
The date formatter.


timeFormatter

private final SimpleDateFormat timeFormatter
The time formatter.

Constructor Detail

ExpandableDBRecordingStatisticAdapter

public ExpandableDBRecordingStatisticAdapter(Activity context,
                                             DBRecordingStatistic statistic)
Constructor

Parameters:
context - the context
statistic - the database recording statistic
Method Detail

getGroupView

public View getGroupView(int groupPosition,
                         boolean isExpanded,
                         View convertView,
                         ViewGroup parent)

getChildView

public View getChildView(int groupPosition,
                         int childPosition,
                         boolean isLastChild,
                         View convertView,
                         ViewGroup parent)

getGroupCount

public int getGroupCount()

getChildrenCount

public int getChildrenCount(int groupPosition)

getGroup

public Object getGroup(int groupPosition)

getSequence

public DBRecordingStatisticSequenceEntry getSequence(int groupPosition)
Getter for sequences by position

Parameters:
groupPosition - the sequence position
Returns:
the sequence at the given group position

getChild

public Object getChild(int groupPosition,
                       int childPosition)

getRecording

public DBRecordingStatisticEntry getRecording(int groupPosition,
                                              int childPosition)
Getter for a recording by group and child position

Parameters:
groupPosition - the sequence position *
childPosition - the recording position
Returns:
the recording at the given child position

getGroupId

public long getGroupId(int groupPosition)

getChildId

public long getChildId(int groupPosition,
                       int childPosition)

hasStableIds

public boolean hasStableIds()

isChildSelectable

public boolean isChildSelectable(int groupPosition,
                                 int childPosition)