| 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 |
}
|