Package org.gephi.utils.longtask.api

Examples of org.gephi.utils.longtask.api.LongTaskExecutor.execute()


            LongTaskExecutor executor = new LongTaskExecutor(true, builder.getName(), 10);
//            executor.addLongTaskListener(this);
            if (listener != null) {
                executor.setLongTaskListener(listener);
            }
            executor.execute((LongTask) pStatistics, new Runnable() {

                public void run() {
                    pStatistics.execute(graphModel, attributeModel);
                    model.setRunning(pStatistics, false);
                    for (StatisticsUI s : uis) {
View Full Code Here


                System.out.println("Finished" + (++count));
                if (count == limit) {
                    return;
                }
                LongTaskTest l = new LongTaskTest();
                longTaskExecutor.execute(l, l);
            }
        };
        longTaskExecutor.setLongTaskListener(longTaskListener);
        LongTaskTest longTaskTest = new LongTaskTest();
        longTaskExecutor.execute(longTaskTest, longTaskTest);
View Full Code Here

                longTaskExecutor.execute(l, l);
            }
        };
        longTaskExecutor.setLongTaskListener(longTaskListener);
        LongTaskTest longTaskTest = new LongTaskTest();
        longTaskExecutor.execute(longTaskTest, longTaskTest);
        try {
            Thread.sleep(3000);
        } catch (InterruptedException ex) {
            Exceptions.printStackTrace(ex);
        }
View Full Code Here

            settingPanel.unsetup(true);

            //Create a new executor and execute
            LongTaskExecutor executor = new LongTaskExecutor(true, "SQLite Exporter");
            executor.setDefaultErrorHandler(errorHandler);
            executor.execute(exporter, new Runnable() {

                @Override
                public void run() {
                    //Get the current workspace and set it to the exporter
                    Workspace currentWorkspace = Lookup.getDefault().lookup(ProjectController.class).getCurrentWorkspace();
View Full Code Here

    @Override
    public void actionPerformed(ActionEvent e) {
        LongTaskExecutor executor = new LongTaskExecutor(true);
        LongTaskExample longTaskExample = new LongTaskExample();
        executor.execute(longTaskExample, longTaskExample, "Task...", null);
    }

    private static class LongTaskExample implements LongTask, Runnable {

        private ProgressTicket progressTicket;
View Full Code Here

            executor.setLongTaskListener(listener);
        }

        if (statistics instanceof DynamicStatistics) {
            final DynamicLongTask dynamicLongTask = new DynamicLongTask((DynamicStatistics) statistics);
            executor.execute(dynamicLongTask, new Runnable() {

                @Override
                public void run() {
                    executeDynamic((DynamicStatistics) statistics, dynamicLongTask);
                }
View Full Code Here

                    executeDynamic((DynamicStatistics) statistics, dynamicLongTask);
                }
            }, builder.getName(), null);
        } else {
            LongTask task = statistics instanceof LongTask ? (LongTask) statistics : null;
            executor.execute(task, new Runnable() {

                @Override
                public void run() {
                    execute(statistics);
                }
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.