public ModeConfigurationPanel(String mode) { this.mode = mode; notes = new NotePlayerConfigurationPanel(); parameters = new CombinedParameterConfigurationPanel(); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(notes); add(Box.createRigidArea(new Dimension(10, 0))); add(parameters); }
public CombinedParameterConfigurationPanel() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); ParameterConfigurationPanel panel = new ParameterConfigurationPanel("X parameter", SensorType.X_SENSOR); panels.put(SensorType.X_SENSOR, panel); add(panel); add(Box.createRigidArea(new Dimension(10, 0))); panel = new ParameterConfigurationPanel("Y parameter", SensorType.Y_SENSOR); panels.put(SensorType.Y_SENSOR, panel); add(panel); add(Box.createRigidArea(new Dimension(10, 0))); panel = new ParameterConfigurationPanel("Knob", SensorType.POT_SENSOR); panels.put(SensorType.POT_SENSOR, panel); add(panel); add(Box.createRigidArea(new Dimension(10, 0))); panel = new ParameterConfigurationPanel("Button", SensorType.BUTTON1_SENSOR); panels.put(SensorType.BUTTON1_SENSOR, panel); add(panel); add(Box.createRigidArea(new Dimension(10, 0))); }