1 |
< |
abstract class DataComponent extends javax.swing.JPanel { |
1 |
> |
//---PACKAGE DECLARATION--- |
2 |
> |
|
3 |
> |
//---IMPORTS--- |
4 |
> |
import javax.swing.JPanel; |
5 |
> |
|
6 |
> |
/** |
7 |
> |
* This is the abstract class for all |
8 |
> |
* data components. |
9 |
> |
* |
10 |
> |
* This is an abstract class based on a JPanel ensuring |
11 |
> |
* that all components can be handled like a JPanel. It |
12 |
> |
* extends the JPanel by adding a specific setValue function |
13 |
> |
* this tells the component to update its data display however it |
14 |
> |
* sees fit. This value is the string value obtained from an |
15 |
> |
* XML packet, it is up to the component to convert and display |
16 |
> |
* as it chooses, if there is a problem doing this then it |
17 |
> |
* can throw a DataFormatException to indicate the problem. |
18 |
> |
* |
19 |
> |
* @author $Author$ |
20 |
> |
* @version $Id$ |
21 |
> |
*/ |
22 |
> |
abstract class DataComponent extends JPanel { |
23 |
> |
|
24 |
> |
//---FINAL ATTRIBUTES--- |
25 |
> |
|
26 |
> |
/** |
27 |
> |
* The current CVS revision of this class |
28 |
> |
*/ |
29 |
> |
public final String REVISION = "$Revision$"; |
30 |
> |
|
31 |
> |
//---STATIC METHODS--- |
32 |
> |
|
33 |
> |
//---CONSTRUCTORS--- |
34 |
> |
|
35 |
> |
//---PUBLIC METHODS--- |
36 |
> |
|
37 |
> |
//---PRIVATE METHODS--- |
38 |
> |
|
39 |
> |
//---ACCESSOR/MUTATOR METHODS--- |
40 |
> |
|
41 |
> |
/** |
42 |
> |
* This takes the String value of the parameter that this component |
43 |
> |
* is monitoring direct from the packet, it then performs all |
44 |
> |
* approriate conversions and displays the data. |
45 |
> |
* |
46 |
> |
* @param value the value for this data component |
47 |
> |
* @throws DataFormatException if there was a problem converting the data for display |
48 |
> |
*/ |
49 |
|
public abstract void setValue(String value) throws DataFormatException; |
50 |
+ |
|
51 |
+ |
//---ATTRIBUTES--- |
52 |
+ |
|
53 |
+ |
//---STATIC ATTRIBUTES--- |
54 |
+ |
|
55 |
|
} |