01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * @created Aug 23, 2005
14: * @author James Dixon
15: */
16:
17: package org.pentaho.plugin.jfreechart;
18:
19: import java.awt.Font;
20:
21: import org.jfree.data.general.DefaultValueDataset;
22:
23: public abstract class WidgetDefinition extends DefaultValueDataset {
24:
25: /**
26: * Test Commit
27: */
28: private static final long serialVersionUID = -3570099313517484430L;
29:
30: private double minimum = 0;
31:
32: private double maximum = 100;
33:
34: String noDataMessage = null;
35:
36: public WidgetDefinition(double value, double minimum, double maximum) {
37: this .minimum = minimum;
38: this .maximum = maximum;
39: setValue(new Double(value));
40: }
41:
42: /**
43: * Gets the minimum value the widget can display
44: *
45: * @return The minimum value the widget can display
46: */
47: public double getMinimum() {
48: return minimum;
49: }
50:
51: /**
52: * Sets the minimum value the widget can display
53: *
54: * @param minimum
55: * The minimum value the widget can display
56: */
57:
58: public void setMinimum(double minimum) {
59: this .minimum = minimum;
60: }
61:
62: /**
63: * Gets the maximum value the widget can display
64: *
65: * @return The maximum value the widget can display
66: */
67: public double getMaximum() {
68: return maximum;
69: }
70:
71: /**
72: * Sets the minimum value the widget can display
73: *
74: * @param maximum
75: * The maximum value the widget can display
76: */
77:
78: public void setMaximum(double maximum) {
79: this .maximum = maximum;
80: }
81:
82: public abstract Font getValueFont();
83:
84: public String getNoDataMessage() {
85: return noDataMessage;
86: }
87:
88: }
|