@@ -109,6 +109,9 @@ public class CommonLeadAssignmentController implements Initializable {
109
109
@ FXML
110
110
private Button viewDetailsButton ;
111
111
112
+ private int widthOfSelectedAgeColumn = 105 ;
113
+ private int ageTypeDisplayTranslationX = 70 ;
114
+
112
115
/**
113
116
* Initializes the controller class.
114
117
*/
@@ -312,18 +315,20 @@ private void showUnknownsWithOvercountCorrections() throws SquidException {
312
315
}
313
316
314
317
private void setUpFooter () {
318
+ int ageLabelWidth = 88 ;
315
319
footerHBox .getChildren ().addAll (
316
- makeLabel ("" , 135 , true , 10 ),
320
+ makeLabel ("" , 125 , true , 10 ),
317
321
makeLabel ("206Pb/204Pb" , 90 , true , 10 ),
318
322
makeLabel ("207Pb/204Pb" , 90 , true , 10 ),
319
323
makeLabel ("208Pb/204Pb" , 90 , true , 10 ),
320
- makeLabel (PB4CORR + "\n " + PB4COR206_238AGE .replace (PB4CORR , "" ), 90 , true , 10 ),
321
- makeLabel (PB4CORR + "\n " + PB4COR208_232AGE .replace (PB4CORR , "" ), 90 , true , 10 ),
322
- makeLabel (PB4CORR + "\n " + PB4COR207_206AGE .replace (PB4CORR , "" ), 90 , true , 10 ),
323
- makeLabel (PB7CORR + "\n " + PB7COR206_238AGE .replace (PB7CORR , "" ), 90 , true , 10 ),
324
- makeLabel (PB7CORR + "\n " + PB7COR208_232AGE .replace (PB7CORR , "" ), 90 , true , 10 ),
325
- makeLabel (PB8CORR + "\n " + PB8COR206_238AGE .replace (PB8CORR , "" ), 90 , true , 10 ),
326
- makeLabel (PB8CORR + "\n " + PB8COR207_206AGE .replace (PB8CORR , "" ), 90 , true , 10 ));
324
+ makeLabel ("" , 35 , true , 10 ),
325
+ makeLabel (PB4CORR + "\n " + PB4COR206_238AGE .replace (PB4CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
326
+ makeLabel (PB4CORR + "\n " + PB4COR208_232AGE .replace (PB4CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
327
+ makeLabel (PB4CORR + "\n " + PB4COR207_206AGE .replace (PB4CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
328
+ makeLabel (PB7CORR + "\n " + PB7COR206_238AGE .replace (PB7CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
329
+ makeLabel (PB7CORR + "\n " + PB7COR208_232AGE .replace (PB7CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
330
+ makeLabel (PB8CORR + "\n " + PB8COR206_238AGE .replace (PB8CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ),
331
+ makeLabel (PB8CORR + "\n " + PB8COR207_206AGE .replace (PB8CORR , "" ).replace ("_Age" , "" ), ageLabelWidth , true , 10 ));
327
332
}
328
333
329
334
private Label makeLabel (String label , int width , boolean fontIsBold , int fontSize ) {
@@ -433,6 +438,10 @@ public void displayData() {
433
438
addVboxFactory ("207Pb/204Pb" , spot .getCom_207Pb204Pb (), 0.0 );
434
439
addVboxFactory ("208Pb/204Pb" , spot .getCom_208Pb204Pb (), 0.0 );
435
440
441
+ Label aValue = new Label ("" );
442
+ aValue .setPrefWidth (35 );
443
+ getChildren ().add (aValue );
444
+
436
445
addVboxFactory (expPB4COR206_238AGE .getName (),
437
446
spot .getTaskExpressionsEvaluationsPerSpot ().get (expPB4COR206_238AGE )[0 ][0 ],
438
447
spot .getTaskExpressionsEvaluationsPerSpot ().get (expPB4COR206_238AGE )[0 ][1 ]);
@@ -488,7 +497,7 @@ private void addVboxFactory(String label, double value, double unct) throws Squi
488
497
aValue .setTextFill (Paint .valueOf ("red" ));
489
498
aValue .setFont (Font .font ("Monospaced" , FontWeight .BOLD , 12 ));
490
499
}
491
- aValue .setPrefWidth (102 );
500
+ aValue .setPrefWidth (widthOfSelectedAgeColumn - 5 );
492
501
aValue .setMinWidth (USE_PREF_SIZE );
493
502
aValue .setPrefHeight (20 );
494
503
aValue .setMinHeight (USE_PREF_SIZE );
@@ -827,7 +836,7 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
827
836
828
837
VBox groupDetailsVBox = new VBox (-10 );
829
838
HBox ageChoosersHBox = new HBox ();
830
- ageChoosersHBox .setTranslateX (15 );
839
+ ageChoosersHBox .setTranslateX (ageTypeDisplayTranslationX );
831
840
832
841
ageChoosersHBox .getChildren ().add (ageRadioButtonFactory (sampleGroupName , SampleAgeTypesEnum .PB4COR206_238AGE , PB4CORR ));
833
842
ageChoosersHBox .getChildren ().add (ageRadioButtonFactory (sampleGroupName , SampleAgeTypesEnum .PB4COR208_232AGE , PB4CORR ));
@@ -844,9 +853,9 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
844
853
// be sure we are on sample group toolbar
845
854
if (sampleGroup != null ) {
846
855
weightedMeansHBox = new HBox ();
847
- weightedMeansHBox .setTranslateX (15 );
856
+ weightedMeansHBox .setTranslateX (ageTypeDisplayTranslationX );
848
857
849
- int wmWidth = 107 ;
858
+ int wmWidth = widthOfSelectedAgeColumn ;
850
859
Label weightedMeanLabel = makeRedLabel ("" , wmWidth , true , 11 , 4.0 );
851
860
weightedMeanLabel .setId (SampleAgeTypesEnum .PB4COR206_238AGE .getExpressionName ());
852
861
weightedMeansHBox .getChildren ().add (weightedMeanLabel );
@@ -892,7 +901,7 @@ private void updateWeightedMeanLabel(Label wmLabel, String sampleGroupName) {
892
901
Formatter formatter = new Formatter ();
893
902
formatter .format ("%5.1f" , spotSummaryDetails .getValues ()[0 ][0 ] / 1e6 );
894
903
formatter .format (" " + ABS_UNCERTAINTY_DIRECTIVE + "%2.1f" , spotSummaryDetails .getValues ()[0 ][1 ] / 1e6 ).toString ();
895
- wmLabel .setText ("WM: " + formatter );
904
+ wmLabel .setText ("WM:" + formatter );
896
905
897
906
// tool tip
898
907
OperationOrFunctionInterface op = ((ExpressionTree ) spotSummaryDetails .getExpressionTree ()).getOperation ();
@@ -943,11 +952,11 @@ public void handle(MouseEvent event) {
943
952
* @param corrString the value of corrString
944
953
*/
945
954
private RadioButton ageRadioButtonFactory (String sampleGroupName , SampleAgeTypesEnum sampleAgeType , String corrString ) {
946
- RadioButton ageRB = new RadioButton (corrString + "\n " + sampleAgeType .getExpressionName ().replace (corrString , "" ));
955
+ RadioButton ageRB = new RadioButton (corrString + "\n " + sampleAgeType .getExpressionName ().replace (corrString , "" ). replace ( "_Age" , "" ) );
947
956
ageRB .setId (sampleAgeType .getExpressionName ());
948
957
ageRB .setToggleGroup (ageRB_ToggleGroup );
949
958
ageRB .setFont (Font .font ("Monospaced" , FontWeight .BOLD , 10 ));
950
- ageRB .setPrefWidth (107 );
959
+ ageRB .setPrefWidth (widthOfSelectedAgeColumn );
951
960
ageRB .setMinWidth (USE_PREF_SIZE );
952
961
ageRB .setPrefHeight (25 );
953
962
ageRB .setMinHeight (USE_PREF_SIZE );
0 commit comments