KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > workbench > chart > PlotValue


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.workbench.chart;
16
17 import java.io.Serializable JavaDoc;
18
19 /**
20  * An single point of data in the plot.
21  *
22  * @author Howard Lewis Ship
23  * @since 1.0.10
24  */

25
26 public class PlotValue implements Serializable JavaDoc
27 {
28     private String JavaDoc name;
29
30     private int value;
31
32     public PlotValue()
33     {
34     }
35
36     public PlotValue(String JavaDoc name, int value)
37     {
38         this.name = name;
39         this.value = value;
40     }
41
42     public String JavaDoc getName()
43     {
44         return name;
45     }
46
47     public void setName(String JavaDoc name)
48     {
49         this.name = name;
50     }
51
52     public int getValue()
53     {
54         return value;
55     }
56
57     public void setValue(int value)
58     {
59         this.value = value;
60     }
61
62     public String JavaDoc toString()
63     {
64         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc("PlotValue@");
65         buffer.append(Integer.toHexString(hashCode()));
66         buffer.append('[');
67         buffer.append(name);
68         buffer.append(' ');
69         buffer.append(value);
70         buffer.append(']');
71
72         return buffer.toString();
73     }
74 }
Popular Tags