diff --git a/plugins/HoloScan.java b/plugins/HoloScan.java index 417f29f9..e07c0a03 100644 --- a/plugins/HoloScan.java +++ b/plugins/HoloScan.java @@ -67,7 +67,8 @@ public class HoloScan extends Panel { (int)(Math.abs((Double)spinnerToPhi.getValue() - (Double)spinnerFromPhi.getValue()) / (Double)spinnerStepSizePhi.getValue() + 1) * (int)(Math.abs((Double)spinnerToTheta.getValue() - (Double)spinnerFromTheta.getValue()) / (Double)spinnerStepSizeTheta.getValue() +1)); int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps); - textTotalTime.setText(LocalTime.ofSecondOfDay(seconds).toString()); + int hours= seconds / (60 * 60); + textTotalTime.setText(hours >= 24 ? hours+"h": LocalTime.ofSecondOfDay(seconds).toString()); } catch (Exception ex){ textTotalTime.setText(""); } diff --git a/plugins/ManipulatorScan.form b/plugins/ManipulatorScan.form index cca66d2c..a253cf11 100644 --- a/plugins/ManipulatorScan.form +++ b/plugins/ManipulatorScan.form @@ -533,14 +533,13 @@ + + + + - - - - - diff --git a/plugins/ManipulatorScan.java b/plugins/ManipulatorScan.java index f180c78e..e39f3375 100644 --- a/plugins/ManipulatorScan.java +++ b/plugins/ManipulatorScan.java @@ -43,13 +43,15 @@ public class ManipulatorScan extends Panel { dvpAcqTime.setDevice(scienta.getAcquisitionTime()); } - protected void onTimer(){ + protected void onTimer(){ try{ int steps = radioSteps.isSelected() ? - (Integer)spinnerSteps.getValue(): - (int)(Math.abs((Double)spinnerTo.getValue() - (Double)spinnerFrom.getValue()) / (Double)spinnerStepSize.getValue() + 1); - int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps); - textTotalTime.setText(LocalTime.ofSecondOfDay(seconds).toString()); + (Integer)spinnerSteps.getValue(): + (int) ((radioRelative.isSelected()? ((Double)spinnerRange.getValue()).intValue(): + (Math.abs((Double)spinnerTo.getValue() - (Double)spinnerFrom.getValue()) )) / (Double)spinnerStepSize.getValue() + 1); + int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps); + int hours= seconds / (60 * 60); + textTotalTime.setText(hours >= 24 ? hours+"h": LocalTime.ofSecondOfDay(seconds).toString()); } catch (Exception ex){ textTotalTime.setText(""); } diff --git a/plugins/PhotonEnergy.java b/plugins/PhotonEnergy.java index 6313ca6d..60cbc594 100644 --- a/plugins/PhotonEnergy.java +++ b/plugins/PhotonEnergy.java @@ -59,7 +59,8 @@ public class PhotonEnergy extends Panel { protected void onTimer(){ try{ int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * table.getRowCount()); - textTotalTime.setText(LocalTime.ofSecondOfDay(seconds).toString()); + int hours= seconds / (60 * 60); + textTotalTime.setText(hours >= 24 ? hours+"h": LocalTime.ofSecondOfDay(seconds).toString()); } catch (Exception ex){ textTotalTime.setText(""); } diff --git a/plugins/XPSSpectrum.java b/plugins/XPSSpectrum.java index 2f3b68d2..1fe3ddbc 100644 --- a/plugins/XPSSpectrum.java +++ b/plugins/XPSSpectrum.java @@ -212,7 +212,8 @@ public class XPSSpectrum extends Panel { steps = Math.max(1, (int)valueIterations.getValue()); } int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps); - textTotalTime.setText(LocalTime.ofSecondOfDay(seconds).toString()); + int hours= seconds / (60 * 60); + textTotalTime.setText(hours >= 24 ? hours+"h": LocalTime.ofSecondOfDay(seconds).toString()); } } catch (Exception ex){ getLogger().log(Level.FINE, null, ex);