Package de.sciss.gui

Examples of de.sciss.gui.MultiStateButton


    ggScroll    = lta.placeMeInAPane();
    lta.makeSystemOutput();
   
    actionBoot    = new ActionBoot();
//    ggBoot      = new JButton( actionBoot );
    ggBoot      = new MultiStateButton();
    ggBoot.setFocusable( false )// prevent user from accidentally starting/stopping server
    ggBoot.setAutoStep( false );
    ggBoot.addActionListener( actionBoot );
   
//    ggDumpOSC    = new JCheckBox( getResourceString( "labelDumpOSC" ));
//    ggDumpOSC.addItemListener( new ItemListener() {
//      public void itemStateChanged( ItemEvent e ) {
//        root.superCollider.dumpOSC( ggDumpOSC.isSelected() ? kDumpText : kDumpOff );
//      }
//    });
    ggDumpOSC    = new MultiStateButton();
    ggDumpOSC.setFocusable( false );
    ggDumpOSC.addActionListener( new ActionListener() {
      public void actionPerformed( ActionEvent e ) {
        superCollider.dumpOSC( ggDumpOSC.getSelectedIndex() );
      }
View Full Code Here


    super();
    this.prefs    = prefs != null ? prefs : AbstractApplication.getApplication().getUserPrefs().node( DEFAULT_NODE );
    this.timeline  = timeline;

//    b        = new JToggleButton( this );
    b        = new MultiStateButton();
    b.setNumColumns( 8 );
    b.setAutoStep( false );
    b.addActionListener( this );
    b.addItem( "", null, new Color( 0, 0, 0, 0 ));
    b.addItem( "", null, new Color( 0xFF, 0xFA, 0x9D ));
View Full Code Here

 
  public JComboBox getComboBox()
  {
    final ComboBoxModel    model      = getComboBoxModel();
    final ComboBoxModel    emptyCBM    = new DefaultComboBoxModel();
    final MultiStateButton  button      = b;
    final JComboBox      ggBlend      = new JComboBox(); // ( pcbm );
    final ListCellRenderer  blendRenderer  = getComboBoxRenderer();
   
    ggBlend.setEditable( true );
    ggBlend.setEditor( new ComboBoxEditor() {
      public Component getEditorComponent() { return button; }

      public void setItem( Object o )
      {
//System.err.println( "setItem " + o );
        if( o != null ) {
          current.setFrom( (Settings) o );
          current.toPrefs( prefs );
          updateButton();
        }
      }
     
      public Object getItem() { return current; }
      public void selectAll() { /* ignore */ }
      public void addActionListener(ActionListener l) { /* ignore */ }
      public void removeActionListener(ActionListener l) { /* ignore */ }
    });
    ggBlend.setRenderer( blendRenderer );
    button.setFocusable( false );
    ggBlend.setFocusable( false );
    GUIUtil.constrainSize( ggBlend, 120, 26 )// 110 XXX (140 for MetalLAF)
    ggBlend.setOpaque( false );
   
    // this is _crucial_ because since pcbm is global
View Full Code Here

    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();
View Full Code Here

    super();
    this.prefs    = prefs != null ? prefs : AbstractApplication.getApplication().getUserPrefs().node( DEFAULT_NODE );
    this.timeline  = timeline;

//    b        = new JToggleButton( this );
    b        = new MultiStateButton();
    b.setNumColumns( 8 );
    b.setAutoStep( false );
    b.addActionListener( this );
    b.addItem( "", null, new Color( 0, 0, 0, 0 ));
    b.addItem( "", null, new Color( 0xFF, 0xFA, 0x9D ));
View Full Code Here

 
  public JComboBox getComboBox()
  {
    final ComboBoxModel    model      = getComboBoxModel();
    final ComboBoxModel    emptyCBM    = new DefaultComboBoxModel();
    final MultiStateButton  button      = b;
    final JComboBox      ggBlend      = new JComboBox(); // ( pcbm );
    final ListCellRenderer  blendRenderer  = getComboBoxRenderer();
   
    ggBlend.setEditable( true );
    ggBlend.setEditor( new ComboBoxEditor() {
      public Component getEditorComponent() { return button; }

      public void setItem( Object o )
      {
//System.err.println( "setItem " + o );
        if( o != null ) {
          current.setFrom( (Settings) o );
          current.toPrefs( prefs );
          updateButton();
        }
      }
     
      public Object getItem() { return current; }
      public void selectAll() { /* ignore */ }
      public void addActionListener(ActionListener l) { /* ignore */ }
      public void removeActionListener(ActionListener l) { /* ignore */ }
    });
    ggBlend.setRenderer( blendRenderer );
    button.setFocusable( false );
    ggBlend.setFocusable( false );
    GUIUtil.constrainSize( ggBlend, 120, 26 )// 110 XXX (140 for MetalLAF)
    ggBlend.setOpaque( false );
   
    // this is _crucial_ because since pcbm is global
View Full Code Here

TOP

Related Classes of de.sciss.gui.MultiStateButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.