Package de.sciss.gui

Examples of de.sciss.gui.MenuRadioItem


    // --- view menu ---
    mg      = new MenuGroup( "view", getResourceString( "menuView" ));
    smg      = new MenuGroup( "timeUnits", getResourceString( "menuTimeUnits" ));
    ia      = new IntPrefsMenuAction( getResourceString( "menuTimeUnitsSamples" ), null, PrefsUtil.TIME_SAMPLES );
    rg      = new MenuRadioGroup();
    smg.add( new MenuRadioItem( rg, "samples", ia ))// crucial reihenfolge : erst item erzeugen, dann gruppe setzen, dann prefs
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_TIMEUNITS );
    ia      = new IntPrefsMenuAction( getResourceString( "menuTimeUnitsMinSecs" ), null, PrefsUtil.TIME_MINSECS );
    smg.add( new MenuRadioItem( rg, "minSecs", ia ));
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_TIMEUNITS );
    mg.add( smg );

    smg      = new MenuGroup( "vertscale", getResourceString( "menuVertScale" ));
    ia      = new IntPrefsMenuAction( getResourceString( "menuVertScaleAmpLin" ), null, PrefsUtil.VSCALE_AMP_LIN );
    rg      = new MenuRadioGroup();
    smg.add( new MenuRadioItem( rg, "amplin", ia ))// crucial reihenfolge : erst item erzeugen, dann gruppe setzen, dann prefs
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_VERTSCALE );
    ia      = new IntPrefsMenuAction( getResourceString( "menuVertScaleAmpLog" ), null, PrefsUtil.VSCALE_AMP_LOG );
    smg.add( new MenuRadioItem( rg, "amplog", ia ));
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_VERTSCALE );
    ia      = new IntPrefsMenuAction( getResourceString( "menuVertScaleFreqSpect" ), null, PrefsUtil.VSCALE_FREQ_SPECT );
    smg.add( new MenuRadioItem( rg, "freqspect", ia ));
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_VERTSCALE );
    final IntPrefsMenuAction freqSpectAction = ia;
//    ia.setEnabled( prefs.node( PrefsUtil.NODE_VIEW ).getBoolean( PrefsUtil.KEY_SONAENABLED, false ));
    new DynamicPrefChangeManager( prefs.node( PrefsUtil.NODE_VIEW ), new String[] {
View Full Code Here


  public void addToWindowMenu( Action a )
  {
    final String id = "window" + String.valueOf( uniqueNumber++ );

//System.err.println( "add "+a.hashCode() );
    mgWindow.add( new MenuRadioItem( mWindowRadioGroup, id, a ));
  }
View Full Code Here

    mgWindow.add( new MenuRadioItem( mWindowRadioGroup, id, a ));
  }
 
  public void removeFromWindowMenu( Action a )
  {
    final MenuRadioItem mri = (MenuRadioItem) mgWindow.getByAction( a );   
    mgWindow.remove( mri );
  }
View Full Code Here

 

  public void setSelectedWindow( Action a )
  {
//System.err.println( "select "+a.hashCode() );
    final MenuRadioItem mri = (MenuRadioItem) mgWindow.getByAction( a );
    mri.setSelected( true );
  }
View Full Code Here

TOP

Related Classes of de.sciss.gui.MenuRadioItem

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.