Révision 414

tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 414)
38 38
import java.util.Map;
39 39

  
40 40
import org.txm.chartsengine.r.core.themes.DefaultTheme;
41
import org.txm.core.results.ITXMResult;
42
import org.txm.functions.Function;
41
import org.txm.functions.TXMCommand;
43 42
import org.txm.progression.core.messages.ProgressionCoreMessages;
44 43
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
45 44
import org.txm.searchengine.cqp.corpus.Corpus;
......
59 58
 * @author mdecorde
60 59
 * @author sjacquot
61 60
 */
62
public class Progression extends Function implements ITXMResult	{
61
public class Progression extends TXMCommand	{
63 62

  
64 63
	/** The corpus. */
65 64
	Corpus corpus;
tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionChartCreator.java (revision 414)
16 16
import org.jfree.ui.TextAnchor;
17 17
import org.txm.chartsengine.core.ChartsEngine;
18 18
import org.txm.core.preferences.TXMPreferences;
19
import org.txm.core.results.ITXMResult;
19
import org.txm.core.results.TXMResult;
20 20
import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
21 21
import org.txm.chartsengine.jfreechart.core.renderers.MultipleItemsSelector;
22 22
import org.txm.chartsengine.jfreechart.core.renderers.interfaces.IRendererWithItemSelection;
......
42 42
	}
43 43

  
44 44
	@Override
45
	public JFreeChart createChart(ITXMResult result, String preferencesNode) {
45
	public JFreeChart createChart(TXMResult result) {
46 46

  
47 47
		
48 48
		Progression progression = (Progression) result;
49 49
		
50 50
		// parameters
51
		boolean monostyle = TXMPreferences.getBoolean(preferencesNode, result, ProgressionPreferences.CHART_MONO_STYLE);
52
		boolean cumulative = TXMPreferences.getBoolean(preferencesNode, result, ProgressionPreferences.CHART_CUMULATIVE);
51
		boolean monostyle = result.getBooleanParameterValue(ProgressionPreferences.CHART_MONO_STYLE);
52
		boolean cumulative = result.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
53 53
		
54 54
		
55 55
		JFreeChart chart = null;
tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionChartCreator.java (revision 414)
8 8
import org.txm.chartsengine.r.core.RChartCreator;
9 9
import org.txm.chartsengine.r.core.themes.DefaultTheme;
10 10
import org.txm.core.preferences.TXMPreferences;
11
import org.txm.core.results.ITXMResult;
11
import org.txm.core.results.TXMResult;
12 12
import org.txm.progression.core.chartsengine.base.ProgressionChartCreator;
13 13
import org.txm.progression.core.chartsengine.base.Utils;
14 14
import org.txm.progression.core.functions.Progression;
......
31 31
	}
32 32

  
33 33
	@Override
34
	public Object createChart(ITXMResult result, String preferencesNode) {
34
	public Object createChart(TXMResult result) {
35 35
		// TODO Auto-generated method stub
36 36
		return null;
37 37
	}
38 38

  
39 39
	@Override
40
	public File createChartFile(ITXMResult result, File file, String preferencesNode) {
40
	public File createChartFile(TXMResult result, File file) {
41 41

  
42 42
		try {
43 43
			
44 44
			Progression progression = (Progression) result;
45 45
			
46 46
			// parameters
47
			int renderingColorMode = TXMPreferences.getInt(preferencesNode, result, ChartsEnginePreferences.RENDERING_COLORS_MODE);
47
			int renderingColorMode = result.getIntParameterValue(ChartsEnginePreferences.RENDERING_COLORS_MODE);
48 48
			
49
			boolean monostyle = TXMPreferences.getBoolean(preferencesNode, ProgressionPreferences.CHART_MONO_STYLE);
50
			boolean cumulative = TXMPreferences.getBoolean(preferencesNode, ProgressionPreferences.CHART_CUMULATIVE);
49
			boolean monostyle = result.getBooleanParameterValue(ProgressionPreferences.CHART_MONO_STYLE);
50
			boolean cumulative = result.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
51 51
			
52 52
			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
53 53
			rw.eval("library(textometry)");
......
129 129

  
130 130
			// Create chart title
131 131
			String title = "";
132
			if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_TITLE))	{
132
			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE))	{
133 133
				title = Utils.createProgressionChartTitle(progression, cumulative);
134 134
			}
135 135

  
......
142 142

  
143 143
			// FIXME: the grid must be plotted behind the chart and it is not possible with the current R progression object code
144 144
			// Grid
145
			if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_GRID))	{
145
			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID))	{
146 146
				cmd += this.getChartsEngine().getGridPlotCmd();
147 147
			}
148 148
			

Formats disponibles : Unified diff