Revision 411

tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java (revision 411)
4 4
import java.io.File;
5 5
import java.util.ArrayList;
6 6

  
7
import org.txm.core.results.ITXMResult;
7
import org.txm.core.results.TXMResult;
8 8
import org.txm.utils.logger.Log;
9 9

  
10 10

  
......
53 53
	
54 54
	
55 55
	/**
56
	 * Creates a chart object according to the specified result data and parameters.
57
	 * @param result
58
	 * @param preferencesNode
59
	 * @return
60
	 */
61
	public abstract Object createChart(ITXMResult result, String preferencesNode);
62
	
63
	/**
64 56
	 * Creates a chart object according to the specified result data.
65 57
	 * @param result
66 58
	 * @return
67 59
	 */
68
	public Object createChart(ITXMResult result)	{
69
		return this.createChart(result, null);
70
	}
60
	public abstract Object createChart(TXMResult result);
71 61
	
62
	
72 63
	/**
73 64
	 * Creates a chart file according to the specified result data and parameters.
74 65
	 * @param result
......
76 67
	 * @param preferencesNode
77 68
	 * @return
78 69
	 */
79
	public File createChartFile(ITXMResult result, File file, String preferencesNode)	{
80
		Object chart = this.createChart(result, preferencesNode);
70
	public File createChartFile(TXMResult result, File file)	{
71
		Object chart = this.createChart(result);
81 72
		// Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc. 
82
		this.updateChart(chart, result, preferencesNode);
73
		this.updateChart(chart, result);
83 74
		return this.chartsEngine.createChartFile(chart, file);
84 75
	}
85 76
	
......
90 81
	 * @param params
91 82
	 * @return
92 83
	 */
93
	public File createChartFile(ITXMResult result, String fileNamePrefix, String preferencesNode)	{
94
		return this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix), preferencesNode);
84
	public File createChartFile(TXMResult result, String fileNamePrefix)	{
85
		return this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix));
95 86
	}
96 87
	
97 88

  
......
101 92
	 * @param params
102 93
	 * @return
103 94
	 */
104
	public File createChartFile(ITXMResult result, String preferencesNode) {
105
		return this.createChartFile(result, this.fileNamePrefix, preferencesNode);
95
	public File createChartFile(TXMResult result) {
96
		return this.createChartFile(result, this.fileNamePrefix);
106 97
	}
107 98

  
108 99
	/**
......
115 106
	 * @param result
116 107
	 * @param preferencesNode
117 108
	 */
118
	public void updateChart(Object chart, ITXMResult result, String preferencesNode)	{
109
	public void updateChart(Object chart, TXMResult result)	{
119 110
		Log.severe("ChartCreator.updateChart(): not implemented. This method is intended to be overridden in subclasses."); //$NON-NLS-1$
120 111
	}
121 112
	
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/IChartResult.java (revision 411)
1 1
package org.txm.chartsengine.core.results;
2 2

  
3
import org.txm.core.results.ITXMResult;
4 3

  
5 4
/**
6 5
 * 
......
8 7
 * @author sjacquot
9 8
 *
10 9
 */
11
public interface IChartResult extends ITXMResult {
10
public interface IChartResult {
12 11

  
13 12

  
14 13
}
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 411)
3 3
 */
4 4
package org.txm.chartsengine.core.results;
5 5

  
6
import org.txm.core.results.ITXMResult;
7 6
import org.txm.core.results.TXMResult;
8 7

  
9 8
/**
......
17 16
	 * 
18 17
	 * @param parent
19 18
	 */
20
	public ChartResult(ITXMResult parent) {
19
	public ChartResult(TXMResult parent) {
21 20
		super(parent);
22 21
	}
23 22
	
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/Theme.java (revision 411)
48 48
	 */
49 49
	public Theme() {
50 50
		
51
		this.setMonochromeColor(TXMPreferences.getString(ChartsEnginePreferences.PREFERENCES_NODE, ChartsEnginePreferences.MONOCHROME_COLOR));
51
		this.setMonochromeColor(TXMPreferences.getString(ChartsEnginePreferences.MONOCHROME_COLOR, ChartsEnginePreferences.PREFERENCES_NODE));
52 52
		
53 53
		this.palette1 = new ArrayList<Color>(1);
54 54
		this.palette5 = new ArrayList<Color>(5);
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java (revision 411)
31 31
	static	{
32 32
		// creates charts engine
33 33
		ChartsEngine.createChartsEngines();
34
		ChartsEngine.setCurrrentChartsEngine(TXMPreferences.getString(ChartsEnginePreferences.PREFERENCES_NODE, ChartsEnginePreferences.CURRENT_NAME));
34
		ChartsEngine.setCurrrentChartsEngine(TXMPreferences.getString(ChartsEnginePreferences.CURRENT_NAME, ChartsEnginePreferences.PREFERENCES_NODE));
35 35
		
36 36
		TXMPreferences.alternativeNodesQualifiers.add(ChartsEnginePreferences.PREFERENCES_NODE);
37 37

  
......
335 335
	 * @return
336 336
	 */
337 337
	public static Font createFont()	{
338
		return createFont(TXMPreferences.getString(ChartsEnginePreferences.PREFERENCES_NODE, ChartsEnginePreferences.FONT));
338
		return createFont(TXMPreferences.getString(ChartsEnginePreferences.FONT, ChartsEnginePreferences.PREFERENCES_NODE));
339 339
	}
340 340
	
341 341
	/**

Also available in: Unified diff