Examples of WaitLock


Examples of org.jitterbit.ui.wait.WaitLock

    }

    private void updateUsersList() {
        PermissionsManager mgr = view.getPermissions();
        if (mgr != null) {
            WaitLock wait = view.getWindow().startWait();
            UpdateUserManagerCallback callback = new UpdateUserAndGroupCallback(wait);
            mgr.getUserManager().updateUsersAndGroups(false, callback);
        }
    }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

    /**
     * Copies a project item deeply, and displays the result.
     *
     */
    public void copy(IntegrationEntity item) {
        WaitLock waitLock = waitService.startWait();
        Worker w = new Worker(item, waitLock);
        w.execute();
    }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

        // It would be preferrable if we could pass in a WaitService directly into this class.
        EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                final WaitLock wait = waitService.startWait();
                RenameTask job = new RenameTask(location, newName, wait);
                job.execute();
            }
        });
    }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

        checkNotNull(viewManager, "viewManager");
        loadImpl(null, viewManager);
    }
   
    private void loadImpl(final Acceptor<IntegrationProject> externalAcceptor, final ViewManager viewManager) {
        final WaitLock waitLock = waitService.startWait();
        Receiver<IntegrationProject> callback = new Receiver<IntegrationProject>() {

            @Override
            public void handle(IntegrationProject project) {
                try {
                    if (viewManager != null) {
                        ProjectDisplayer displayer = new ProjectDisplayer(viewManager, projectManager, project);
                        displayer.display();
                    }
                    if (externalAcceptor != null) {
                        externalAcceptor.accept(project);
                    }
                } finally {
                    waitLock.release();
                }
            }
        };
        Runnable loader = new Loader(callback, waitLock);
        ApplicationWorker worker = Application.getWorker();
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

     * If the file is not valid XML this will result in a error message displayed in a popup dialog.
     *
     */
    public void viewFile(File file) {
        if (viewer == null) {
            WaitLock waitLock = appWin.startWait();
            try {
                viewer = createViewer(file);
                viewer.show();
            } finally {
                waitLock.release();
            }
        } else {
            viewer.addFile(file);
            viewer.forceToFront();
        }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

        }
        deskTop.removeAll();
    }

    void saveAll() {
        WaitLock waitLock = startWait();
        try {
            for (JInternalFrame frame : deskTop.getAllFrames()) {
                try {
                    ((XmlDocumentFrame) frame).saveFile();
                } catch (IOException e) {
                    JOptionPane.showMessageDialog(MainWindow.this, e.getMessage(), "Save Failed",
                            JOptionPane.ERROR_MESSAGE);
                }
            }
        } finally {
            waitLock.release();
        }
    }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

    private class FileManager implements IFileOpener, IFileSaver {

        @Override
        public void openFile(final File file) {
            final WaitLock waitLock = startWait();
            new SwingWorker<XmlFile, Void>() {

                @Override
                public XmlFile doInBackground() throws Exception {
                    return XmlFile.createXmlFile(file);
                }

                @Override
                public void done() {
                    try {
                        XmlFile xmlFile = get();
                        XmlDocumentFrame frame = new XmlDocumentFrame(MainWindow.this, xmlFile);
                        frame.setVisible(true);
                        windowsMenu.addFile(file, frame);
                        deskTop.add(frame);
                        searchAction.setEnabled(true);
                        fileMenu.refresh();
                        try {
                            frame.setSelected(true);
                        } catch (PropertyVetoException e) {
                            e.printStackTrace();
                        }
                    } catch (Exception ex) {
                        KongaTextArea text = new KongaTextArea(ex.toString(), 5, 40);
                        String title = "Failed to open '" + file.getName() + "'";
                        JOptionPane.showMessageDialog(null, new JScrollPane(text), title, JOptionPane.ERROR_MESSAGE);
                    } finally {
                        waitLock.release();
                    }
                }
            }.execute();
        }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

            }
            new Thread() {

                @Override
                public void run() {
                    final WaitLock waitLock = startWait();
                    try {
                        frame.saveFileAs(file);
                    } catch (IOException e) {
                        sbErr.append(e.getMessage());
                    }
                    SwingUtilities.invokeLater(new Runnable() {

                        @Override
                        public void run() {
                            waitLock.release();
                            if (sbErr.length() > 0) {
                                JOptionPane.showMessageDialog(MainWindow.this, sbErr.toString(), "Save Failed",
                                                JOptionPane.ERROR_MESSAGE);
                            }
                        }
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

        if (isInWaitState() || !currentPage.canContinue()) {
            return;
        }
        // The call to prepareForForwardNavigation might take some time to complete, so we kick it off in a
        // separate thread.
        final WaitLock waitLock = startWait(NAVIGATION_WAIT_DELAY);
        Runnable task = new ApplicationWorker.SafeRunnable() {

            @Override
            public void run() {
                if (currentPage.prepareForForwardNavigation()) {
View Full Code Here

Examples of org.jitterbit.ui.wait.WaitLock

        if (isInWaitState()) {
            return;
        }
        // Go back to the previous page: Remove the current page from the list
        // of pages and set the new current page.
        final WaitLock waitLock = startWait(NAVIGATION_WAIT_DELAY);
        Runnable task = new ApplicationWorker.SafeRunnable() {

            @Override
            public void run() {
                currentWizard.removeLastPage();
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.