Package com.cedarsoft.spring.rcp.async

Examples of com.cedarsoft.spring.rcp.async.BlockingBackgroundActionRunner


    ConfirmationDialog dlg = new ConfirmationDialog( title, message ) {
      @Override
      protected void onConfirm() {
        final List<? extends T> objectsToDelete = objectAccess.getElements();

        new BlockingBackgroundActionRunner( SpringSupport.INSTANCE.getActiveApplicationWindow(), new BackgroundAction( idStrategy.getBaseId() + AddRemoveAspect.KEY_DELETE_BEAN ) {
          @Override
          protected boolean confirm() {
            if ( callback != null ) {
              return callback.confirm();
            }
View Full Code Here


    this.backgroundAction = backgroundAction;
  }

  @Override
  protected void executeCommand() throws Exception {
    new BlockingBackgroundActionRunner( getApplicationWindow(), backgroundAction ).run();
  }
View Full Code Here

      @Override
      protected boolean confirm() {
        return AbstractBackgroundCommand.this.confirm();
      }
    };
    actionRunner = new BlockingBackgroundActionRunner( getApplicationWindow(), action, false );

    actionRunner.run();
  }
View Full Code Here

    publishEvent( new LifecycleApplicationEvent( LifecycleApplicationEvent.MODIFIED, object ) );
  }

  public void openEditor( @NotNull final Object editorRoot ) {
    //Prefetch it
    final BlockingBackgroundActionRunner actionRunner = new BlockingBackgroundActionRunner( getApplication().getActiveWindow(), new BackgroundAction( "prefetching.data" ) {
      @Override
      protected void executeInBackground() throws Exception {
        prepareOpenEditor( editorRoot );
      }

      @Override
      protected void finished() {
        //First get the object (from terracotta)
        log.info( "----> Opening Editor for " + editorRoot );
        publishEvent( new OpenEditorEvent( editorRoot ) );
      }
    } );

    SwingUtilities.invokeLater( new Runnable() {
      @Override
      public void run() {
        actionRunner.run();
      }
    } );
  }
View Full Code Here

      }
    }

    getForm().commit();

    new BlockingBackgroundActionRunner( springSupport.getActiveApplicationWindow(), new BackgroundAction( "saving" ) {
      @Override
      protected void executeInBackground() throws Exception {
        String eventType;
        if ( backend.isCreatingNew() ) {
          eventType = LifecycleApplicationEvent.CREATED;
View Full Code Here

TOP

Related Classes of com.cedarsoft.spring.rcp.async.BlockingBackgroundActionRunner

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.