setTitle( app.getResourceString( "paletteCtrlRoom" ));
setResizable( false );
final Container cp = getContentPane();
final JPanel b2 = new JPanel( new BorderLayout() ); // Box.createHorizontalBox();
final MultiStateButton ggLimiter;
audioPrefs = app.getUserPrefs().node( PrefsUtil.NODE_AUDIO );
final Object comboProto = "XXXXXXXX";
b1 = new SpringPanel( 2, 4, 2, 4 );
lmm.setDynamicComponent( b1 );
ggVolume = new VolumeFader();
ggOutputConfig = new PrefComboBox();
ggOutputConfig.putClientProperty( "JComboBox.isSquare", Boolean.TRUE );
ggAudioBox = new PrefComboBox();
ggAudioBox.putClientProperty( "JComboBox.isSquare", Boolean.TRUE );
ggOutputConfig.setPrototypeDisplayValue( comboProto );
ggAudioBox.setPrototypeDisplayValue( comboProto );
refillConfigs();
ggOutputConfig.setPreferences( audioPrefs, PrefsUtil.KEY_OUTPUTCONFIG );
ggAudioBox.setPreferences( audioPrefs, PrefsUtil.KEY_AUDIOBOX );
audioBoxListener = new ActionListener() {
public void actionPerformed( ActionEvent e )
{
final Server server = superCollider.getServer();
if( (server != null) && server.isRunning() ) {
final JOptionPane op = new JOptionPane( getResourceString( "optionDlgAudioBoxReboot" ), JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION );
if( BasicWindowHandler.showDialog( op, getWindow(), null ) == 0 ) {
superCollider.reboot();
}
}
}
};
ggVolume.addChangeListener( new ChangeListener() {
public void stateChanged( ChangeEvent e ) {
superCollider.setVolume( ControlRoomFrame.this, ggVolume.getVolumeLinear() );
}
});
ggLimiter = new MultiStateButton();
ggLimiter.setNumColumns( 8 );
ggLimiter.addItem( "Limiter" );
// NOTE: BUG WITH CUSTOM COMPOSITE ON WIN-XP!!!
// ggLimiter.addItem( "Limiter", null, new Color( 0xFF, 0xFA, 0x9D ), new Color( 0xFA, 0xE7, 0x9D ));
ggLimiter.addItem( "Limiter", null, new Color( 0xFF, 0xFA, 0x9D ));
ggLimiter.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent e ) {
superCollider.setLimiter( ggLimiter.getSelectedIndex() == 1 );
}
});
if( superCollider.getLimiter() ) ggLimiter.setSelectedIndex( 1 );
pmg = new PeakMeterPanel();
pmg.setBorder( true );
pmg.setCaption( true );
oCfg = superCollider.getOutputConfig();