Examples of BasicCompoundEdit


Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      switch( mode ) {
      case SCROLL_SESSION_START:
        if( timelinePos != 0 ) {
          edit  = TimelineVisualEdit.position( this, doc, 0 ).perform();
          if( !timelineVis.contains( 0 )) {
            final CompoundEdit ce  = new BasicCompoundEdit();
            ce.addEdit( edit );
            newSpan  = new Span( 0, timelineVis.getLength() );
            ce.addEdit( TimelineVisualEdit.scroll( this, doc, newSpan ).perform() );
            ce.end();
            edit  = ce;
          }
        }
        break;
       
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

        span  = doc.timeline.getSelectionSpan();
        if( span.isEmpty() || span.getStop() == doc.timeline.getLength() ) return;
        span  = new Span( span.getStop() - 1, Math.min( doc.timeline.getLength(),
                  span.getStop() - 1 + span.getLength() ));

        edit  = new BasicCompoundEdit( getValue( NAME ).toString() );
        edit.addPerform( TimelineVisualEdit.select( this, doc, span ));
        edit.addPerform( TimelineVisualEdit.position( this, doc, span.getStart() ));
        edit.perform();
        edit.end();
        doc.getUndoManager().addEdit( edit );
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

        doc.bird.waitExclusive( Session.DOOR_TIME );
        span  = doc.timeline.getSelectionSpan();
        if( span.isEmpty() || span.getStart() == 0 ) return;
        span  = new Span( Math.max( 0, span.getStart() + 1 - span.getLength() ), span.getStart() + 1 );

        edit  = new BasicCompoundEdit( getValue( NAME ).toString() );
        edit.addPerform( TimelineVisualEdit.select( this, doc, span ));
        edit.addPerform( TimelineVisualEdit.position( this, doc, span.getStart() ));
        edit.perform();
        edit.end();
        doc.getUndoManager().addEdit( edit );
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      insertSpan      = new Span( insertPos, insertPos + pasteLength );
      copySpan      = new Span( tl.getSpan().start, tl.getSpan().start + pasteLength );
      cutTimeline      = (mode == EDIT_INSERT) && !hasSelectedAudio.isSet();
      cutTimelineSpan    = cutTimeline ? new Span( docLength, docLength + pasteLength ) : null;
     
      edit      = new BasicCompoundEdit( name );
      oldSelSpan    = timeline.getSelectionSpan();
      if( !oldSelSpan.isEmpty() ) { // deselect
        edit.addPerform( TimelineVisualEdit.select( this, Session.this, new Span() ));
      }
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      final List        collTypes    = Main.getTransmitterTypes();
      final List        collMap;
      final Span        span;
      final List        collNewTrns    = new ArrayList( num );
      final List        collAllTrns    = doc.getTransmitters().getAll();
      final BasicCompoundEdit  edit;
      Class    c;
      Transmitter  trns;
      String    s;
      Map      map;
     
      edit = new BasicCompoundEdit( getValue( NAME ).toString() );
     
      collMap = new ArrayList( num );
      for( int i = 0; i < num; i++ ) {
        collMap.add( collTypes.get( 0 ));
      }
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

     */
    public int processRun( ProcessingThread context )
    throws IOException
    {
      final float[][]      buf      = new float[ 2 ][ 4096 ];
      final BasicCompoundEdit  edit    = (BasicCompoundEdit) context.getClientArg( "edit" );
      final List        collNewTrns  = (List) context.getClientArg( "trns" );
      final int        num      = collNewTrns.size();
      Transmitter        trns;
      AudioTrail        at;
      long          progress  = 0;
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      }
    } // run()
   
    public void processFinished( ProcessingThread context )
    {
      final BasicCompoundEdit edit = (BasicCompoundEdit) context.getClientArg( "edit" );

      if( context.getReturnCode() == ProgressComponent.DONE ) {
        final List collNewTrns  = (List) context.getClientArg( "trns" );
//        final List stakes    = (List) context.getClientArg( "stakes" );
//        for( int i = 0; i < collNewTrns.size(); i++ ) {
//          final AudioTrail at = ((Transmitter) collNewTrns.get( i )).getAudioTrail();
//          .editAdd(
//              this, (AudioStake) stakes.get( i ), edit );
//        }
        final List selectedGroups = doc.getSelectedGroups().getAll();
        if( !selectedGroups.isEmpty() ) {
          for( int i = 0; i < collNewTrns.size(); i++ ) {
            final GroupableSessionObject so = (GroupableSessionObject) collNewTrns.get( i );
            edit.addPerform( new EditAddSessionObjects( this, so.getGroups(), selectedGroups ));
          }
        }
        edit.addPerform( new EditAddSessionObjects( this, doc.getMutableTracks(), collNewTrns ));
        edit.addPerform( new EditAddSessionObjects( this, doc.getMutableSelectedTracks(), collNewTrns ));
//        for( int i = 0; i < doc.getSelectedGroups().size(); i++ ) {
//          final SessionGroup group = (SessionGroup) doc.getSelectedGroups().get( i );
//          edit.addPerform( new EditAddSessionObjects( this, group.getTransmitters(), collNewTrns ));
//        }
        edit.perform();
        edit.end();
        doc.getUndoManager().addEdit( edit );
      } else {
        // EEE should undo the stake alloc!!!
        edit.cancel();
      }
    }
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

//      SessionGroup      g;

//      try {
//        doc.bird.waitExclusive( doors );
        collSelection    = scSel.getAll();
        edit        = new BasicCompoundEdit( getValue( NAME ).toString() );
//        if( scGroups != null ) {
//          for( int i = 0; i < scGroups.size(); i++ ) {
//            g      = (SessionGroup) scGroups.get( i );
//            collInGroup  = g.getTransmitters().getAll();
//            collInGroup.retainAll( collSelection );
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      SessionObject      so;
      MapManager        map;
      final String      key    = keys.get( row ).toString();
      boolean          addEdit  = false;
      AbstractCompoundEdit  edit  = new BasicCompoundEdit();

      for( int i = 0; i < collObjects.size(); i++ ) {
        so  = (SessionObject) collObjects.get( i );
        map = so.getMap();
        if( map.containsKey( key )) {
          edit.addPerform( new EditPutMapValue( SessionObjectTable.this, map, key, value ));
          addEdit = true;
        }
      }
      if( addEdit ) {
        edit.perform();
        edit.end();
        doc.getUndoManager().addEdit( edit );
      }
    }
View Full Code Here

Examples of de.sciss.meloncillo.edit.BasicCompoundEdit

      long      pos;
   
      selSpan    = getSelectionSpan();
      if( selSpan.isEmpty() ) return;
     
      edit  = new BasicCompoundEdit();
      if( deselect ) edit.addEdit( TimelineVisualEdit.select( this, doc, new Span() ).perform() );
      pos    = (long) (selSpan.getStart() + selSpan.getLength() * weight + 0.5);
      edit.addEdit( TimelineVisualEdit.position( this, doc, pos ).perform() );
      edit.end();
      doc.getUndoManager().addEdit( edit );
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.