1 /*
2 * Copyright (c) 2003-2008 by Cosylab d. d.
3 *
4 * This file is part of CosyBeans.
5 *
6 * CosyBeans is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CosyBeans is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CosyBeans. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package com.cosylab.gui.displayers;
21
22 /**
23 * A specialization of the <code>Displayer</code> interface for Java primitive
24 * type <code>double[]</code>.
25 *
26 */
27 public interface DoubleSeqDisplayer extends Displayer, DoubleSeqConsumer
28 {
29 /**
30 * Sets the value displayed by the displayer. This method may be invoked
31 * only by the adapter delivering a new value from the modeling layer.
32 *
33 * @param value new value to be displayed
34 */
35 void setValue(double[] value);
36
37 /**
38 * Gets the value displayed by the displayer. This method can be invoked by
39 * any object and will probably most often be invoked by the GUI rendition
40 * code.
41 *
42 * @return double currently displayed value
43 */
44 public double[] getValue();
45
46 /**
47 * Returns the lower limit for the value used to render the display. This
48 * lower limit must be lower or equal to the actual limit that the value
49 * can take. If may only be lower (and not equal) in order to round the
50 * minimum to some easily depictable value.
51 *
52 * @return double the lower limit for the value rendition
53 */
54 public double getMinimum();
55
56 /**
57 * Returns the upper limit for the value used to render the display. This
58 * upper limit must be greater or equal to the actual upper limit that
59 * the value can take. It may only be greater (and not equal) in order to
60 * round the maximum to some easiliy depictable value.
61 *
62 * @return double the upper limit for the value rendition
63 */
64 public double getMaximum();
65
66 /**
67 * Returns the physical units of this value represented by a string.
68 *
69 * @return String the units of the value, to be rendered, if possible, near
70 * the actual value
71 */
72 public String getUnits();
73
74 /**
75 * Returns the C-style format string that is used to format the
76 * <code>double</code> value into text, if the displayer must perform such
77 * rendition.
78 *
79 * @return String printf style format specification
80 */
81 public String getFormat();
82
83 /**
84 * Sets the minimum value used for displaying in range.
85 *
86 * @param double new displaying minimum
87 *
88 * @see #getMinimum
89 */
90 public void setMinimum(double value);
91
92 /**
93 * Sets the maximum value used for displaying in range.
94 *
95 * @param double new displaying maximum
96 *
97 * @see #getGraphMax
98 */
99 public void setMaximum(double value);
100
101 /**
102 * Sets the physical units for this value. Manly called by the adapter or
103 * user during design time.
104 *
105 * @param String units for the value
106 *
107 * @see #getUnits
108 */
109 public void setUnits(String value);
110
111 /**
112 * Sets the C printf style format specification used to render double value
113 * into a String. Mainly called by the adapter or user during design time.
114 *
115 * @param String C-style format specification
116 *
117 * @see #getFormat
118 */
119 public void setFormat(String value);
120 }
121
122 /* __oOo__ */