Révision 3988

TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/txt/txtLoader.groovy (revision 3988)
206 206
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
207 207
if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
208 208

  
209

  
210
	
209 211
readyToLoad = project.save()
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 3988)
436 436
		return title;
437 437
	}
438 438
	
439
	public static String referenceToString(List<String> names, String patternString) {
439
	public static String referenceToString(List<String> properties, String patternString) {
440 440
		Gson gson = new Gson();
441 441
		HashMap<String, Object> values = new HashMap<>();
442
		values.put("properties", names);
442
		values.put("properties", properties);
443 443
		values.put("format", patternString);
444 444
		return gson.toJson(values);
445 445
	}
446 446

  
TXM/trunk/bundles/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 3988)
42 42
import org.txm.rcp.editors.listeners.ComputeSelectionListener;
43 43
import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget;
44 44
import org.txm.rcp.swt.widget.AssistedQueryWidget;
45
import org.txm.rcp.swt.widget.FloatSpinner;
46
import org.txm.rcp.swt.widget.parameters.FloatField;
45 47
import org.txm.rcp.swt.widget.structures.StructuralUnitPropertiesComboViewer;
46 48
import org.txm.rcp.swt.widget.structures.StructuralUnitsComboViewer;
47 49
import org.txm.rcp.swt.widget.structures.StructuralUnitsCombosGroup;
......
62 64
	/** The query widgets. */
63 65
	protected List<QueryField> queryWidgets = new ArrayList<>();
64 66
	
65
	/** The chart type. */
66
	private boolean cumulative = true;
67
//	/** The chart type. */
68
//	private boolean cumulative = true;
67 69
	
68 70
	/** The linewidth. */
69 71
	private int lineWidth = 2;
......
75 77
	Composite mainPanel;
76 78
	
77 79
	/** The bande field. */
78
	Text bandeField;
80
	@Parameter(key = ProgressionPreferences.BANDE_MULTIPLIER)
81
	FloatSpinner bandeField;
79 82
	
80 83
	/** The cumu button. */
81 84
	Button cumulativeButton;
......
296 299
			typeLabel.setText(ProgressionUIMessages.bandewidthMultiplierColon);
297 300
			typeLabel.setAlignment(SWT.CENTER);
298 301
			
299
			bandeField = new Text(paramPanel, SWT.BORDER);
302
			bandeField = new FloatSpinner(paramPanel, SWT.BORDER);
300 303
			bandeField.setEnabled(densityButton.getSelection());
301
			bandeField.setText("" + this.getResult().getBandeMultiplier()); //$NON-NLS-1$
304
			bandeField.setSelection(this.getResult().getBandeMultiplier()); //$NON-NLS-1$
302 305
			bandeField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true, 2, 1));
303 306
			bandeField.addKeyListener(computeKeyListener);
304 307
			bandeField.addModifyListener(computeKeyListener);
305 308
			
306 309
			
307
			
308 310
			// Structural units and properties combo viewers
309 311
			StructuralUnitsCombosGroup structuration = new StructuralUnitsCombosGroup(paramPanel, this, this.getResult().getStructuralUnit(), this.getResult().getStructuralUnitProperty());
310 312
			structuration.setLayout(new GridLayout(4, false));
......
646 648
			}
647 649
		}
648 650
		
649
		cumulative = this.getResult().isDefaultChartType();
650
		cumulativeButton.setSelection(cumulative);
651
		densityButton.setSelection(!cumulative);
651
		cumulativeButton.setSelection(this.getResult().isDefaultChartType());
652
		densityButton.setSelection(!this.getResult().isDefaultChartType());
652 653
		bandeField.setEnabled(densityButton.getSelection());
653 654
	}
654 655
	
......
665 666
			}
666 667
		}
667 668
		
668
		cumulative = cumulativeButton.getSelection();
669
		
670
		String smultibande = bandeField.getText();
671
		float bandeMultiplier = 1.0f;
672
		if (smultibande != null && smultibande.length() > 0) {
673
			try {
674
				bandeMultiplier = Float.parseFloat(smultibande);
675
			}
676
			catch (Exception e) {
677
				bandeMultiplier = 1.0f;
678
				Log.severe(NLS.bind(ProgressionUIMessages.stripMultiplierErrorColonP0, e));
679
				StatusLine.error(NLS.bind(ProgressionUIMessages.stripMultiplierErrorColonP0, e));
680
			}
681
		}
682
		else {
683
			bandeMultiplier = 1.0f;
684
		}
669
//		String smultibande = bandeField.getText();
670
//		float bandeMultiplier = bandeField.getSelectionAsFloat();
671
//		if (smultibande != null && smultibande.length() > 0) {
672
//			try {
673
//				bandeMultiplier = Float.parseFloat(smultibande);
674
//			}
675
//			catch (Exception e) {
676
//				bandeMultiplier = 1.0f;
677
//				Log.severe(NLS.bind(ProgressionUIMessages.stripMultiplierErrorColonP0, e));
678
//				StatusLine.error(NLS.bind(ProgressionUIMessages.stripMultiplierErrorColonP0, e));
679
//			}
680
//		}
681
//		else {
682
//			bandeMultiplier = 1.0f;
683
//		}
685 684
	}
686 685
	
687 686
}
TXM/trunk/bundles/org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java (revision 3988)
117 117
	 * @param preferences
118 118
	 */
119 119
	public static void initializeChartsEngineSharedPreferences(Preferences preferences) {
120
		
120 121
		preferences.put(CHART_TYPE, DEFAULT_CHART_TYPE);
121 122
		preferences.putBoolean(SHOW_TITLE, true);
122 123
		preferences.putBoolean(SHOW_LEGEND, true);
......
139 140
		// May need to use e.g. 3 variables font_size, font_type, font_name. Then if we need to use a SWT/JFace Font object, make a function to convert it, 2 ways. 
140 141
		String defaultFont = "1|SansSerif|14|0";  //$NON-NLS-1$
141 142
		
142
		
143 143
		preferences.put(FONT, defaultFont);
144 144
	}
145 145
	

Formats disponibles : Unified diff