diff --git a/plugins/HoloScan.form b/plugins/HoloScan.form index 88f449c2..a7c3988b 100644 --- a/plugins/HoloScan.form +++ b/plugins/HoloScan.form @@ -614,9 +614,10 @@ + - - + + diff --git a/plugins/HoloScan.java b/plugins/HoloScan.java index 73bf0063..cd82e1ed 100644 --- a/plugins/HoloScan.java +++ b/plugins/HoloScan.java @@ -47,10 +47,10 @@ public class HoloScan extends Panel { @Override public void onValueChanged(Device device, Object value, Object former) { try{ - int steps = (int) (radioSteps.isSelected() ? + int steps = (radioSteps.isSelected() ? (Integer)spinnerStepsPhi.getValue() * (Integer)spinnerStepsTheta.getValue() : - (Math.abs((Double)spinnerToPhi.getValue() - (Double)spinnerFromPhi.getValue()) / (Integer)spinnerStepSizePhi.getValue() + 1) * - (Math.abs((Double)spinnerToTheta.getValue() - (Double)spinnerFromTheta.getValue()) / (Integer)spinnerStepSizeTheta.getValue() +1)); + (int)(Math.abs((Double)spinnerToPhi.getValue() - (Double)spinnerFromPhi.getValue()) / (Integer)spinnerStepSizePhi.getValue() + 1) * + (int)(Math.abs((Double)spinnerToTheta.getValue() - (Double)spinnerFromTheta.getValue()) / (Integer)spinnerStepSizeTheta.getValue() +1)); int seconds = (int) ((Double)value * steps); LocalTime time = LocalTime.ofSecondOfDay(seconds); textTotalTime.setText(time.toString()); @@ -512,7 +512,8 @@ public class HoloScan extends Panel { jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel2.setText("Total time(min):"); - textTotalTime.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + textTotalTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + textTotalTime.setBorder(javax.swing.BorderFactory.createTitledBorder("")); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout);