Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMonitor


    }

    public void executeSyncWithoutUndo(final MapCommand command) {
        command.setMap(this);
        if (Display.getCurrent() != null) {
            ProgressMonitorDialog dialog = new ProgressMonitorDialog(PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getShell());
            dialog.setOpenOnRun(true);
            try {
                dialog.run(false, false, new IRunnableWithProgress() {

                    public void run(IProgressMonitor monitor) throws InvocationTargetException,
                            InterruptedException {
                        try {
                            command.run(monitor);
View Full Code Here


            boolean runASync ) {

        Runnable object = new Runnable(){
            public void run() {
                Shell shell = Display.getDefault().getActiveShell();
                ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell){
                    @Override
                    protected void configureShell( Shell shell ) {
                        super.configureShell(shell);
                        shell.setText(dialogTitle);
                    }

                    @Override
                    protected void createButtonsForButtonBar( Composite parent ) {
                        if (showRunInBackground)
                            createBackgroundButton(parent);
                        super.createButtonsForButtonBar(parent);
                    }

                    private void createBackgroundButton( Composite parent ) {
                        createButton(parent, IDialogConstants.BACK_ID,
                                Messages.PlatformGIS_background, true);
                    }

                    @Override
                    protected void buttonPressed( int buttonId ) {
                        if (buttonId == IDialogConstants.BACK_ID) {
                            getShell().setVisible(false);
                        } else
                            super.buttonPressed(buttonId);
                    }
                };
                try {

                    dialog.run(true, true, new IRunnableWithProgress(){
                        public void run( IProgressMonitor monitor ) {
                            try {
                                runBlockingOperation(new IRunnableWithProgress(){

                                    public void run( IProgressMonitor monitor )
View Full Code Here

    private Collection<PreTask> preShutdownTasks = new LinkedList<PreTask>();

    public void postShutdown( final IWorkbench workbench ) {

        try {
            final ProgressMonitorDialog dialog = getDialog(workbench);
            dialog.run(true, false, new IRunnableWithProgress(){

                public void run( IProgressMonitor monitor2 ) throws InvocationTargetException,
                        InterruptedException {
                    OffThreadProgressMonitor monitor = new OffThreadProgressMonitor(monitor2, dialog.getShell().getDisplay());

                    int totalsteps = 0;
                    for( PostTask task : postShutdownTasks ) {
                        try {
                            task.steps = task.task.getProgressMonitorSteps();
View Full Code Here

        }

    }

    public boolean preShutdown( final IWorkbench workbench, final boolean forced ) {
        final ProgressMonitorDialog dialog = getDialog(workbench);

        final boolean[] allowShutdown = new boolean[1];
        allowShutdown[0] = true;

        workbench.getActiveWorkbenchWindow().getShell().setVisible(false);
       
        final Display display=Display.getCurrent();
        try {
            dialog.run(true, forced, new IRunnableWithProgress(){

                public void run( IProgressMonitor monitor2 ) throws InvocationTargetException,
                        InterruptedException {
                   
                    IProgressMonitor monitor=new OffThreadProgressMonitor(monitor2, display);
View Full Code Here

    }

    private ProgressMonitorDialog getDialog( IWorkbench workbench ) {
        Shell shell = new Shell(Display.getCurrent());

        ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
        dialog.open();
        return dialog;
    }
View Full Code Here

           
            // We are going to take a couple of minutes to set this up
            // so we better set up a progress dialog thing
            //
            try {
                ProgressMonitorDialog progress = new ProgressMonitorDialog( Display.getCurrent().getActiveShell());
                progress.run(true,false, new IRunnableWithProgress(){           
                    public void run( IProgressMonitor monitor ) throws InvocationTargetException,
                            InterruptedException {
                        Activator.initializeReferencingModule( monitor);
                    }
                });
View Full Code Here

      @Override
            public void run() {

        Shell shell = Display.getDefault().getActiveShell();

        ProgressMonitorDialog dialog = DialogUtil.openProgressMonitorDialog(shell, dialogTitle,
              showRunInBackground, confirmCancelRequests);

        try {

          dialog.run(true, true, new IRunnableWithProgress() {

            @Override
                        public void run(IProgressMonitor monitor)
              throws InvocationTargetException, InterruptedException {
              try {
View Full Code Here

      @Override
            public void run() {

        Shell shell = Display.getDefault().getActiveShell();

        ProgressMonitorDialog dialog = DialogUtil.openProgressMonitorDialog(shell, dialogTitle,
              showRunInBackground, confirmCancelRequests);

        try {

          dialog.run(true, true, new IRunnableWithProgress() {

            @Override
                        public void run(final IProgressMonitor monitor)
              throws InvocationTargetException, InterruptedException {
              try {
View Full Code Here

  public static ProgressMonitorDialog openProgressMonitorDialogfinal Shell shell,
                                  final String dialogTitle,
                                  final boolean showRunInBackground,
                                  final boolean confirmCancelRequests) {

    ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell) {
      @Override
      protected void cancelPressed() {
        boolean confirmed = true;
        if (confirmCancelRequests) {
          String title = Messages.DialogUtil_title;
View Full Code Here

        if (codes.isEmpty() && search) {
            PlatformGIS.syncInDisplayThread(new Runnable() {
                public void run() {
                    Shell shell = Display.getCurrent().getActiveShell();

                    ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
                    try {
                        dialog.run(false, true, new IRunnableWithProgress() {

                            public void run(IProgressMonitor monitor)
                                    throws InvocationTargetException, InterruptedException {
                                CoordinateReferenceSystem found = CRSUtil
                                        .findEPSGCode(crs, monitor);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.ProgressMonitorDialog$ProgressMonitor

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.