Lines Matching refs:segment
886 // A segment is a single continuous length of time occupied by a single
892 int day; // quick reference to the day this segment is on
1002 // is enforced in the segment code.
1023 // This handles adding the first segment
1029 // segment in the list
1041 // If we start before the last segment in the list ends we need to
1046 // find the last segment this event intersects with
1050 // for each segment this event intersects with
1052 // if the segment is already a conflict ignore it
1056 // if the event ends before the segment and wouldn't create
1057 // a segment that is too small split off the right side
1072 // if the event starts after the segment and wouldn't create
1073 // a segment that is too small split off the left side
1083 // current segment.
1091 // if the right side is black merge this with the segment to
1100 // point at the new current segment
1104 // if the left side is black merge this with the segment to
1113 // point at the new current segment
1115 // point i at the new current segment in case new
1131 // If this event extends beyond the last segment add a new segment
1178 // Go through each segment and compute its points
1179 for (DNASegment segment : segments) {
1181 DNAStrand strand = strands.get(segment.color);
1182 int dayIndex = segment.day - firstJulianDay;
1183 int dayStartMinute = segment.startMinute % DAY_IN_MINUTES;
1184 int dayEndMinute = segment.endMinute % DAY_IN_MINUTES;
1196 Log.d(TAG, "Adding " + Integer.toHexString(segment.color) + " at x,y0,y1: " + x
1226 * Add a new segment based on the event provided. This will handle splitting
1257 // Create the new segment and compute its fields
1258 DNASegment segment = new DNASegment();
1262 segment.startMinute = Math.max(dayOffset + event.startTime, minStart);
1265 int minEnd = Math.min(segment.startMinute + minMinutes, endOfDay);
1266 segment.endMinute = Math.max(dayOffset + event.endTime, minEnd);
1267 if (segment.endMinute > endOfDay) {
1268 segment.endMinute = endOfDay;
1271 segment.color = event.color;
1272 segment.day = event.startDay;
1273 segments.add(segment);
1276 DNAStrand strand = getOrCreateStrand(strands, segment.color);