Revision 1460

tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 1460)
278 278
			((ColsRowsInfosEditor)this.parentMultiPagesEditor.getEditors().get(2)).refresh(update);
279 279
			((ColsRowsInfosEditor)this.parentMultiPagesEditor.getEditors().get(3)).refresh(update);
280 280
			// eigenvalues chart
281
			((EigenvaluesChartEditor)this.parentMultiPagesEditor.getEditors().get(4)).refresh(update);
281
			//((EigenvaluesChartEditor)this.parentMultiPagesEditor.getEditors().get(4)).refresh(update);
282 282
		}
283 283
		catch (Exception e) {
284 284
			// TODO Auto-generated catch block
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1460)
162 162
	/**
163 163
	 * To keep track of the parameters used for the last computing and updates only the widgets if a parameter has changed. 
164 164
	 */
165
	protected HashMap<String, Object> lastComputingParameters = new HashMap<String, Object>();
165
	//protected HashMap<String, Object> lastComputingParameters = new HashMap<String, Object>();
166 166

  
167 167
	/**
168 168
	 * contains bottom toolbar subwidgets (installed grouped, etc.)
......
738 738
		return MessageDialog.openQuestion(this.getShell(), "Warning", "The result have been edited. Changes will be lost. Do you want to continue?");
739 739
	}
740 740
	
741
	/**
742
	 * Synchronizes the result data from the editor data.
743
	 */
744
	public void synchronizeResultFromEditor()	{
745 741

  
746
		// subclasses manual result updating from editor fields
747
		Log.finest("TXMEditor.syncrhonizeResultFromEditor(): " + this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$
748
		this.updateResultFromEditor();
749

  
750
		 // auto updating result from Parameter annotations in result <=> editor
751
		Log.finest("TXMEditor.syncrhonizeResultFromEditor(): " + this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$
752
		this.autoUpdateResultFromEditorParameters();
753

  
754
		// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
755
		this.setLastComputingParameters(this.getResult().getLastParametersFromHistory());
756

  
757
	}
758

  
759 742
	/**
760 743
	 * Computes the TXMResult if all necessary parameters are set then refreshes the editor UI.
761 744
	 * Also loads and savesd some parameters from result to Widgets fields and from Widgets fields to result.
......
796 779
									}
797 780
								}
798 781

  
799
								synchronizeResultFromEditor();
782
								// subclasses manual result updating from editor fields
783
								Log.finest("TXMEditor.syncrhonizeResultFromEditor(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$
784
								updateResultFromEditor();
785

  
786
								 // auto updating result from Parameter annotations in result <=> editor
787
								Log.finest("TXMEditor.syncrhonizeResultFromEditor(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$
788
								autoUpdateResultFromEditorParameters();
789

  
790
								// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
791
								//setLastComputingParameters(TXMEditor.this.getResult().getLastParametersFromHistory());
792

  
800 793
							}
801 794
						}
802 795
					});
......
975 968
				if(txmEditor != this
976 969
						//&& txmEditor.isDirty()
977 970
						)	{
978
					txmEditor.synchronizeResultFromEditor();
971
					//txmEditor.synchronizeResultFromEditor();
979 972
					txmEditor.refresh(true);
980 973
				}
981 974
			}
......
1489 1482
		return -1;
1490 1483
	}
1491 1484

  
1492
	/**
1493
	 * @return the lastComputingParameters
1494
	 */
1495
	public HashMap<String, Object> getLastComputingParameters() {
1496
		return lastComputingParameters;
1497
	}
1485
//	/**
1486
//	 * @return the lastComputingParameters
1487
//	 */
1488
//	public HashMap<String, Object> getLastComputingParameters() {
1489
//		return lastComputingParameters;
1490
//	}
1491
//
1492
//	/**
1493
//	 * @param lastComputingParameters the lastComputingParameters to set
1494
//	 */
1495
//	public void setLastComputingParameters(HashMap<String, Object> lastComputingParameters) {
1496
//		this.lastComputingParameters = lastComputingParameters;
1497
//	}
1498 1498

  
1499
	/**
1500
	 * @param lastComputingParameters the lastComputingParameters to set
1501
	 */
1502
	public void setLastComputingParameters(HashMap<String, Object> lastComputingParameters) {
1503
		this.lastComputingParameters = lastComputingParameters;
1504
	}
1505

  
1506 1499
	public Composite getContainer() {
1507 1500
		return parent;
1508 1501
	}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeListener.java (revision 1460)
11 11
 * @author sjacquot
12 12
 *
13 13
 */
14
// FIXME: became useless?
15
@Deprecated
14 16
public class ComputeListener extends BaseAbstractComputeListener implements Listener {
15 17

  
16 18
	
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeSelectionListener.java (revision 1460)
2 2

  
3 3
import org.eclipse.jface.viewers.ISelectionChangedListener;
4 4
import org.eclipse.jface.viewers.SelectionChangedEvent;
5
import org.eclipse.swt.SWT;
5 6
import org.eclipse.swt.events.SelectionEvent;
6 7
import org.eclipse.swt.events.SelectionListener;
7 8
import org.eclipse.swt.widgets.Spinner;
......
42 43
		// this method is called on a Spinner even when a key is pressed, that's not what we want, so this test breaks the behavior
43 44
		if((this.autoCompute
44 45
				|| RCPPreferences.getInstance().getBoolean(RCPPreferences.AUTO_UPDATE_EDITOR))
45
				&& (!(e.getSource() instanceof Spinner) || e.stateMask != 0))	{
46
				&& (!(e.getSource() instanceof Spinner) || (e.stateMask & SWT.BUTTON_MASK) != 0)
47
				)	{
46 48
			this.editor.compute(true);
47 49
		}
48 50
		else	{
......
53 55
	@Override
54 56
	public void widgetDefaultSelected(SelectionEvent e) {
55 57
		// TODO Auto-generated method stub
56
//		if((e.getSource() instanceof Spinner) || e.stateMask != 0)	{
57
//			this.editor.compute(true);	
58
//		}
58
		if((e.getSource() instanceof Spinner) || (e.stateMask & SWT.BUTTON_MASK) != 0)	{
59
			this.editor.compute(true);	
60
		}
59 61
	}
60 62

  
61 63
	@Override
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ThresholdsGroup.java (revision 1460)
101 101
		
102 102
		// Computing listeners
103 103
		ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(editor, autoCompute);
104
		ComputeKeyListener computeKeyListener = new ComputeKeyListener(editor);
104
		//ComputeKeyListener computeKeyListener = new ComputeKeyListener(editor);
105 105

  
106 106
		GridLayout gridLayout = new GridLayout();
107 107
		
......
156 156
		vMaxSpinner.setPageIncrement(100);
157 157
		vMaxSpinner.setLayoutData(fieldsGridData);
158 158
		
159
		fMinSpinner.addKeyListener(computeKeyListener);
159
		//fMinSpinner.addKeyListener(computeKeyListener);
160 160
		fMinSpinner.addSelectionListener(computeSelectionListener);
161 161
		
162 162
		if(displayFMax)	{
163
			fMaxSpinner.addKeyListener(computeKeyListener);
163
			//fMaxSpinner.addKeyListener(computeKeyListener);
164 164
			fMaxSpinner.addSelectionListener(computeSelectionListener);
165 165
		}
166 166
		
167
		vMaxSpinner.addKeyListener(computeKeyListener);
167
		//vMaxSpinner.addKeyListener(computeKeyListener);
168 168
		vMaxSpinner.addSelectionListener(computeSelectionListener);
169 169
	}
170 170

  

Also available in: Unified diff