diff --git a/src/main/java/org/earthtime/ETRedux.java b/src/main/java/org/earthtime/ETRedux.java
index f50feea5..3f34158e 100644
--- a/src/main/java/org/earthtime/ETRedux.java
+++ b/src/main/java/org/earthtime/ETRedux.java
@@ -49,7 +49,7 @@ public class ETRedux {
/**
*
*/
- public static String RELEASE_DATE = "2 March 2015";
+ public static String RELEASE_DATE = "22 March 2015";
/**
* Creates a new instance of UPbRedux
diff --git a/src/main/java/org/earthtime/UPb_Redux/dialogs/fractionManagers/UPbFractionEditorDialog.java b/src/main/java/org/earthtime/UPb_Redux/dialogs/fractionManagers/UPbFractionEditorDialog.java
index e21758cf..202a63b4 100644
--- a/src/main/java/org/earthtime/UPb_Redux/dialogs/fractionManagers/UPbFractionEditorDialog.java
+++ b/src/main/java/org/earthtime/UPb_Redux/dialogs/fractionManagers/UPbFractionEditorDialog.java
@@ -52,8 +52,8 @@
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.filechooser.FileFilter;
-import org.earthtime.UPb_Redux.ReduxConstants;
import org.earthtime.ETReduxFrame;
+import org.earthtime.UPb_Redux.ReduxConstants;
import org.earthtime.UPb_Redux.aliquots.Aliquot;
import org.earthtime.UPb_Redux.aliquots.UPbReduxAliquot;
import org.earthtime.UPb_Redux.beans.ValueModelClump;
@@ -185,8 +185,10 @@ public UPbFractionEditorDialog(
showDates = new boolean[]{true, true, true};
// inAutoUraniumMode = false;
- ((UPbFraction) myFraction).setInAutoUraniumMode(false);
-
+ try {
+ ((UPbFraction) myFraction).setInAutoUraniumMode(false);
+ } catch (Exception e) {
+ }
initComponents();
toggleStartStopLiveUpdate_button.setText(((ETReduxFrame) parent).getupdateSample_buttonText());
@@ -218,7 +220,7 @@ public UPbFractionEditorDialog(
}
// add the not-rejected fractions
for (Fraction f : ((UPbReduxAliquot) aliquot).getAliquotFractions()) {
- if (!((UPbFraction) f).isRejected()) {
+ if (!((UPbFractionI) f).isRejected()) {
fraction_Chooser.addItem(f);
}
}
@@ -250,9 +252,11 @@ public void actionPerformed(ActionEvent e) {
}
// reset input estimated age for auto uranium mode to date 207/206
- ((UPbFraction) myFraction).//
- setInputDate206_238r(myFraction.getRadiogenicIsotopeDateByName(RadDates.age207_206r).getValue());
-
+ try {
+ ((UPbFraction) myFraction).//
+ setInputDate206_238r(myFraction.getRadiogenicIsotopeDateByName(RadDates.age207_206r).getValue());
+ } catch (Exception e) {
+ }
InitializeFractionData(myFraction);
// fraction_Chooser.setSelectedItem( myFraction );
@@ -278,7 +282,7 @@ public void InitializeFractionData(final Fraction myFraction) {
// if this is an added default fraction, the isdeleted field is true and
// hence we do not need the button active
- delete_button.setEnabled(!((UPbFraction) myFraction).isDeleted() && !isCompiled());
+ delete_button.setEnabled(!((UPbFractionI) myFraction).isDeleted() && !isCompiled());
InitializeTextBoxes(myFraction);
showSavedData(myFraction);
@@ -1006,15 +1010,13 @@ private void InitializeTextBoxes(final Fraction myFraction) {
// Determine whether the Pb and U data are editable based on presence of source files
// April 2009 decided to make this more restrictive
boolean editablePb
- = !((UPbFraction) myFraction).hasXMLPbSourceFile()
- && //(((UPbFraction) myFraction).getMeanAlphaPb().compareTo(BigDecimal.ZERO) == 0) &&
- !isCompiled();
+ = !((UPbFractionI) myFraction).hasXMLPbSourceFile()
+ && !isCompiled();
boolean editableU
- = !((UPbFraction) myFraction).hasXMLUSourceFile()
- && //(((UPbFraction) myFraction).getMeanAlphaU().compareTo(BigDecimal.ZERO) == 0) &&
- !isCompiled();
+ = !((UPbFractionI) myFraction).hasXMLUSourceFile()
+ && !isCompiled();
// Determine whether fraction is a metal or oxide for editing
- boolean fractionIsOxide = ((UPbFraction) myFraction).isAnOxide();
+ boolean fractionIsOxide = ((UPbFractionI) myFraction).isAnOxide();
// set properties of text boxes
// top panel
@@ -1132,7 +1134,7 @@ private void InitializeTextBoxes(final Fraction myFraction) {
// aug 2010 oxide correction refinements
r18O_16OUsed_textOnUTab.setDocument(new BigDecimalDocument(r18O_16OUsed_textOnUTab, true));
- fractionIsMetal_rb.setEnabled(!((UPbFraction) myFraction).hasXMLUSourceFile());
+ fractionIsMetal_rb.setEnabled(!((UPbFractionI) myFraction).hasXMLUSourceFile());
fractionIsMetal_rb.addActionListener(new ActionListener() {
@Override
@@ -1165,7 +1167,7 @@ public void actionPerformed(ActionEvent e) {
}
});
- if (((UPbFraction) myFraction).isAnOxide()) {
+ if (((UPbFractionI) myFraction).isAnOxide()) {
fractionIsOxide_rb.setSelected(true);
} else {
fractionIsMetal_rb.setSelected(true);
diff --git a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbFractionI.java b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbFractionI.java
index 22451109..36df0ac2 100644
--- a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbFractionI.java
+++ b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbFractionI.java
@@ -325,4 +325,10 @@ public interface UPbFractionI {
public void calculateTeraWasserburgRho();
public boolean isCommonLeadLossCorrected();
+
+ public boolean hasXMLUSourceFile ();
+
+ public boolean hasXMLPbSourceFile ();
+
+ public boolean isAnOxide();
}
diff --git a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLAICPMSFraction.java b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLAICPMSFraction.java
index 5a83293b..c8da5907 100644
--- a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLAICPMSFraction.java
+++ b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLAICPMSFraction.java
@@ -1457,4 +1457,19 @@ public boolean isCorrectedForPbc() {
public void setCorrectedForPbc(boolean correctedForPbc) {
this.correctedForPbc = correctedForPbc;
}
+
+ @Override
+ public boolean hasXMLUSourceFile() {
+ return false;
+ }
+
+ @Override
+ public boolean hasXMLPbSourceFile() {
+ return false;
+ }
+
+ @Override
+ public boolean isAnOxide(){
+ return false;
+ }
}
diff --git a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLegacyFraction.java b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLegacyFraction.java
index 70b72386..8648eb65 100644
--- a/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLegacyFraction.java
+++ b/src/main/java/org/earthtime/UPb_Redux/fractions/UPbReduxFractions/UPbLegacyFraction.java
@@ -709,4 +709,19 @@ public void setStandard(boolean standard) {
public boolean isCommonLeadLossCorrected() {
return false; // dec 2014 until we learn that this is the case
}
+
+ @Override
+ public boolean hasXMLUSourceFile() {
+ return false;
+ }
+
+ @Override
+ public boolean hasXMLPbSourceFile() {
+ return false;
+ }
+
+ @Override
+ public boolean isAnOxide() {
+ return false;
+ }
}
diff --git a/src/main/java/org/earthtime/UPb_Redux/samples/Sample.java b/src/main/java/org/earthtime/UPb_Redux/samples/Sample.java
index c4a63e83..a4d9fe8f 100644
--- a/src/main/java/org/earthtime/UPb_Redux/samples/Sample.java
+++ b/src/main/java/org/earthtime/UPb_Redux/samples/Sample.java
@@ -862,6 +862,7 @@ private void initializeDefaultUPbFraction(Fraction defFraction)
addUPbFraction(defFraction);
}
+ //TODO: refactor these edit methods out of sample - MVC !!
/**
* opens aliquot modal editor for the Fraction
indicated by
* argument fraction
and opened to the editing tab indicated by
@@ -901,7 +902,8 @@ public void editUPbFraction(Fraction fraction, int selectedTab) {
selectedTab,
false);
} else if (sampleAnalysisType.equalsIgnoreCase(SampleAnalysisTypesEnum.IDTIMS.getName())
- || (sampleType.equalsIgnoreCase(SampleTypesEnum.COMPILATION.getName()))) {
+ || (sampleType.equalsIgnoreCase(SampleTypesEnum.COMPILATION.getName()))){
+// TODO: Need kwiki page for LAICPMS || (sampleType.equalsIgnoreCase(SampleTypesEnum.PROJECT.getName()))) {
myFractionEditor
= new UPbFractionEditorDialog(