View Javadoc

1   /*
2    * Copyright (c) 2006 Stiftung Deutsches Elektronen-Synchroton,
3    * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY.
4    *
5    * THIS SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS" BASIS.
6    * WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
7    * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE AND
8    * NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
9    * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
10   * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
11   * THE USE OR OTHER DEALINGS IN THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
12   * IN ANY RESPECT, THE USER ASSUMES THE COST OF ANY NECESSARY SERVICING, REPAIR OR
13   * CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
14   * NO USE OF ANY SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
15   * DESY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
16   * OR MODIFICATIONS.
17   * THE FULL LICENSE SPECIFYING FOR THE SOFTWARE THE REDISTRIBUTION, MODIFICATION,
18   * USAGE AND OTHER RIGHTS AND OBLIGATIONS IS INCLUDED WITH THE DISTRIBUTION OF THIS
19   * PROJECT IN THE FILE LICENSE.HTML. IF THE LICENSE IS NOT INCLUDED YOU MAY FIND A COPY
20   * AT HTTP://WWW.DESY.DE/LEGAL/LICENSE.HTM
21   */
22  
23  package de.desy.acop.displayers.tools;
24  
25  import de.desy.acop.displayers.AcopTrendChart;
26  import de.desy.acop.displayers.chart.HistoryParameters;
27  
28  /**
29   * <code>AcopGraphHistoryParameters</code> is an extension of the 
30   * <code>AcopGrapParameters</code> which can in addition holds also
31   * <code>HistoryParameters</code>. This parameters are inteded to be used
32   * in combinataion with <code>AcopTrendChart</code>.
33   * 
34   * @author Tilen Kusterle, Cosylab
35   * @see AcopTrendChart
36   * @see HistoryParameters
37   */
38  public class AcopGraphHistoryParameters extends AcopGraphParameters {
39  
40  	
41  	private static final long serialVersionUID = 7485604445974438082L;
42  
43  	/**
44  	 * Constructs new AcopGraphhistoryParameters including all parameters
45  	 * from the <code>acopGraphParameters</code> and the supplied
46  	 * <code>HistoryParameters</code>.
47  	 * 
48  	 * @param acopGraphParameters parameters holder
49  	 * @param historyParameters history connection point
50  	 */
51  	public AcopGraphHistoryParameters(AcopGraphParameters acopGraphParameters, HistoryParameters historyParameters) {
52  		super(
53  				acopGraphParameters.getConnectionParameters(),
54  				acopGraphParameters.getArrayIndex(),
55  				acopGraphParameters.getMinimum(),
56  				acopGraphParameters.getMaximum(),
57  				acopGraphParameters.getUnits(),
58  				acopGraphParameters.getFormat(),
59  				acopGraphParameters.getColor(),
60  				acopGraphParameters.getFFT(),
61  				acopGraphParameters.getDrawStyle(),
62  				acopGraphParameters.getMode(),
63  				acopGraphParameters.getWidth(),
64  				acopGraphParameters.isTrend(),
65  				acopGraphParameters.getTrendLength(),
66  				acopGraphParameters.getConverter()
67  				);
68  		values.put("historyParameters", historyParameters);
69  	}
70  	
71  	/**
72  	 * Constructs a new AcopGraphHistoryParameters with null HistoryParameters.
73  	 * 
74  	 * @param acopGraphParameters
75  	 */
76  	public AcopGraphHistoryParameters(AcopGraphParameters acopGraphParameters) {
77  		this(acopGraphParameters, null);
78  	}
79  
80  	/**
81  	 * Returns the HistoryParameters of this parameters.
82  	 * 
83  	 * @return the historyParameters
84  	 */
85  	public HistoryParameters getHistoryParameters() {
86  		return (HistoryParameters) values.get("historyParameters");
87  	}
88  
89  	/**
90  	 * Sets the HistoryParameters to this parameters container.
91  	 * 
92  	 * @param historyParameters the historyParameters to set
93  	 */
94  	public void setHistoryParameters(HistoryParameters historyParameters) {
95  		values.put("historyParameters", historyParameters);
96  	}
97  
98  }