Revision 181

tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/messages/messages_fr.properties (revision 181)
28 28
CorrespondanceAnalysisEditorInput_29=Cont
29 29
CorrespondanceAnalysisEditorInput_2=Histogramme des valeurs propres
30 30
CorrespondanceAnalysisEditorInput_30=Cos²
31
CorrespondanceAnalysisEditorInput_3=Le résultat de l'analyse des correspondances ne peut \u00EAtre nul 
31
CorrespondanceAnalysisEditorInput_3=Le résultat de l'analyse des correspondances ne peut être nul 
32 32
CorrespondanceAnalysisEditorInput_4=#
33 33
CorrespondanceAnalysisEditorInput_5=Valeur propre
34 34
CorrespondanceAnalysisEditorInput_8=Info lignes
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 181)
6 6
import org.eclipse.swt.widgets.Composite;
7 7
import org.eclipse.swt.widgets.ToolItem;
8 8
import org.txm.ca.core.functions.CA;
9
import org.txm.ca.rcp.chartsengine.events.CAPointSelectionCallBack;
9
import org.txm.ca.core.preferences.CAPreferences;
10 10
import org.txm.ca.rcp.chartsengine.events.CASelectionListener;
11 11
import org.txm.ca.rcp.messages.CAUIMessages;
12 12
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
13 13
import org.txm.chartsengine.rcp.editors.ChartEditorInput;
14 14
import org.txm.chartsengine.rcp.editors.ChartEditorPart;
15
import org.txm.chartsengine.rcp.events.EventCallBackHandler;
15
import org.txm.core.preferences.TXMPreferences;
16 16
import org.txm.rcpapplication.IImageKeys;
17 17
import org.txm.searchengine.cqp.corpus.Partition;
18 18

  
......
75 75
		//this.showColumns.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_COLUMS_LABEL);
76 76
		this.showColumns.setToolTipText(CAUIMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_COLUMS_TOOLTIP);
77 77
		this.showColumns.setImage(IImageKeys.getImage(IImageKeys.CHARTS_CA_SHOW_COLUMNS));
78
		// FIXME: this code should be restored when the charts rendering prefs will be moved outside of the CA object
79
		//this.showColumns.setSelection(TxmPreferences.getBoolean(CAPreferencePage.SHOWINDIVIDUALS));
80
		this.showColumns.setSelection(this.getResultData().isShowIndividuals());
78
		this.showColumns.setSelection(TXMPreferences.getBoolean(CAPreferences.PREFERENCES_NODE, this.getResultData(), CAPreferences.SHOW_INDIVIDUALS));
81 79
		this.showColumns.addSelectionListener(new CASelectionListener(this, CASelectionListener.SHOW_HIDE_COLUMNS));
82 80

  
83 81
		// Show/hide rows
......
86 84
		//this.showRows.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_ROWS_LABEL);
87 85
		this.showRows.setToolTipText(CAUIMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_ROWS_TOOLTIP);
88 86
		this.showRows.setImage(IImageKeys.getImage(IImageKeys.CHARTS_CA_SHOW_ROWS));
89
		// FIXME: this code should be restored when the charts rendering prefs will be moved outside of the CA object
90
		//this.showRows.setSelection(TxmPreferences.getBoolean(CAPreferencePage.SHOWVARIABLES));
91
		this.showRows.setSelection(this.getResultData().isShowVariables());
87
		this.showRows.setSelection(TXMPreferences.getBoolean(CAPreferences.PREFERENCES_NODE, this.getResultData(), CAPreferences.SHOW_VARIABLES));
92 88
		this.showRows.addSelectionListener(new CASelectionListener(this, CASelectionListener.SHOW_HIDE_ROWS));
93 89

  
94 90
//
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/chartsengine/events/CASelectionListener.java (revision 181)
46 46
	public void widgetSelected(SelectionEvent e) {
47 47

  
48 48
		boolean giveFocusToChart = true;
49
		boolean resetView = false;
49 50
		
50 51
		//Show/hide columns
51 52
		if(this.commandId == CASelectionListener.SHOW_HIDE_COLUMNS)	{
......
56 57
				return;
57 58
			}
58 59

  
59
			TXMPreferences.putLocalBoolean(this.chartEditor.getResultData(), CAPreferences.SHOW_VARIABLES, ((ToolItem) e.getSource()).getSelection());
60
			TXMPreferences.putLocalBoolean(this.chartEditor.getResultData(), CAPreferences.SHOW_INDIVIDUALS, ((ToolItem) e.getSource()).getSelection());
60 61
		}
61 62
		//Show/hide rows
62 63
		else if(this.commandId == CASelectionListener.SHOW_HIDE_ROWS)	{
......
67 68
				return;
68 69
			}
69 70
			
70
			TXMPreferences.putLocalBoolean(this.chartEditor.getResultData(), CAPreferences.SHOW_INDIVIDUALS, ((ToolItem) e.getSource()).getSelection());
71
			TXMPreferences.putLocalBoolean(this.chartEditor.getResultData(), CAPreferences.SHOW_VARIABLES, ((ToolItem) e.getSource()).getSelection());
71 72
		}
72 73
		// Change factors
73 74
		else if(this.commandId == CASelectionListener.CHANGE_FACTORS)	{
......
88 89
			dimension1 = Integer.parseInt(split[0]);
89 90
			dimension2 = Integer.parseInt(split[1]);
90 91

  
91
			((CA) this.chartEditor.getResultData()).setDimensions(dimension1, dimension2);
92
			TXMPreferences.putLocalInt(this.chartEditor.getResultData(), CAPreferences.FIRST_DIMENSION, dimension1);
93
			TXMPreferences.putLocalInt(this.chartEditor.getResultData(), CAPreferences.SECOND_DIMENSION, dimension2);
92 94

  
93
			this.chartEditor.resetView();
95
			resetView = true;
94 96
		}
95 97
		// Change chart items selection order
96 98
		else if(this.commandId == CASelectionListener.SET_CHART_ITEMS_SELECTION_ORDER)	{
......
102 104
			
103 105
		}
104 106
		
105

  
107
		this.chartEditor.updateChart();
106 108
		this.chartEditor.loadChart(); // needed for file based implementations of charts engine that modify the external existing chart file
107 109
		
110
		if(resetView)	{
111
			this.chartEditor.resetView();
112
		}
113
		
108 114
		if(giveFocusToChart)	{
109 115
			this.chartEditor.forceFocus();
110 116
		}

Also available in: Unified diff