1 /*
2 * ObjectLab, http://www.objectlab.co.uk/open is supporting JTreeMap.
3 *
4 * Based in London, we are world leaders in the design and development
5 * of bespoke applications for the securities financing markets.
6 *
7 * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
8 * ___ _ _ _ _ _
9 * / _ \| |__ (_) ___ ___| |_| | __ _| |__
10 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
11 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
12 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
13 * |__/
14 *
15 * www.ObjectLab.co.uk
16 *
17 * $Id$
18 *
19 * Copyright 2006 the original author or authors.
20 *
21 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
22 * use this file except in compliance with the License. You may obtain a copy of
23 * the License at
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Unless required by applicable law or agreed to in writing, software
28 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
29 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
30 * License for the specific language governing permissions and limitations under
31 * the License.
32 */
33 package net.sf.jtreemap.swing;
34
35 import lombok.AllArgsConstructor;
36 import lombok.EqualsAndHashCode;
37 import lombok.NoArgsConstructor;
38
39 /**
40 * Default Value <BR>
41 * The getLabel() method returns the "" + getValue()
42 *
43 * @author Laurent DUTHEIL
44 */
45 @EqualsAndHashCode(callSuper = true)
46 @AllArgsConstructor
47 @NoArgsConstructor
48 public class DefaultValue extends Value {
49 private static final long serialVersionUID = 367321198951855282L;
50
51 private double value;
52
53 /*
54 * (non-Javadoc)
55 *
56 * @see net.sf.jtreemap.swing.Value#getValue()
57 */
58 @Override
59 public double getValue() {
60 return this.value;
61 }
62
63 /*
64 * (non-Javadoc)
65 *
66 * @see net.sf.jtreemap.swing.Value#getLabel()
67 */
68 @Override
69 public String getLabel() {
70 return "" + this.value;
71 }
72
73 /*
74 * (non-Javadoc)
75 *
76 * @see net.sf.jtreemap.swing.Value#setValue(double)
77 */
78 @Override
79 public void setValue(final double value) {
80 this.value = value;
81 }
82
83 /*
84 * (non-Javadoc)
85 *
86 * @see net.sf.jtreemap.swing.Value#setLabel(java.lang.String)
87 */
88 @Override
89 public void setLabel(final String newLabel) {
90 // ignore
91 }
92 }
93 /*
94 * ObjectLab is supporing JTreeMap
95 *
96 * Based in London, we are world leaders in the design and development
97 * of bespoke applications for the securities financing markets.
98 *
99 * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
100 * ___ _ _ _ _ _
101 * / _ \| |__ (_) ___ ___| |_| | __ _| |__
102 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
103 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
104 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
105 * |__/
106 *
107 * www.ObjectLab.co.uk
108 */