Lines Matching refs:event
968 Event event = new Event(); in createDNAStrands() local
980 currEvent.copyTo(event); in createDNAStrands()
981 if (event.startDay < firstJulianDay) { in createDNAStrands()
982 event.startDay = firstJulianDay; in createDNAStrands()
983 event.startTime = 0; in createDNAStrands()
987 if (event.startTime > DAY_IN_MINUTES - minOtherMinutes) { in createDNAStrands()
988 event.startTime = DAY_IN_MINUTES - minOtherMinutes; in createDNAStrands()
990 if (event.endDay > lastJulianDay) { in createDNAStrands()
991 event.endDay = lastJulianDay; in createDNAStrands()
992 event.endTime = DAY_IN_MINUTES - 1; in createDNAStrands()
996 if (event.endTime < minOtherMinutes) { in createDNAStrands()
997 event.endTime = minOtherMinutes; in createDNAStrands()
1003 if (event.startDay == event.endDay && in createDNAStrands()
1004 event.endTime - event.startTime < minOtherMinutes) { in createDNAStrands()
1007 if (event.startTime < WORK_DAY_START_MINUTES) { in createDNAStrands()
1010 event.endTime = Math.min(event.startTime + minOtherMinutes, in createDNAStrands()
1013 } else if (event.endTime > WORK_DAY_END_MINUTES) { in createDNAStrands()
1015 event.endTime = Math.min(event.endTime + minOtherMinutes, DAY_IN_MINUTES - 1); in createDNAStrands()
1017 if (event.endTime - event.startTime < minOtherMinutes) { in createDNAStrands()
1018 event.startTime = event.endTime - minOtherMinutes; in createDNAStrands()
1025 addNewSegment(segments, event, strands, firstJulianDay, 0, minMinutes); in createDNAStrands()
1031 int startMinute = (event.startDay - firstJulianDay) * DAY_IN_MINUTES + event.startTime; in createDNAStrands()
1032 int endMinute = Math.max((event.endDay - firstJulianDay) * DAY_IN_MINUTES in createDNAStrands()
1033 + event.endTime, startMinute + minMinutes); in createDNAStrands()
1133 addNewSegment(segments, event, strands, firstJulianDay, lastSegment.endMinute, in createDNAStrands()
1142 private static void addAllDayToStrands(Event event, HashMap<Integer, DNAStrand> strands, in addAllDayToStrands() argument
1151 int end = Math.min(event.endDay - firstJulianDay, numDays - 1); in addAllDayToStrands()
1152 for (int i = Math.max(event.startDay - firstJulianDay, 0); i <= end; i++) { in addAllDayToStrands()
1158 strand.allDays[i] = event.color; in addAllDayToStrands()
1229 private static void addNewSegment(LinkedList<DNASegment> segments, Event event, in addNewSegment() argument
1231 if (event.startDay > event.endDay) { in addNewSegment()
1232 Log.wtf(TAG, "Event starts after it ends: " + event.toString()); in addNewSegment()
1235 if (event.startDay != event.endDay) { in addNewSegment()
1237 lhs.color = event.color; in addNewSegment()
1238 lhs.startDay = event.startDay; in addNewSegment()
1240 lhs.startTime = event.startTime; in addNewSegment()
1244 while (lhs.startDay != event.endDay) { in addNewSegment()
1254 lhs.endTime = event.endTime; in addNewSegment()
1255 event = lhs; in addNewSegment()
1259 int dayOffset = (event.startDay - firstJulianDay) * DAY_IN_MINUTES; in addNewSegment()
1262 segment.startMinute = Math.max(dayOffset + event.startTime, minStart); in addNewSegment()
1266 segment.endMinute = Math.max(dayOffset + event.endTime, minEnd); in addNewSegment()
1271 segment.color = event.color; in addNewSegment()
1272 segment.day = event.startDay; in addNewSegment()