Skip to content

Commit a21c411

Browse files
authored
Fixes #632 and 633. (#634)
* Fixed #633 * Fixed #632
1 parent 4494d2b commit a21c411

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

common.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply plugin: 'java'
66
apply plugin: 'maven'
77

88
String mavenGroupId = 'org.cirdles'
9-
String mavenVersion = '1.8.1'
9+
String mavenVersion = '1.8.2'
1010

1111
sourceCompatibility = '1.8'
1212
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

squidApp/src/main/java/org/cirdles/squid/gui/MassesAuditController.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
*/
6363
public class MassesAuditController implements Initializable, MassAuditRefreshInterface {
6464

65+
public static final int LEGEND_WIDTH = 259;
6566
private static final String STYLE_BUTTON_LABEL
6667
= "-fx-font-family: 'Monospaced', 'SansSerif';\n"
6768
+ " -fx-font-weight: bold;\n"
@@ -411,7 +412,7 @@ private void displayBothCountsAction(ActionEvent actionEvent) {
411412
private void produceMassModeGraphOnScrolledPane(int massCounter, String title, List<Double> data, MassStationDetail entry) {
412413
// plot legend
413414
AbstractDataView legendCanvas
414-
= new SpeciesAMUAuditViewForShrimp(new Rectangle(0, (massCounter * heightOfMassPlot) + 25, 260, heightOfMassPlot),
415+
= new SpeciesAMUAuditViewForShrimp(new Rectangle(0, (massCounter * heightOfMassPlot) + 25, LEGEND_WIDTH, heightOfMassPlot),
415416
title,
416417
data,
417418
entry.getTimesOfMeasuredTrimMasses(),
@@ -646,7 +647,7 @@ private void updateAllMassesCanvases(int savedZoomedStart) {
646647
private void produceCountsModeGraphOnScrolledPane(int massCounter, String title, List<Double> countsData, List<Double> countsSBMData, MassStationDetail entry) {
647648
// plot legend
648649
AbstractDataView legendCanvas
649-
= new SpeciesCountsAuditViewForShrimp(new Rectangle(0, (massCounter * heightOfMassPlot) + 25, 260, heightOfMassPlot),
650+
= new SpeciesCountsAuditViewForShrimp(new Rectangle(0, (massCounter * heightOfMassPlot) + 25, LEGEND_WIDTH, heightOfMassPlot),
650651
title,
651652
countsData,
652653
countsSBMData,

squidApp/src/main/java/org/cirdles/squid/gui/dataViews/SpeciesGraphs/SpeciesAMUAuditViewForShrimp.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import java.util.ArrayList;
4747
import java.util.List;
4848

49+
import static org.cirdles.squid.gui.MassesAuditController.LEGEND_WIDTH;
4950
import static org.cirdles.squid.gui.SquidUI.primaryStageWindow;
5051
import static org.cirdles.squid.gui.SquidUIController.squidProject;
5152

@@ -254,7 +255,7 @@ private int indexOfSpotFromMouseX(double x) {
254255
public void paint(GraphicsContext g2d) {
255256
super.paint(g2d);
256257

257-
boolean legendOnly = (width - 260 == 0);
258+
boolean legendOnly = (width - LEGEND_WIDTH == 0);
258259
float verticalTextShift = 3.1f;
259260

260261
g2d.setFont(Font.font("SansSerif", 12));
@@ -263,7 +264,7 @@ public void paint(GraphicsContext g2d) {
263264
g2d.setLineWidth(0.5);
264265

265266
if (legendOnly) {
266-
leftMargin = 260;
267+
leftMargin = LEGEND_WIDTH;
267268
g2d.setFill(Paint.valueOf("Red"));
268269
if (plotTitle.contains("-")) {
269270
String[] titleArray = plotTitle.split("-");

squidApp/src/main/java/org/cirdles/squid/gui/dataViews/SpeciesGraphs/SpeciesCountsAuditViewForShrimp.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import java.util.ArrayList;
4444
import java.util.List;
4545

46+
import static org.cirdles.squid.gui.MassesAuditController.LEGEND_WIDTH;
4647
import static org.cirdles.squid.gui.SquidUI.primaryStageWindow;
4748
import static org.cirdles.squid.gui.SquidUIController.squidProject;
4849

@@ -69,7 +70,7 @@ public class SpeciesCountsAuditViewForShrimp extends AbstractDataView implements
6970
private String plotTitle = "NONE";
7071
private int[] scanIndices;
7172
private int[] runIndices;
72-
// private List<Run> selectedRuns = new ArrayList<>();
73+
// private List<Run> selectedRuns = new ArrayList<>();
7374
private MenuItem spotContextMenuItem1;
7475
private Menu spotRestoreMenu;
7576
private Menu prawnFileSplitMenu;
@@ -260,7 +261,7 @@ private int indexOfSpotFromMouseX(double x) {
260261
public void paint(GraphicsContext g2d) {
261262
super.paint(g2d);
262263

263-
boolean legendOnly = (width - 260 == 0);
264+
boolean legendOnly = (width - LEGEND_WIDTH == 0);
264265
float verticalTextShift = 3.1f;
265266

266267
g2d.setFont(Font.font("SansSerif", 12));
@@ -269,7 +270,7 @@ public void paint(GraphicsContext g2d) {
269270
g2d.setLineWidth(0.5);
270271

271272
if (legendOnly) {
272-
leftMargin = 260;
273+
leftMargin = LEGEND_WIDTH;
273274
g2d.setFill(Paint.valueOf("Red"));
274275
if (plotTitle.contains("-")) {
275276
String[] titleArray = plotTitle.split("-");

squidCore/src/main/java/org/cirdles/squid/squidReports/squidWeightedMeanReports/SquidWeightedMeanReportEngine.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
import org.cirdles.squid.tasks.expressions.spots.SpotSummaryDetails;
1919

20+
import java.util.Locale;
21+
2022
/**
2123
* per @NicoleRayner Items I would like to see incorporated as headers into the
2224
* WM stats file: Sample Name * Value Name WM Value * 2s Err * 95% conf Err * n
@@ -49,7 +51,7 @@ public static String makeWeightedMeanReportAsCSV(SpotSummaryDetails spotSummaryD
4951
}
5052
}
5153

52-
boolean isAnAge = spotSummaryDetails.getSelectedExpressionName().contains("Age");
54+
boolean isAnAge = spotSummaryDetails.getExpressionTree().getName().toUpperCase(Locale.ROOT).contains("AGE");
5355
report.append(spotSummaryDetails.getExpressionTree().getUnknownsGroupSampleName()).append(", ");
5456
report.append(spotSummaryDetails.getExpressionTree().getName().split("_WM_")[0]).append(", ");
5557
report.append(spotSummaryDetails.getValues()[0][0] / (isAnAge ? 1e6 : 1.0)).append(", ");
@@ -72,4 +74,4 @@ public static String makeWeightedMeanReportHeaderAsCSV() {
7274
return header.toString();
7375
}
7476

75-
}
77+
}
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)