public Dialog getPreviousPoppedDialog(int time) { Dialog d = null; listIt = eventList.listIterator(); while (listIt.hasNext()) { Event temp = listIt.next(); if (temp.getTimeStamp() > time) { break; } if (temp.getType() == DIA_TIME) { d = (Dialog) temp; } } return d; }
public void checkCuttingOnAction(SceneManager sm, Timeline tl) { LinkedList<Event> eList = sm.getEventList(); ArrayList<Tick> tArr = tl.getTickArr(); ListIterator<Event> listIt; for (int i = 0; i < tArr.size(); i++) { // println("here"); listIt = eList.listIterator(); while (listIt.hasNext()) { Event tempEvent = listIt.next(); // check for time colisions. // println("event " + tempEvent.getTimeStamp() + " tick time " + // tArr.get(i).getTimeStamp() + " " + tempEvent.type); if ((tempEvent.getType() == DIA_TIME) && (tempEvent.getTimeStamp() == tArr.get(i).getTimeStamp())) { println("CUTTING ON ACTION ERROR!"); tArr.get(i).setCutViolation(true); } else { tArr.get(i).setCutViolation(false); } } } }