public synchronized void eventReceived(LogEvent event) { String dateStr = event.receiveTime.toString(); String eventString = dateStr.substring(11, 19) + " " + "Node: " + event.sourceAddr + " " + "Time: " + (event.nodeEventTime / 1000.0) + " sec " + event.event; System.out.println(eventString); eventStringList.add(eventString); fireIntervalAdded(this, 0, 1); }
public synchronized int getSize() { return eventStringList.size(); }
public synchronized Object getElementAt(int index) { return eventStringList.get(eventStringList.size() - index - 1); }