KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > fenyo > gnetwatch > data > GeneralInformationsView


1
2 /*
3  * GNetWatch
4  * Copyright 2006, 2007 Alexandre Fenyo
5  * gnetwatch@fenyo.net
6  *
7  * This file is part of GNetWatch.
8  *
9  * GNetWatch is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * GNetWatch is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with GNetWatch; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  */

23
24 package net.fenyo.gnetwatch.data;
25
26 import net.fenyo.gnetwatch.*;
27 import net.fenyo.gnetwatch.GUI.*;
28 import net.fenyo.gnetwatch.targets.Target;
29
30 import java.util.*;
31
32 import org.apache.commons.logging.Log;
33 import org.apache.commons.logging.LogFactory;
34 import org.eclipse.swt.browser.Browser;
35
36 /**
37  * This view is intended to display general informations.
38  * @author Alexandre Fenyo
39  * @version $Id: GeneralInformationsView.java,v 1.10 2007/03/03 00:38:20 fenyo Exp $
40  */

41
42 public class GeneralInformationsView extends DataView {
43   private static Log log = LogFactory.getLog(GeneralInformationsView.class);
44
45   /**
46    * Constructor.
47    * @param gui current GUI instance.
48    * @param target ingress target interface.
49    */

50   // GUI thread
51
public GeneralInformationsView(final GUI gui, final Target target) {
52     // attention : instancier cette classe dans un sync(sync_tree)
53
super(gui, target);
54   }
55
56   /**
57    * Creates a new display component.
58    * @param none.
59    * @return BasicComponent new display component.
60    */

61   protected BasicComponent createComponent() {
62     return null;
63   }
64
65   /**
66    * Returns the name of report this view can generate.
67    * @param none.
68    * @return String report name.
69    */

70   protected String JavaDoc browserName() {
71     return getGUI().getConfig().getString("general");
72   }
73
74   /**
75    * Returns the data unit for values this view can generate.
76    * @param none.
77    * @return String data unit.
78    */

79   protected String JavaDoc browserUnit() {
80     return getGUI().getConfig().getString("byte") + "/s";
81   }
82
83   /**
84    * Returns the event class this view can manage.
85    * @param none.
86    * @return Class event class.
87    */

88   protected Class JavaDoc browserEventClass() {
89     return null;
90   }
91
92   /**
93    * Returns a report as an HTML string.
94    * @param none.
95    * @return StringBull HTML report.
96    */

97   protected StringBuffer JavaDoc getBrowserContent() {
98     return super.getBrowserContent();
99   }
100 }
101
Popular Tags