Package de.sciss.eisenkraut.io

Examples of de.sciss.eisenkraut.io.RoutingConfig


 
  private void createRecordConfig()
  {
    final String cfgName  = classPrefs.get( KEY_CONFIG, null );

    RoutingConfig newRCfg  = null;

    try {
      if( cfgName != null && audioPrefs.node( NODE_CONF ).nodeExists( cfgName )) {
        newRCfg  = new RoutingConfig( audioPrefs.node( NODE_CONF ).node( cfgName ));
      }
    }
    catch( BackingStoreException e1 ) {
      printError( "createRecordConfig", e1 );
    }
View Full Code Here


      {
//        int row = table.getSelectedRow() + table.getSelectedRowCount();
//        if( row <= 0 ) row = collConfigs[ ID ].size();
        final int modelIndex = collConfigs[ id ].size();
        final int viewIndex;
        final RoutingConfig cfg = createUniqueConfig( id );
//        collConfigs[ ID ].add( row, cfg );
        collConfigs[ id ].add( cfg );
        setConfigIDs[ id ].add( cfg.id );
        setConfigNames[ id ].add( cfg.name );
        setDirtyConfigs[ id ].add( cfg.id );
        tm.fireTableRowsInserted( modelIndex, modelIndex );
        viewIndex = stm.getViewIndex( modelIndex );
        table.setRowSelectionInterval( viewIndex, viewIndex );
      }
    });
    ggMinus.addActionListener( new ActionListener() {
      public void actionPerformed( ActionEvent e )
      {
        final int firstRow  = Math.max( 0, table.getSelectedRow() );
        final int lastRow  = Math.min( table.getRowCount(), firstRow + table.getSelectedRowCount() ) - 1;
        RoutingConfig cfg;
        final int[] modelIndices;
       
        if( firstRow <= lastRow ) {
          modelIndices = new int[ lastRow - firstRow + 1 ];
          for( int i = 0, viewIndex = firstRow; viewIndex <= lastRow; i++, viewIndex++ ) {
View Full Code Here

    setConfigNames[ id ].clear();
    setConfigIDs[ id ].clear();
   
    final Preferences  ocPrefs    = audioPrefs.node( KEY_PREFSNODE[ id ]);
    final String[]    arrayNames;
    RoutingConfig    cfg;
    Preferences      cfgPrefs;

    try {
      arrayNames = ocPrefs.childrenNames();
//System.err.println( "Got "+arrayNames.length+" children . " );
    }
    catch( BackingStoreException e1 ) {
      BasicWindowHandler.showErrorDialog( getWindow(), e1, getResourceString( "errLoadPrefs" ));
      return;
    }
     
    for( int i = 0; i < arrayNames.length; i++ ) {
      cfgPrefs  = ocPrefs.node( arrayNames[ i ]);
      try {
        cfg    = new RoutingConfig( cfgPrefs );
        collConfigs[ id ].add( cfg );
        setConfigIDs[ id ].add( arrayNames[ i ]);
        setConfigNames[ id ].add( cfg.name );
      }
      catch( NumberFormatException e1 ) {
View Full Code Here

 
  protected boolean toPrefs( int id )
  {
    final Preferences  ocPrefs    = audioPrefs.node( KEY_PREFSNODE[ id ]);
//    final String[]    arrayNames;
    RoutingConfig    cfg;
    Preferences      cfgPrefs;
    String        cfgID;

    try {
//      arrayNames = ocPrefs.childrenNames();
//      for( int i = 0; i < arrayNames.length; i++ ) {
//        cfgPrefs = ocPrefs.node( arrayNames[ i ]);
//        cfgPrefs.removeNode();
////System.err.println( "removing "+arrayNames[ i ]);
//      }
   
      for( int i = 0; i < collConfigs[ id ].size(); i++ ) {
        cfg = (RoutingConfig) collConfigs[ id ].get( i );
        if( setDirtyConfigs[ id ].remove( cfg.id )) {
          cfgPrefs  = ocPrefs.node( cfg.id );
          cfg.toPrefs( cfgPrefs );
//System.err.println( "adding / updating "+cfg.id + " (" + cfg.name + ")" );
        }
      }
     
      for( Iterator iter = setDirtyConfigs[ id ].iterator(); iter.hasNext(); ) {
View Full Code Here

    String cfgID = "user1";
    for( int i = 2; setConfigIDs[ id ].contains( cfgID ); i++ ) {
      cfgID = "user" + i;
    }
   
    return new RoutingConfig( cfgID, name );
  }
View Full Code Here

    value = "out1to2";
    putDontOverwrite( childPrefs, KEY_OUTPUTCONFIG, value );
    try {
      if( !childPrefs.nodeExists( NODE_OUTPUTCONFIGS )) {
        childPrefs2 = childPrefs.node( NODE_OUTPUTCONFIGS );
        new RoutingConfig( value, "Out 1-2", new int[] { 0, 1 }, -90f ).toPrefs(
          childPrefs2.node( value ));
        value = "out1to8";
        new RoutingConfig( value, "Out 1-8", new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, -45f ).toPrefs(
          childPrefs2.node( value ));
//        // ok dis wan is rather for demonstration purpose
//        new RoutingConfig( value, 2, new int[] { 1, 0 }, -90f ).toPrefs(
//          childPrefs2.node( "Reversed Stereo" ));
      }
    }
    catch( BackingStoreException e1 ) {
      warnings.add( e1.toString() );
    }

    // inputconfigs
    try {
      if( !childPrefs.nodeExists( NODE_INPUTCONFIGS )) {
        childPrefs2 = childPrefs.node( NODE_INPUTCONFIGS );
        value = "in1";
        new RoutingConfig( value, "In 1", new int[] { 0 }, 0f ).toPrefs(
          childPrefs2.node( value ));
        value = "in1to2";
        new RoutingConfig( value, "In 1-2", new int[] { 0, 1 }, 0f ).toPrefs(
          childPrefs2.node( value ));
        value = "in1to8";
        new RoutingConfig( value, "In 1-8", new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 0f ).toPrefs(
          childPrefs2.node( value ));
//        // ok dis wan is rather for demonstration purpose
//        new RoutingConfig( value, 2, new int[] { 1, 0 }, -90f ).toPrefs(
//          childPrefs2.node( "Reversed Stereo" ));
      }
View Full Code Here

  {
    SuperColliderPlayer p;
   
    final String    cfgID    = audioPrefs.get( PrefsUtil.KEY_OUTPUTCONFIG, null );
    final Preferences  childPrefs  = audioPrefs.node( PrefsUtil.NODE_OUTPUTCONFIGS );
    RoutingConfig    newCfg    = null;

//    oCfg = null;
   
    if( oCfgNode != null ) {
      oCfgDynPrefs.stopListening();
      oCfgDynPrefs.setPreferences( null );
      oCfgNode = null;
    }

    try {
      if( (cfgID != null) && childPrefs.nodeExists( cfgID )) {
        oCfgNode  = childPrefs.node( cfgID );
        newCfg    = new RoutingConfig( oCfgNode );
//        oCfgNode.addPreferenceChangeListener( oCfgListener );
        oCfgDynPrefs.setPreferences( oCfgNode );
        oCfgDynPrefs.startListening();
      }
    }
    catch( BackingStoreException e1 ) {
      printError( "createOutputConfig", e1 );
    }
   
    if( newCfg == null ) {
      newCfg = new RoutingConfig( "none", "none" );
    }
   
    if( (oCfg != null) && oCfg.equals( newCfg )) return;

//System.out.println( "CHANGED" );
View Full Code Here

  }

  protected void createPanPan()
  {
    final String    cfgName    = audioPrefs.get( PrefsUtil.KEY_OUTPUTCONFIG, null );
    RoutingConfig    oCfg    = null;

    destroyPanPan();

    try {
      if( cfgName != null && audioPrefs.node( PrefsUtil.NODE_OUTPUTCONFIGS ).nodeExists( cfgName )) {
        oCfg  = new RoutingConfig( audioPrefs.node( PrefsUtil.NODE_OUTPUTCONFIGS ).node( cfgName ));
        pan    = new PanoramaPanel( oCfg.numChannels, oCfg.startAngle );
        setAzimuthAndSpread();
        pan.addActionListener( actionListener );
        if( palette != null ) {
          palette.getContentPane().add( pan, BorderLayout.CENTER );
View Full Code Here

      final JTable      table  = (JTable) c;
      final SortedTableModel  stm    = (SortedTableModel) table.getModel();
      final int        row    = table.getSelectedRow();
      final int        mapCh  = table.getSelectedColumn() - staticColNames.length;
      final int        modelIndex;
      RoutingConfig      cfg;
      int            temp;
   
      try {
        if( mapCh >= 0 && (row < table.getRowCount()) && t.isDataFlavorSupported( mapFlavor )) {
          modelIndex  = stm.getModelIndex( row );
View Full Code Here

      final JTable      table  = (JTable) c;
      final SortedTableModel  stm    = (SortedTableModel) table.getModel();
      final int        row    = table.getSelectedRow();
      final int        mapCh  = table.getSelectedColumn() - staticColNames.length;
      final int        modelIndex;
      RoutingConfig      cfg;
     
      if( mapCh >= 0 && (row < table.getRowCount()) ) {
        modelIndex  = stm.getModelIndex( row );
        cfg      = (RoutingConfig) collConfigs[ id ].get( modelIndex );
        for( int i = 0; i < cfg.numChannels; i++ ) {
View Full Code Here

TOP

Related Classes of de.sciss.eisenkraut.io.RoutingConfig

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.