1 2 23 package net.fenyo.gnetwatch.GUI; 24 25 import java.io.*; 26 import java.util.Date ; 27 import java.awt.*; 28 import java.awt.event.WindowEvent ; 29 import java.awt.font.*; 30 import java.awt.geom.*; 31 import java.awt.image.*; 32 import javax.swing.*; 33 import javax.imageio.*; 34 35 import net.fenyo.gnetwatch.data.*; 36 import net.fenyo.gnetwatch.targets.*; 37 38 import org.apache.commons.logging.Log; 39 import org.apache.commons.logging.LogFactory; 40 41 46 47 public class HTTPPagesComponent extends BasicComponent { 48 private static Log log = LogFactory.getLog(HTTPPagesComponent.class); 49 50 54 public HTTPPagesComponent(final Target target) { 56 super(target); 57 } 58 59 64 public void windowClosing(final WindowEvent e) { 66 getTarget().unregisterComponent(this, EventHTTPPages.class); 67 } 68 69 74 protected void updateValues() { 77 synchronized (getSyncUpdate()) { 78 getTarget().registerComponent(this, EventHTTPPages.class); 79 final long end = System.currentTimeMillis(); 80 final long begin = end - getDelayPerInterval() * 81 (getDimension().width - axis_margin_left - axis_margin_right) / pixels_per_interval; 82 setEvents(getTarget().getEvents(new Date (begin), new Date (end), EventHTTPPages.class)); 83 updateVerticalScale(); 84 } 85 } 86 } 87 | Popular Tags |