Android Open Source - logmypain Headache






From Project

Back to project page logmypain.

License

The source code is released under:

GNU General Public License

If you think the Android project logmypain listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.logmypain.utils.Models;
/* w w w  .  j  a  v a2 s.c  om*/
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;

public class Headache {

  private Calendar start;
  private Calendar end;
  private int intensity;
  private long id;
  private List<Trigger> triggers;
  
  public Headache () {
    this.intensity = -1;
    this.id = -1;
    this.triggers = new ArrayList<Trigger>();
  }

  public Calendar getStart() {
    return start;
  }

  public void setStart(Calendar start) {
    this.start = start;
  }

  public void setStart(Date date) {
    this.start = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault());
    this.start.setTime(date);
  }

  public void setStartToNow() {
    this.start = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault());
  }

  public Calendar getEnd() {
    return end;
  }

  public void setEnd(Calendar end) {
    this.end = end;
  }

  public void setEnd(Date date) {
    this.end = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault());
    this.end.setTime(date);
  }

  public void setEndToNow() {
    this.end = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault());
  }

  public int getIntensity() {
    return intensity;
  }

  public void setIntensity(int intensity) {
    this.intensity = intensity;
  }

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }
  
  @Override
  public String toString(){
    return this.start.toString() + " test " + this.id;
  }

  public List<Trigger> getTriggers() {
    return triggers;
  }

  public void setTriggers(List<Trigger> triggers) {
    this.triggers = triggers;
  }
}




Java Source Code List

com.logmypain.main.MainActivity.java
com.logmypain.main.record.HeadacheRecordFormActivity.java
com.logmypain.main.record.dialogs.AddTriggersDialogFragment.java
com.logmypain.main.record.dialogs.DateTimeDialogFragment.java
com.logmypain.main.record.toasties.RecordNowToastie.java
com.logmypain.tasks.ViewRecordsActivity.java
com.logmypain.tasks.adapters.CalendarGridViewAdapter.java
com.logmypain.tasks.adapters.TriggersAdapter.java
com.logmypain.tasks.adapters.ViewRecordsAdapter.java
com.logmypain.tasks.framents.ViewCalendarFragment.java
com.logmypain.tasks.framents.ViewListFragment.java
com.logmypain.tasks.listeners.MonthSelectedListener.java
com.logmypain.tasks.listeners.ViewRecordsTabListener.java
com.logmypain.tasks.listeners.YearSelectedListener.java
com.logmypain.utils.CalendarUtil.java
com.logmypain.utils.CalendarViewDay.java
com.logmypain.utils.DatabaseHelper.java
com.logmypain.utils.SquareLayout.java
com.logmypain.utils.Models.HeadacheRecord.java
com.logmypain.utils.Models.Headache.java
com.logmypain.utils.Models.Trigger.java