Package org.eclipse.jface.wizard

Examples of org.eclipse.jface.wizard.ProgressMonitorPart


    }

    public void run( boolean fork, boolean cancelable, final IRunnableWithProgress request )
            throws InvocationTargetException, InterruptedException {

        ProgressMonitorPart progressMonitor = getProgressMonitor(getShell().getChildren());
        if (progressMonitor instanceof ProgressMonitorPart) {
            ProgressMonitorPart part = (ProgressMonitorPart) progressMonitor;
            if (Display.getCurrent() != null)
                part.setVisible(true);

            try {
                setEnablement(container.buttonBar, false);
                if (fork) {
                    PlatformGIS.run(request, part);
                } else {
                    PlatformGIS.runBlockingOperation(request, part);
                }
            } finally {
                setEnablement(container.buttonBar, true);
                if (Display.getCurrent() != null && !part.isDisposed())
                    part.setVisible(false);
            }
        } else {
            if (fork) {
                PlatformGIS.run(request);
            } else {
View Full Code Here


    protected ProgressMonitorPart getProgressMonitor( Control[] controls ) {
        for( Control control : controls ) {
            if (control instanceof Composite) {
                Control[] children = ((Composite) control).getChildren();
                ProgressMonitorPart found = getProgressMonitor(children);
                if (found != null) {
                    return found;
                }
            } else if (control instanceof ProgressMonitorPart) {
                return (ProgressMonitorPart) control;
View Full Code Here

            PlatformGIS.run(request);
            return;
        }
       
        if (getProgressMonitor() instanceof ProgressMonitorPart) {
                ProgressMonitorPart part = (ProgressMonitorPart) getProgressMonitor();
                if( Display.getCurrent()!=null )
                    part.setVisible(true);
               
                try {
                    setEnablement(buttonBar,false);
                    if( fork ){
                        PlatformGIS.run(request, part);
                    }else{
                        PlatformGIS.runBlockingOperation(request, part);
                    }
                } finally {
                    setEnablement(buttonBar, true);
                    if(Display.getCurrent()!=null && !part.isDisposed())
                        part.setVisible(false);
                }
            } else {
                if( fork ){
                    PlatformGIS.run(request);
                } else {
View Full Code Here

     * @param pmlayout
     * @return ProgressMonitorPart
     */
    protected ProgressMonitorPart createProgressMonitorPart(
            Composite composite, GridLayout pmlayout) {
        return new ProgressMonitorPart(composite, pmlayout, SWT.DEFAULT) {
            String currentTask = null;
            boolean lockedUI = false;
           
            /*
             * (non-Javadoc)
 
View Full Code Here

    public void runWithProgress( boolean mayBlock, final IRunnableWithProgress runnable )
            throws InvocationTargetException, InterruptedException {
        if (Display.getCurrent() == null)
            throw new SWTException(SWT.ERROR_THREAD_INVALID_ACCESS);
        final ProgressMonitorPart part = new ProgressMonitorPart(progressArea, new GridLayout(
                1, true), 10);
        try {
            progressArea.layout();
            PlatformGIS.runBlockingOperation(runnable, part);
        } finally {
            part.dispose();
            progressArea.layout();
        }

    }
View Full Code Here

    gridData.verticalAlignment = SWT.CENTER;
    progressIndicator.setLayoutData(gridData);
    gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    progressIndicator.setLayout(gridLayout);
    progressMonitorPart = new ProgressMonitorPart(progressIndicator, null);
    gridData = new GridData(SWT.FILL, SWT.NONE, true, false);
    gridData.verticalAlignment = SWT.CENTER;
    progressMonitorPart.setLayoutData(gridData);

    Link linkCancel = new Link(progressIndicator, SWT.FLAT);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.wizard.ProgressMonitorPart

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.