Package de.sciss.common

Examples of de.sciss.common.ProcessingThread.addListener()


        wasClosed.set( false );
        return null;
      }
      final ProcessingThread pt = confirmUnsaved( name, wasClosed );
      if( pt != null ) {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e ) { /* ignored */ }
          public void processStopped( ProcessingThread.Event e )
          {
            if( e.isDone() ) {
              documentClosed();
View Full Code Here


        return;
      }
     
      pt = doc2.pasteTrackList( tl, 0, getResourceString( "menuPaste" ), Session.EDIT_INSERT );
      if( pt != null ) {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e1 ) { /* ignored */ }
          public void processStopped( ProcessingThread.Event e2 ) {
            tl.dispose();
          }
        });
View Full Code Here

                       int[] channelMap, boolean saveMarkers, final boolean asCopy, final boolean openAfterSave )
    {
      final ProcessingThread pt = doc.procSave( name, span, afds, channelMap, saveMarkers, asCopy );
      if( pt == null ) return null;
     
      pt.addListener( new ProcessingThread.Listener() {
        public void processStopped( ProcessingThread.Event e )
        {
          if( !e.isDone() ) return;

          wpHaveWarned = false;
View Full Code Here

  {
    final Flag        confirmed  = new Flag( false );
    final ProcessingThread  pt      = getMenuFactory().closeAll( forcedQuit, confirmed );

    if( pt != null ) {
      pt.addListener( quitAfterSaveListener );
      ((BasicDocument) pt.getClientArg( "doc" )).start( pt );
    } else if( confirmed.isSet() ) {
      OSCRoot.getInstance().quit();
      SuperColliderClient.getInstance().quit();
      super.quit();
View Full Code Here

        }
//pt = null;
        pt = targetDoc == null ? null : targetDoc.pasteTrackList( tl, targetDoc.timeline.getPosition(), getValue( NAME ).toString(), targetDoc.getEditMode() );

        if( pt != null ) {
          pt.addListener( new ProcessingThread.Listener() {
            public void processStarted( ProcessingThread.Event e1 ) { /* ignored */ }
            public void processStopped( ProcessingThread.Event e2 )
            {
              tl.dispose();
              tmpDoc.dispose();
View Full Code Here

      final ProcessingThread  pt      = frame.confirmUnsaved( text, confirmed );
      if( pt == null ) {
        if( !confirmed.isSet() ) return;
        queryAndPerform();
      } else {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e ) {}
          public void processStopped( ProcessingThread.Event e ) {
            if( e.getProcessingThread().getReturnCode() == ProgressComponent.DONE ) {
              queryAndPerform();
            }
View Full Code Here

    }
   
    private void perform( File f )
    {
      final ProcessingThread pt = doc.initiateLoad( f );
      pt.addListener( this );
      pt.start();
    }

    private File queryFile()
    {
View Full Code Here

    final Flag        confirmed  = new Flag( false );
//    final ProcessingThread  pt      = getMenuFactory().closeAll( forcedQuit, confirmed );
    final ProcessingThread  pt      = doc.closeDocument( getResourceString( "menuQuit" ), forcedQuit, confirmed );

    if( pt != null ) {
      pt.addListener( quitAfterSaveListener );
      ((Session) pt.getClientArg( "doc" )).start( pt );
    } else if( confirmed.isSet() ) {
//      OSCRoot.getInstance().quit();
//      SuperColliderClient.getInstance().quit();
      super.quit();
View Full Code Here

        wasClosed.set( false );
        return null;
      }
      final ProcessingThread pt = confirmUnsaved( name, wasClosed );
      if( pt != null ) {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e ) { /* ignored */ }
          public void processStopped( ProcessingThread.Event e )
          {
            if( e.isDone() ) {
              documentClosed();
View Full Code Here

     
      if( pt == null ) {
        if( !confirmed.isSet() ) return;
        clear();
      } else {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e ) {}
          public void processStopped( ProcessingThread.Event e ) {
            if( e.getProcessingThread().getReturnCode() == ProgressComponent.DONE ) {
              clear();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.