예제 #1
0
  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);
  }
예제 #2
0
 public synchronized int getSize() {
   return eventStringList.size();
 }
예제 #3
0
 public synchronized Object getElementAt(int index) {
   return eventStringList.get(eventStringList.size() - index - 1);
 }