1 2 23 24 package net.fenyo.gnetwatch.data; 25 26 import java.lang.reflect.*; 27 28 import net.fenyo.gnetwatch.*; 29 import net.fenyo.gnetwatch.GUI.*; 30 import net.fenyo.gnetwatch.targets.*; 31 32 import java.util.*; 33 34 import javax.swing.JFrame ; 35 import javax.swing.JLabel ; 36 37 import org.apache.commons.logging.Log; 38 import org.apache.commons.logging.LogFactory; 39 import org.eclipse.swt.SWT; 40 import org.eclipse.swt.browser.Browser; 41 import org.eclipse.swt.widgets.Control; 42 import org.eclipse.swt.widgets.Text; 43 44 49 50 public class BytesSentView extends DataView { 51 private static Log log = LogFactory.getLog(BytesSentView.class); 52 53 58 public BytesSentView(final GUI gui, final Target target) { 60 super(gui, target); 61 setItem("egress"); 62 } 63 64 69 protected BasicComponent createComponent() { 70 return new BytesSentComponent(getTarget()); 71 } 72 73 78 protected void disposed() { 79 super.disposed(); 80 getTarget().removeEvents(EventBytesSent.class); 81 } 82 83 88 protected String browserName() { 89 return getGUI().getConfig().getString("egress_interface"); 90 } 91 92 97 protected String browserUnit() { 98 return "bit/s"; 99 } 100 101 106 protected Class browserEventClass() { 107 return EventBytesSent.class; 108 } 109 110 115 protected StringBuffer getBrowserContent() { 116 return super.getBrowserContent(); 117 } 118 } 119 | Popular Tags |