Browse Source

Deleted unused classes, added missing comments.

Julien Clauter 10 years ago
parent
commit
5ae07bfcbc

+ 5 - 4
src/de/tudarmstadt/informatik/hostage/HostageApplication.java

@@ -2,14 +2,15 @@ package de.tudarmstadt.informatik.hostage;
 
 import android.app.Application;
 
-import com.google.android.gms.analytics.Tracker;
-import com.google.android.gms.analytics.GoogleAnalytics;
+//import com.google.android.gms.analytics.Tracker;
+//import com.google.android.gms.analytics.GoogleAnalytics;
 
 /**
  * Created by Fabio Arnold on 28.03.14.
  */
 public class HostageApplication extends Application {
-	private Tracker mAppTracker = null;
+	/*
+    private Tracker mAppTracker = null;
 
 	public synchronized Tracker getTracker() {
 		GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
@@ -17,5 +18,5 @@ public class HostageApplication extends Application {
 			mAppTracker = analytics.newTracker(R.xml.app_tracker);
 		}
 		return mAppTracker;
-	}
+	}*/
 }

+ 22 - 4
src/de/tudarmstadt/informatik/hostage/ui2/adapter/ExpandableListAdapter.java

@@ -24,7 +24,12 @@ public abstract class ExpandableListAdapter extends BaseExpandableListAdapter {
     // data in format of header title, childs list
     public HashMap<String, ArrayList<ExpandableListItem>> _sectionTitleToChildData;
 
-    /*CONSTRUCTOR*/
+    /**
+     * Constructor
+     * @param context the context
+     * @param listSectionHeaders the section title
+     * @param dataMapping {@link ExpandableListItem ExpandableListItem} the data to visualise
+     */
     public ExpandableListAdapter(Context context, List<String> listSectionHeaders,
                                  HashMap<String, ArrayList<ExpandableListItem>> dataMapping) {
         this._context = context;
@@ -103,20 +108,33 @@ public abstract class ExpandableListAdapter extends BaseExpandableListAdapter {
         return convertView;
     }
 
-
+    /**
+     * Return the {@link ExpandableListItem ExpandableListItem} for the given index path
+     * @param section int
+     * @param row int
+     * @return {@link ExpandableListItem ExpandableListItem}
+     */
     public ExpandableListItem getDataForRow(int section, int row){
         return this._sectionTitleToChildData.get(this._sectionHeader.get(section)).get(row);
     }
 
 
+    /**
+     * Configure the items root view in here
+     * @param cell View, the root view
+     * @param section int
+     * @param row int
+     */
     public abstract void configureCellView(View cell, int section, int row);
     public abstract void configureSectionHeaderView(View sectionHeader, int section);
 
-    /*
+    /**
+     * Returns the section header layout id.
     * @return R.layout.list_section
     * */
     public abstract  int getSectionLayoutID();
-    /*
+    /**
+     * Return the  root view layout id.
      * @return R.layout.list_cell
      * */
     public abstract  int getCellLayoutID();

+ 6 - 0
src/de/tudarmstadt/informatik/hostage/ui2/adapter/RecordListAdapter.java

@@ -13,6 +13,12 @@ import de.tudarmstadt.informatik.hostage.ui2.model.ExpandableListItem;
 
 public class RecordListAdapter extends ExpandableListAdapter {
 
+    /**
+     * Constructor
+     * @param context the context
+     * @param listSectionHeaders the section titles
+     * @param dataMapping HashMap<String, ArrayList<{@link ExpandableListItem ExpandableListItem}>> the data to visualise
+     */
     public RecordListAdapter(Context context, List<String> listSectionHeaders, HashMap<String, ArrayList<ExpandableListItem>> dataMapping) {
         super(context, listSectionHeaders, dataMapping);
     }

+ 31 - 0
src/de/tudarmstadt/informatik/hostage/ui2/adapter/StatisticListAdapter.java

@@ -17,12 +17,21 @@ import de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem;
  * Created by Julien on 22.02.14.
  */
 public class StatisticListAdapter extends ArrayAdapter<PlotComparisonItem> {
+
+    /**
+     * Holds all necessary subviews in the rootview.
+     */
     private class ViewHolder {
         public TextView titleView;
         public TextView valueView;
         public TextView colorView;
     }
 
+    /**
+     * A ValueFormatter converts information containing in the
+     * {@link de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem PlotComparisonItems}
+     * in a readable format.
+     */
     public interface ValueFormatter {
         public String convertValueForItemToString(PlotComparisonItem item);
     }
@@ -31,10 +40,19 @@ public class StatisticListAdapter extends ArrayAdapter<PlotComparisonItem> {
     private final Context context;
     private List<PlotComparisonItem> values;
 
+    /**
+     * Set the value formatter.
+     * @param formatter ValueFormatter
+     */
     public void setValueFormatter(ValueFormatter formatter){
         this.formatter = formatter;
     }
 
+    /**
+     * Contructor
+     * @param context the context
+     * @param objects the repesenting {@link de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem PlotComparisonItems}
+     */
     public StatisticListAdapter(Context context, List<PlotComparisonItem> objects) {
         super(context, getLayoutID(), objects);
         List<PlotComparisonItem> list = objects == null ? new ArrayList<PlotComparisonItem>() : objects;
@@ -42,6 +60,10 @@ public class StatisticListAdapter extends ArrayAdapter<PlotComparisonItem> {
         this.values = list;
     }
 
+    /**
+     * Set the representing {@link de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem PlotComparisonItems}.
+     * @param list List<PlotComparisonItem>
+     */
     public void setValues(List<PlotComparisonItem> list){
         this.values = list;
     }
@@ -73,10 +95,19 @@ public class StatisticListAdapter extends ArrayAdapter<PlotComparisonItem> {
         return rowView;
     }
 
+    /**
+     * Returns the items layout ID.
+     * @return int layoutID
+     */
     static public int getLayoutID(){
         return R.layout.plot_list_item;
     }
 
+    /**
+     * Configure the items rootview in here.
+     * @param holder ViewHolder
+     * @param item {@link de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem PlotComparisonItem}
+     */
     private void configureView(ViewHolder holder, PlotComparisonItem item){
         holder.colorView.setBackgroundColor(item.getColor());
         holder.titleView.setText(item.getTitle());

+ 24 - 7
src/de/tudarmstadt/informatik/hostage/ui2/dialog/ChecklistDialog.java

@@ -34,10 +34,23 @@ public class ChecklistDialog extends DialogFragment {
      * */
     @SuppressLint("ValidFragment")
 	public interface ChecklistDialogListener {
+        /**
+         * Called if the user tapped "ok"
+         * @param dialog {@link ChecklistDialog ChecklistDialog}
+         */
         public void onDialogPositiveClick(ChecklistDialog dialog);
+
+        /**
+         * Called if the user tapped "cancel".
+         * @param dialog {@link ChecklistDialog ChecklistDialog}
+         */
         public void onDialogNegativeClick(ChecklistDialog dialog);
     }
-    
+
+    /**
+     * Returns the dialog title
+     * @return title String
+     */
     public String getTitle(){
     	return this.title;
     }
@@ -53,11 +66,11 @@ public class ChecklistDialog extends DialogFragment {
     /*CONSTRUCTOR*/
     /**
      * The Constructor Method
-     * @param String title
-     * @param ArrayList<String> item titles list
-     * @param boolean[] an array of bools descriping the position of all the selected titles.
-     * @param boolean isMultipleChoice
-     * @param ChecklistDialogListener an user "event" listener
+     * @param  title String
+     * @param itemTitles ArrayList<String> item titles list
+     * @param selected boolean[] an array of bools descriping the position of all the selected titles.
+     * @param isMultipleChoice boolean isMultipleChoice
+     * @param listener ChecklistDialogListener an user "event" listener
      *
      * */
     public ChecklistDialog(String title, ArrayList<String> itemTitles, boolean[] selected, boolean isMultipleChoice , ChecklistDialogListener listener){
@@ -104,7 +117,11 @@ public class ChecklistDialog extends DialogFragment {
                     + " must implement ChecklistDialogListener");
         }
     }
-    
+
+    /**
+     * Return the selected titles.
+     * @return ArrayList<String>
+     */
     public ArrayList<String> getSelectedItemTitles(){
     	ArrayList<String> list = new ArrayList<String>();
         if (this.mSelectedItems == null){

+ 85 - 27
src/de/tudarmstadt/informatik/hostage/ui2/dialog/DateTimeDialogFragment.java

@@ -17,7 +17,6 @@ import android.widget.DatePicker.OnDateChangedListener;
 import android.widget.TimePicker;
 import android.widget.TimePicker.OnTimeChangedListener;
 
-import java.text.DateFormat;
 import java.util.Calendar;
 
 import de.tudarmstadt.informatik.hostage.R;
@@ -55,6 +54,11 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
         this(activity, DATE_TIME_PICKER);
     }
 
+    /**
+     * Constructor
+     * @param activity the activity
+     * @param DialogType, what kind of dialog it is (TIME_PICKER, DATE_PICKER, DATE_TIME_PICKER)
+     */
     public DateTimeDialogFragment(Activity activity, int DialogType) {
 
         this.activity = activity;
@@ -82,6 +86,10 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
         this.setupRootView(mView);
     }
 
+    /**
+     * Configure the root view in here.
+     * @param mView, root view
+     */
     private void setupRootView(View mView){
 
         mCalendar = Calendar.getInstance();
@@ -105,6 +113,10 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
         }
     }
 
+    /**
+     * Set the current date.
+     * @param timeInMillis, date in milliseconds
+     */
     public void setDate(long timeInMillis){
         Calendar calendar = Calendar.getInstance();
         calendar.setTimeInMillis (timeInMillis);
@@ -120,6 +132,10 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
         timePicker.setCurrentMinute(min);
     }
 
+    /**
+     * Returns the current selected date.
+     * @return long, date in milliseconds
+     */
    public long getDate(){
 	   
        int day = datePicker.getDayOfMonth();
@@ -135,13 +151,29 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
 
        return calendar.getTime().getTime();
    }
-    
+
+    /**
+     * The listener which will be called if the user tapped "cancel" or "ok"
+     */
     public interface DateTimeDialogFragmentListener {
+        /**
+         * Called if the user tapped "ok"
+         * @param dialog {@link DateTimeDialogFragment DateTimeDialogFragment}
+         */
         public void onDateTimePickerPositiveClick(DateTimeDialogFragment dialog);
+
+        /**
+         * Called if the user tapped "cancel"
+         * @param dialog {@link DateTimeDialogFragment DateTimeDialogFragment}
+         */
         public void onDateTimePickerNegativeClick(DateTimeDialogFragment dialog);
     }
     private DateTimeDialogFragmentListener mListener;
 
+    /**
+     * Set the user interaction listener.
+     * @param listener DateTimeDialogFragmentListener
+     */
     public void setDateChangeListener(DateTimeDialogFragmentListener listener){
         this.mListener = listener;
     }
@@ -196,50 +228,76 @@ public class DateTimeDialogFragment extends DialogFragment implements OnDateChan
         timePicker.setOnTimeChangedListener(this);
     }
 
+    /**
+     * Returns the value of the given field after computing the field values by calling complete() first.
+     * @param field int
+     * @return int
+     */
     public int get(final int field) {
         return mCalendar.get(field);
     }
 
-    public long getDateTimeMillis() {
-        return mCalendar.getTimeInMillis();
-    }
-
+    /**
+     * Set the time picker style.
+     * @param is24HourView
+     */
     public void setIs24HourView(boolean is24HourView) {
         timePicker.setIs24HourView(is24HourView);
     }
 
-    public boolean is24HourView() {
-        return timePicker.is24HourView();
-    }
-
+    /**
+     * Show / hide the calendar view of the DatePicker.
+     * @param calendarView boolean
+     */
     public void setCalendarViewShown(boolean calendarView) {
         datePicker.setCalendarViewShown(calendarView);
     }
 
-    public boolean CalendarViewShown() {
-        return datePicker.getCalendarViewShown();
-    }
 
-    public void updateDate(int year, int monthOfYear, int dayOfMonth) {
-        datePicker.updateDate(year, monthOfYear, dayOfMonth);
-    }
-
-    public void updateTime(int currentHour, int currentMinute) {
-        timePicker.setCurrentHour(currentHour);
-        timePicker.setCurrentMinute(currentMinute);
-    }
-
-    public String getDateTime() {
-        //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
-        DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(activity);
-        return dateFormat.format(mCalendar.getTime());
-    }
 
+    /**
+     * Handles date change event.
+     * @param view DatePicker
+     * @param year changed year
+     * @param monthOfYear changed month of Year
+     * @param dayOfMonth changed day of Month
+     */
     public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
         mCalendar.set(year, monthOfYear, dayOfMonth, mCalendar.get(Calendar.HOUR_OF_DAY), mCalendar.get(Calendar.MINUTE));
     }
 
+    /**
+     * Handles on time changed events.
+     * @param view TimePicker
+     * @param hourOfDay changed hour
+     * @param minute changed minute
+     */
     public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
         mCalendar.set(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), hourOfDay, minute);
     }
+
+    // MAYBE NEED IN FUTURE DEVELOPMENT
+    // UNUSED
+//    public long getDateTimeMillis() {
+//        return mCalendar.getTimeInMillis();
+//    }
+//    public boolean CalendarViewShown() {
+//        return datePicker.getCalendarViewShown();
+//    }
+//    public boolean is24HourView() {
+//        return timePicker.is24HourView();
+//    }
+//    public void updateDate(int year, int monthOfYear, int dayOfMonth) {
+//        datePicker.updateDate(year, monthOfYear, dayOfMonth);
+//    }
+//
+//    public void updateTime(int currentHour, int currentMinute) {
+//        timePicker.setCurrentHour(currentHour);
+//        timePicker.setCurrentMinute(currentMinute);
+//    }
+//
+//    public String getDateTime() {
+//        DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(activity);
+//        return dateFormat.format(mCalendar.getTime());
+//    }
 }

+ 0 - 32
src/de/tudarmstadt/informatik/hostage/ui2/dialog/TimePickerFragment.java

@@ -1,32 +0,0 @@
-package de.tudarmstadt.informatik.hostage.ui2.dialog;
-
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.TimePickerDialog;
-import android.os.Bundle;
-import android.text.format.DateFormat;
-import android.widget.TimePicker;
-
-import java.util.Calendar;
-
-/**
- * Created by Julien on 16.02.14.
- */
-public class TimePickerFragment extends DialogFragment implements
-		TimePickerDialog.OnTimeSetListener {
-
-	@Override
-	public Dialog onCreateDialog(Bundle savedInstanceState) {
-		// Use the current time as the default values for the picker
-		final Calendar c = Calendar.getInstance();
-		int hour = c.get(Calendar.HOUR_OF_DAY);
-		int minute = c.get(Calendar.MINUTE);
-
-		return new TimePickerDialog(getActivity(), this, hour, minute,
-				DateFormat.is24HourFormat(getActivity()));
-	}
-
-	public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
-		// Do something with the time chosen by the user
-	}
-}

+ 10 - 9
src/de/tudarmstadt/informatik/hostage/ui2/fragment/HomeFragment.java

@@ -1,11 +1,7 @@
 package de.tudarmstadt.informatik.hostage.ui2.fragment;
 
-import com.google.android.gms.analytics.HitBuilders;
-import com.google.android.gms.analytics.Tracker;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+//import com.google.android.gms.analytics.HitBuilders;
+//import com.google.android.gms.analytics.Tracker;
 
 import android.annotation.SuppressLint;
 import android.app.Activity;
@@ -28,15 +24,18 @@ import android.widget.ImageView;
 import android.widget.Switch;
 import android.widget.TextView;
 
-import de.tudarmstadt.informatik.hostage.HostageApplication;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 import de.tudarmstadt.informatik.hostage.R;
 import de.tudarmstadt.informatik.hostage.commons.HelperUtils;
-import de.tudarmstadt.informatik.hostage.persistence.ProfileManager;
 import de.tudarmstadt.informatik.hostage.model.Profile;
 import de.tudarmstadt.informatik.hostage.persistence.HostageDBOpenHelper;
-import de.tudarmstadt.informatik.hostage.ui2.model.LogFilter;
+import de.tudarmstadt.informatik.hostage.persistence.ProfileManager;
 import de.tudarmstadt.informatik.hostage.ui2.activity.MainActivity;
 import de.tudarmstadt.informatik.hostage.ui2.fragment.opengl.ThreatIndicatorGLRenderer;
+import de.tudarmstadt.informatik.hostage.ui2.model.LogFilter;
 
 /**
  * This fragments displays the current hostage state and attacks on the device in form of an animation and simple view components
@@ -319,9 +318,11 @@ public class HomeFragment extends Fragment {
 			activity.setTitle(getResources().getString(R.string.drawer_overview));
 
 			// tracking stuff
+            /*
 			Tracker t = ((HostageApplication)activity.getApplication()).getTracker();
 			t.setScreenName(HomeFragment.class.getName());
 			t.send(new HitBuilders.AppViewBuilder().build());
+			*/
 		}
 
 		mDbHelper = new HostageDBOpenHelper(getActivity());

+ 9 - 5
src/de/tudarmstadt/informatik/hostage/ui2/popup/AbstractPopup.java

@@ -26,6 +26,10 @@ public abstract class AbstractPopup {
      * The listener will be called if the user selects a table row
      */
     public interface OnPopupItemClickListener {
+        /**
+         * Will be called if the user tapped on an item.
+         * @param data Object
+         */
         public void onItemClick(Object data);
     }
 
@@ -44,14 +48,14 @@ public abstract class AbstractPopup {
 
     /**
      * Override to make additional stuff with the rootview.
-     * @param View rootview
+     * @param view rootview
      */
     abstract void configureView(View view);
 
     /**
      * Constructor
-     * @param Context context
-     * @param OnPopupItemClickListener listener
+     * @param context Context
+     * @param  listener OnPopupItemClickListener
      */
     public AbstractPopup(Context context, OnPopupItemClickListener listener) {
         super();
@@ -80,7 +84,7 @@ public abstract class AbstractPopup {
 
     /**
      * Adds a table row item.
-     * @param AbstractPopupItem item
+     * @param item {@link de.tudarmstadt.informatik.hostage.ui2.popup.AbstractPopupItem AbstractPopupItem}
      */
     public void addItem(final AbstractPopupItem item)	{
         View view = item.getRootView();
@@ -127,7 +131,7 @@ public abstract class AbstractPopup {
 
     /**
      * Opens the Popup View on top of the given anchor.
-     * @param View anchorView
+     * @param anchorView View
      */
     public void showOnView(final View anchorView)	{
         if (this.rootView == null){

+ 12 - 8
src/de/tudarmstadt/informatik/hostage/ui2/popup/AbstractPopupItem.java

@@ -29,11 +29,15 @@ public abstract class AbstractPopupItem {
     /**
      * Override to do additional stuff with the rootview.
      *
-     * @param View rootview
+     * @param  view the root view
      */
     abstract public void configureItemView(View view);
 
-
+    /**
+     * Set different types of data. Calls {@link #configureItemView(android.view.View)}
+     * @param key String
+     * @param value Object
+     */
     public void setValue(String key, Object value){
         if (key != null && value != null){
             this.data.put(key, value);
@@ -43,7 +47,7 @@ public abstract class AbstractPopupItem {
 
     /**
      * Add other data to the item.
-     * @param HashMap<Object, Object> data
+     * @param map HashMap<Object, Object> optional data.
      */
     public void setMultipleData(HashMap<Object, Object> map){
         if (map != null){
@@ -64,7 +68,7 @@ public abstract class AbstractPopupItem {
 
     /**
      * Set a specific item ID to identify it.
-     * @param int id
+     * @param  id int
      */
     public void setItemId(int id){
         this.itemId = id;
@@ -81,7 +85,7 @@ public abstract class AbstractPopupItem {
 
     /**
      * Constructor
-     * @param Context context
+     * @param  context Context
      */
     public AbstractPopupItem(Context context) {
         super();
@@ -105,7 +109,7 @@ public abstract class AbstractPopupItem {
 
     /**
      * The method is called if the user clicks the rootview.
-     * @param  MotionEvent event
+     * @param   event MotionEvent
      * @return Object object
      */
     public Object onClickedResult(MotionEvent event){
@@ -114,14 +118,14 @@ public abstract class AbstractPopupItem {
 
     /**
      * Will be called if the user selected the view.
-     * @param MotionEvent event
+     * @param  event MotionEvent
      */
 	public void onItemSelect(MotionEvent event){
 	}
 
     /**
      * Will be called if the user deselects the view.
-     * @param MotionEvent event
+     * @param  event MotionEvent
      */
 	public void onItemDeselect(MotionEvent event){
 

+ 20 - 1
src/de/tudarmstadt/informatik/hostage/ui2/popup/SimplePopupItem.java

@@ -17,16 +17,22 @@ public class SimplePopupItem extends AbstractPopupItem {
 	private Context context;
 	private View container;
 
+    /**
+     * Constructor
+     * @param context the context
+     */
 	public SimplePopupItem(Context context) {
         super(context);
 
 	    this.context = context;
     }
 
+    @Override
     public int getLayoutId(){
         return R.layout.simple_popup_item;
     }
 
+    @Override
     public void configureItemView(View view){
         TextView titleView = (TextView) view.findViewById(R.id.title_text_view);
         RadioButton cbox = (RadioButton) view.findViewById(R.id.isSelectedButton);
@@ -39,11 +45,19 @@ public class SimplePopupItem extends AbstractPopupItem {
         }
     }
 
+    /**
+     * Set the selection state.
+     * @param selected boolean
+     */
     public void setSelected(boolean selected){
         this.selected = selected;
         if (this.getRootView() != null) this.configureItemView(this.getRootView());
     }
 
+    /**
+     * Return the background view.
+     * @return view the background view
+     */
 	private View getContainer(){
 		if(container == null){
 			container = this.getRootView().findViewById(R.id.popup_item_container);
@@ -52,15 +66,20 @@ public class SimplePopupItem extends AbstractPopupItem {
 		return container;
 	}
 
+    /**
+     * Returns true if the item is selected, otherwise false.
+     * @return boolean
+     */
     public boolean isSelected(){
         return this.selected;
     }
 
+    @Override
 	public void onItemSelect(MotionEvent event){
 		getContainer().setBackgroundColor(
 				context.getResources().getColor(android.R.color.holo_blue_light));
 	}
-
+    @Override
 	public void onItemDeselect(MotionEvent event){
 		getContainer().setBackgroundColor(context.getResources().getColor(android.R.color.transparent));
 	}

+ 16 - 0
src/de/tudarmstadt/informatik/hostage/ui2/popup/SimplePopupTable.java

@@ -14,14 +14,28 @@ public class SimplePopupTable extends AbstractPopup {
 
     private String title;
 
+    /**
+     * Set the popup title.
+     * @param title string
+     */
     public void setTitle(String title){
         this.title = title;
         if (this.getPopupView() != null) this.configureView(this.getPopupView());
     }
+
+    /**
+     * Returns the popup title.
+     * @return String title.
+     */
     public String getTitle(){
         return this.title;
     }
 
+    /**
+     * Constructor
+     * @param context the context
+     * @param listener user event listener
+     */
     public SimplePopupTable(Context context, OnPopupItemClickListener listener){
         super(context, listener);
     }
@@ -31,10 +45,12 @@ public class SimplePopupTable extends AbstractPopup {
         return (LinearLayout) this.getRootView().findViewById(R.id.item_scroll_layout);
     }
 
+    @Override
     public int getLayoutId(){
         return R.layout.simple_popup_table;
     }
 
+    @Override
     void configureView(View view){
         TextView titleView = (TextView) view.findViewById(R.id.title_text_view);
         titleView.setText(this.title);

+ 11 - 1
src/de/tudarmstadt/informatik/hostage/ui2/popup/SplitPopupItem.java

@@ -26,7 +26,7 @@ public class SplitPopupItem extends AbstractPopupItem {
     /**
      * Constructor
      *
-     * @param Context context
+     * @param  context Context
      */
     public SplitPopupItem(Context context){
         super(context);
@@ -34,10 +34,12 @@ public class SplitPopupItem extends AbstractPopupItem {
 	    this.context = context;
     }
 
+    @Override
     public int getLayoutId(){
         return R.layout.split_popup_item;
     }
 
+    @Override
     public void configureItemView(View view){
         String leftTitle = (String) this.data.get(LEFT_TITLE);
         String rightTitle = (String) this.data.get(RIGHT_TITLE);
@@ -64,6 +66,12 @@ public class SplitPopupItem extends AbstractPopupItem {
         }
     }
 
+    /**
+     * Returns the displayed object for the clicked position in the view.
+     * E.g. the user tapped the right side, it returns the object representing the right side of the clickt view.
+     * @param event MotionEvent
+     * @return Object
+     */
     public Object onClickedResult(MotionEvent event){
         this.wasRightTouch = isRightTouch(event);
         return this;
@@ -101,6 +109,7 @@ public class SplitPopupItem extends AbstractPopupItem {
 		return right_container;
 	}
 
+    @Override
 	public void onItemSelect(MotionEvent event){
 		int blue_color = context.getResources().getColor(android.R.color.holo_blue_light);
 		int trans_color = context.getResources().getColor(android.R.color.transparent);
@@ -114,6 +123,7 @@ public class SplitPopupItem extends AbstractPopupItem {
 		}
 	}
 
+    @Override
 	public void onItemDeselect(MotionEvent event){
 		int trans_color = context.getResources().getColor(android.R.color.transparent);
 

+ 0 - 38
src/de/tudarmstadt/informatik/hostage/ui2/task/LoaderTask.java

@@ -1,38 +0,0 @@
-package de.tudarmstadt.informatik.hostage.ui2.task;
-
-import android.annotation.SuppressLint;
-import android.os.AsyncTask;
-
-/**
- * Created by Julien on 23.03.14.
- */
-public class LoaderTask extends AsyncTask<Void, Void, Void> {
-
-    private TaskListener listener;
-
-    @SuppressLint("ValidFragment")
-    public interface TaskListener {
-        public void doInBackgorund();
-        public void onFinish();
-    }
-
-    public LoaderTask(TaskListener listener){
-        super();
-        this.listener = listener;
-    }
-
-    @Override
-    protected Void doInBackground(Void... unused) {
-        if (this.listener != null){
-            this.listener.doInBackgorund();
-        }
-        return(null);
-    }
-
-    @Override
-    protected void onPostExecute(Void unused) {
-        if (this.listener != null){
-            this.listener.onFinish();
-        }
-    }
-}