Package org.gephi.io.processor.spi

Examples of org.gephi.io.processor.spi.ProcessorUI


                pcui.newProject();
                workspace = pc.getCurrentWorkspace();
            }

            //Process
            final ProcessorUI pui = getProcessorUI(processor);
            final ValidResult validResult = new ValidResult();
            if (pui != null) {
                if (pui != null) {
                    try {
                        SwingUtilities.invokeAndWait(new Runnable() {

                            public void run() {
                                String title = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.processor.ui.dialog.title");
                                JPanel panel = pui.getPanel();
                                pui.setup(processor);
                                final DialogDescriptor dd2 = new DialogDescriptor(panel, title);
                                if (panel instanceof ValidationPanel) {
                                    ValidationPanel vp = (ValidationPanel) panel;
                                    vp.addChangeListener(new ChangeListener() {

                                        public void stateChanged(ChangeEvent e) {
                                            dd2.setValid(!((ValidationPanel) e.getSource()).isProblem());
                                        }
                                    });
                                    dd2.setValid(!vp.isProblem());
                                }
                                Object result = DialogDisplayer.getDefault().notify(dd2);
                                if (result.equals(NotifyDescriptor.CANCEL_OPTION) || result.equals(NotifyDescriptor.CLOSED_OPTION)) {
                                    validResult.setResult(false);
                                } else {
                                    pui.unsetup(); //true
                                    validResult.setResult(true);
                                }
                            }
                        });
                    } catch (InterruptedException ex) {
View Full Code Here


    private void initProcessorsUI() {
        for (Enumeration<AbstractButton> enumeration = processorGroup.getElements(); enumeration.hasMoreElements();) {
            AbstractButton radioButton = enumeration.nextElement();
            Processor p = (Processor) radioButton.getClientProperty(PROCESSOR_KEY);
            //Enabled
            ProcessorUI pui = getProcessorUI(p);
            if (pui != null) {
                radioButton.setEnabled(pui.isValid(container));
            }
        }
    }
View Full Code Here

    private void initProcessorsUI() {
        for (Enumeration<AbstractButton> enumeration = processorGroup.getElements(); enumeration.hasMoreElements();) {
            AbstractButton radioButton = enumeration.nextElement();
            Processor p = (Processor) radioButton.getClientProperty(PROCESSOR_KEY);
            //Enabled
            ProcessorUI pui = getProcessorUI(p);
            if (pui != null) {
                radioButton.setEnabled(pui.isValid(container));
            }
        }
    }
View Full Code Here

                pcui.newProject();
                workspace = pc.getCurrentWorkspace();
            }

            //Process
            final ProcessorUI pui = getProcessorUI(processor);
            final ValidResult validResult = new ValidResult();
            if (pui != null) {
                if (pui != null) {
                    try {
                        SwingUtilities.invokeAndWait(new Runnable() {
                            @Override
                            public void run() {
                                String title = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.processor.ui.dialog.title");
                                JPanel panel = pui.getPanel();
                                pui.setup(processor);
                                final DialogDescriptor dd2 = new DialogDescriptor(panel, title);
                                if (panel instanceof ValidationPanel) {
                                    ValidationPanel vp = (ValidationPanel) panel;
                                    vp.addChangeListener(new ChangeListener() {
                                        @Override
                                        public void stateChanged(ChangeEvent e) {
                                            dd2.setValid(!((ValidationPanel) e.getSource()).isProblem());
                                        }
                                    });
                                    dd2.setValid(!vp.isProblem());
                                }
                                Object result = DialogDisplayer.getDefault().notify(dd2);
                                if (result.equals(NotifyDescriptor.CANCEL_OPTION) || result.equals(NotifyDescriptor.CLOSED_OPTION)) {
                                    validResult.setResult(false);
                                } else {
                                    pui.unsetup(); //true
                                    validResult.setResult(true);
                                }
                            }
                        });
                    } catch (InterruptedException ex) {
View Full Code Here

TOP

Related Classes of org.gephi.io.processor.spi.ProcessorUI

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.