Package de.sciss.meloncillo.session

Examples of de.sciss.meloncillo.session.SessionGroup


      System.err.println( "---------- active transmitters ----------" );
      doc.getActiveTransmitters().debugDump();
      System.err.println( "---------- active receivers ----------" );
      doc.getActiveReceivers().debugDump();
      for( int i = 0; i < doc.getGroups().size(); i++ ) {
        SessionGroup g = (SessionGroup) doc.getGroups().get( i );
        System.err.println( "............ group : "+g.getName() );
        System.err.println( "............ group transmitters ............" );
        g.getTransmitters().debugDump();
        System.err.println( "............ group receivers ............" );
        g.getReceivers().debugDump();
      }
    }
View Full Code Here


    {
      String          name;
      boolean          b1;
      int            result;
      List          collSO;
      SessionGroup      group;
      AbstractCompoundEdit  ce;

      try {
        doc.bird.waitShared( Session.DOOR_TRNS | Session.DOOR_RCV );
        b1 = doc.getSelectedReceivers().isEmpty() && doc.getSelectedTransmitters().isEmpty();
      } finally {
        doc.bird.releaseShared( Session.DOOR_TRNS | Session.DOOR_RCV );
      }
      if( b1 ) {  // ask if we should create an empty group
        result = JOptionPane.showConfirmDialog( null,
          AbstractApplication.getApplication().getResourceString( "warnNoObjectsSelected" ),
          getValue( Action.NAME ).toString(), JOptionPane.YES_NO_OPTION );
         
        if( result != JOptionPane.YES_OPTION ) return;
      }

      try {
        doc.bird.waitShared( Session.DOOR_GRP );
        name = BasicSessionCollection.createUniqueName( Session.SO_NAME_PTRN,
          new Object[] { new Integer( 1 ), Session.GRP_NAME_PREFIX, Session.GRP_NAME_SUFFIX },
          doc.getGroups().getAll() );
      } finally {
        doc.bird.releaseShared( Session.DOOR_GRP );
      }
      name = JOptionPane.showInputDialog( null, AbstractApplication.getApplication().getResourceString(
        "inputDlgNewGroup" ), name );
       
      if( name == null ) return;
     
      ce = new BasicCompoundEdit( getValue( NAME ).toString() );
     
      try {
        doc.bird.waitExclusive( Session.DOOR_GRP );
        group  = (SessionGroup) doc.getGroups().findByName( name );
        b1    = group == null;
        if( !b1 ) {
          result = JOptionPane.showConfirmDialog( null,
            AbstractApplication.getApplication().getResourceString(
            "optionDlgOverwriteGroup" ), getValue( Action.NAME ).toString(),
            JOptionPane.YES_NO_OPTION );
           
          if( result != JOptionPane.YES_OPTION ) return;
        } else {
          group = new BasicSessionGroup( doc );
          group.setName( name );
          doc.getGroups().getMap().copyContexts( this, MapManager.Context.FLAG_DYNAMIC,
                            MapManager.Context.NONE_EXCLUSIVE, group.getMap() );
        }
        if( !doc.bird.attemptShared( Session.DOOR_TRNS | Session.DOOR_RCV, 250 )) return;
        try {
          collSO    = doc.getSelectedReceivers().getAll();
          final List collGroup = Collections.singletonList( group );
View Full Code Here

TOP

Related Classes of de.sciss.meloncillo.session.SessionGroup

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.