Lines Matching refs:segments
857 // color. Segments should never span multiple days.
866 * Converts a list of events to a list of segments to draw. Assumes list is
869 * The algorithm goes over all the events and creates a set of segments
870 * ordered by start time. This list of segments is then converted into a
882 * <li>All segments drawn will maintain at least minPixels height, except
920 LinkedList<DNASegment> segments = new LinkedList<DNASegment>();
994 if (segments.size() == 0) {
995 addNewSegment(segments, event, strands, firstJulianDay, 0, minMinutes);
1000 DNASegment lastSegment = segments.getLast();
1015 int i = segments.size();
1017 while (--i >= 0 && endMinute < segments.get(i).startMinute);
1021 for (; i >= 0 && startMinute <= (currSegment = segments.get(i)).endMinute; i--) {
1035 segments.add(i + 1, rhs);
1039 + segments.get(i).toString());
1052 // referencing the segments to the right and left of the
1054 segments.add(i++, lhs);
1058 + segments.get(i).toString());
1063 if (i + 1 < segments.size()) {
1064 DNASegment rhs = segments.get(i + 1);
1068 segments.remove(currSegment);
1077 DNASegment lhs = segments.get(i - 1);
1081 segments.remove(currSegment);
1103 addNewSegment(segments, event, strands, firstJulianDay, lastSegment.endMinute,
1107 weaveDNAStrands(segments, firstJulianDay, strands, top, bottom, dayXs);
1133 // This processes all the segments, sorts them by color, and generates a
1135 private static void weaveDNAStrands(LinkedList<DNASegment> segments, int firstJulianDay,
1137 // First, get rid of any colors that ended up with no segments
1149 for (DNASegment segment : segments) {
1197 * segments across day boundaries and ensures a minimum size for segments.
1199 private static void addNewSegment(LinkedList<DNASegment> segments, Event event,
1215 addNewSegment(segments, lhs, strands, firstJulianDay, minStart, minMinutes);
1243 segments.add(segment);