public void setXRangeToTime() { showTime(); // set the x axis from the time range of the data GeoDate minDate = mFileViewer.getMinDate(); GeoDate maxDate = mFileViewer.getMaxDate(); xTics.setValue(new Integer(xTicsVal)); }
public void setAdvancedValues() { // get pretty ranges for the current parameters // get the range for the station value double min = 10000; double max = 0; for (int fc = 0; fc < mFileViewer.mNumOpenFiles; fc++) { OpenDataFile of = (OpenDataFile) mFileViewer.mOpenFiles.elementAt(fc); for (int sec = 0; sec < of.mNumSections; sec++) { Section sech = (Section) of.mSections.elementAt(sec); if (sech.mNumCasts == 0) { continue; } for (int stc = 0; stc < sech.mStations.size(); stc++) { Station sh = (Station) sech.mStations.elementAt(stc); if (!sh.mUseStn) { continue; } // get the station value double y = sh.getStnValue(mSelYParam); if (y == JOAConstants.MISSINGVALUE || y >= JOAConstants.EPICMISSINGVALUE) { continue; } else { min = y < min ? y : min; max = y > max ? y : max; } } } } Triplet newRange = JOAFormulas.GetPrettyRange(min, max); double yMinv = newRange.getVal1(); double yMaxv = newRange.getVal2(); double yIncv = newRange.getVal3(); yMin.setText(JOAFormulas.formatDouble(String.valueOf(yMinv), 3, false)); yMax.setText(JOAFormulas.formatDouble(String.valueOf(yMaxv), 3, false)); yInc.setText(JOAFormulas.formatDouble(String.valueOf(yIncv), 3, false)); yTics.setValue(new Integer(yTicsVal)); if (b1.isSelected()) { mOffset = JOAConstants.PROFSEQUENCE; setXRangeToSequence(); } else if (b2.isSelected()) { mOffset = JOAConstants.PROFDISTANCE; setXRangeToDistance(); } else if (b3.isSelected()) { mOffset = JOAConstants.PROFTIME; setXRangeToTime(); } }
public void setXRangeToSequence() { hideTime(); // set the x axis from the total mercator distance double tempXMin = 0; double tempXMax = mFileViewer.mTotalStations; Triplet newRange = JOAFormulas.GetPrettyRange(tempXMin, tempXMax); double xMinv = newRange.getVal1(); double xMaxv = newRange.getVal2(); double xIncv = newRange.getVal3(); xMin.setText(String.valueOf((int) xMinv)); xMax.setText(String.valueOf((int) xMaxv)); xInc.setText(String.valueOf((int) xIncv)); xTics.setValue(new Integer(xTicsVal)); }
public void setXRangeToDistance() { hideTime(); // set the x axis from the total mercator distance double tempXMin = 0; double tempXMax = mFileViewer.mTotMercDist * 1.852; Triplet newRange = JOAFormulas.GetPrettyRange(tempXMin, tempXMax); double xMinv = newRange.getVal1(); double xMaxv = newRange.getVal2(); double xIncv = newRange.getVal3(); xMin.setText(JOAFormulas.formatDouble(String.valueOf(xMinv), 3, false)); xMax.setText(JOAFormulas.formatDouble(String.valueOf(xMaxv), 3, false)); xInc.setText(JOAFormulas.formatDouble(String.valueOf(xIncv), 3, false)); xTics.setValue(new Integer(xTicsVal)); }