* @file SensorParamPanel.java
* Sensor Control Parameter Panel
- *
+ *
* This panel is used for the sensor test and analysis
- *
- * @author SungTae Moon
*/
-public class SensorParamPanel extends JPanel {
+public class SensorParamPanel extends JPanel {
private JSpinner accelSpinner;
private JSpinner gyroSpinner;
private JPanel mainPanel;
@@ -38,7 +41,7 @@ public SensorParamPanel() {
accelSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)accelSpinner.getValue();
+ Double value = (Double) accelSpinner.getValue();
sensors.setParameter("noise_Acc", value.floatValue());
}
});
@@ -46,7 +49,7 @@ public void stateChanged(ChangeEvent e) {
gyroSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)gyroSpinner.getValue();
+ Double value = (Double) gyroSpinner.getValue();
sensors.setParameter("noise_Gyo", value.floatValue());
}
});
@@ -54,7 +57,7 @@ public void stateChanged(ChangeEvent e) {
magSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)magSpinner.getValue();
+ Double value = (Double) magSpinner.getValue();
sensors.setParameter("noise_Mag", value.floatValue());
}
});
@@ -62,7 +65,7 @@ public void stateChanged(ChangeEvent e) {
presSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)presSpinner.getValue();
+ Double value = (Double) presSpinner.getValue();
sensors.setParameter("noise_Prs", value.floatValue());
}
});
@@ -70,7 +73,7 @@ public void stateChanged(ChangeEvent e) {
gpsSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)gpsSpinner.getValue();
+ Double value = (Double) gpsSpinner.getValue();
sensors.setParameter("gpsNoiseStdDev", value.floatValue());
}
});
@@ -78,7 +81,7 @@ public void stateChanged(ChangeEvent e) {
massSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- Double value = (Double)massSpinner.getValue();
+ Double value = (Double) massSpinner.getValue();
sensors.setParameter("mass", value.floatValue());
}
});
@@ -102,4 +105,65 @@ public void setSensor(Sensors sensors) {
}
+ {
+// GUI initializer generated by IntelliJ IDEA GUI Designer
+// >>> IMPORTANT!! <<<
+// DO NOT EDIT OR ADD ANY CODE HERE!
+ $$$setupUI$$$();
+ }
+
+ /**
+ * Method generated by IntelliJ IDEA GUI Designer
+ * >>> IMPORTANT!! <<<
+ * DO NOT edit this method OR call it in your code!
+ *
+ * @noinspection ALL
+ */
+ private void $$$setupUI$$$() {
+ mainPanel = new JPanel();
+ mainPanel.setLayout(new GridLayoutManager(8, 2, new Insets(0, 0, 0, 0), -1, -1));
+ final JLabel label1 = new JLabel();
+ label1.setText("Accel Noise StdDev");
+ mainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ accelSpinner = new JSpinner();
+ mainPanel.add(accelSpinner, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label2 = new JLabel();
+ label2.setText("Gyro Noise StdDev");
+ mainPanel.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ gyroSpinner = new JSpinner();
+ mainPanel.add(gyroSpinner, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label3 = new JLabel();
+ label3.setText("Mag Noise StdDev");
+ mainPanel.add(label3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label4 = new JLabel();
+ label4.setText("Pressure Noise StdDev");
+ mainPanel.add(label4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label5 = new JLabel();
+ label5.setText("GPS Noise StdDev");
+ mainPanel.add(label5, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ magSpinner = new JSpinner();
+ mainPanel.add(magSpinner, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ presSpinner = new JSpinner();
+ mainPanel.add(presSpinner, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ gpsSpinner = new JSpinner();
+ mainPanel.add(gpsSpinner, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label6 = new JLabel();
+ label6.setText("--- VEHICLE ---");
+ mainPanel.add(label6, new GridConstraints(6, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label7 = new JLabel();
+ label7.setText("mass");
+ mainPanel.add(label7, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ massSpinner = new JSpinner();
+ mainPanel.add(massSpinner, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ final JLabel label8 = new JLabel();
+ label8.setText("--- SENSORS ---");
+ mainPanel.add(label8, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ }
+
+ /**
+ * @noinspection ALL
+ */
+ public JComponent $$$getRootComponent$$$() {
+ return mainPanel;
+ }
}