Package org.gephi.desktop.preview.api

Examples of org.gephi.desktop.preview.api.PreviewUIModel


        });

        PreviewUIController controller = Lookup.getDefault().lookup(PreviewUIController.class);
        controller.addPropertyChangeListener(this);

        PreviewUIModel m = controller.getModel();
        if (m != null) {
            this.model = m;
            initTarget(model);
        }
    }
View Full Code Here


        presetComboBox.addItemListener(new ItemListener() {

            @Override
            public void itemStateChanged(ItemEvent e) {
                PreviewUIController pc = Lookup.getDefault().lookup(PreviewUIController.class);
                PreviewUIModel previewModel = pc.getModel();
                if (previewModel != null && presetComboBox.getSelectedItem() instanceof PreviewPreset) {
                    if (previewModel.getCurrentPreset() != presetComboBox.getSelectedItem()) {
                        pc.setCurrentPreset((PreviewPreset) presetComboBox.getSelectedItem());
                        propertySheet.setNodes(new Node[]{new PreviewNode(propertySheet)});
                    }
                }
            }
        });

        //Export
        svgExportButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                VectorialFileExporterUI ui = Lookup.getDefault().lookup(VectorialFileExporterUI.class);
                ui.action();
            }
        });
        setup(null);

        PreviewUIController controller = Lookup.getDefault().lookup(PreviewUIController.class);
        controller.addPropertyChangeListener(this);

        PreviewUIModel m = controller.getModel();
        if (m != null) {
            setup(m);
            enableRefreshButton();
        }
    }
View Full Code Here

    }

    @Override
    public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().equals(PreviewUIController.SELECT)) {
            PreviewUIModel model = (PreviewUIModel) evt.getNewValue();
            setup(model);
            if (model != null) {
                enableRefreshButton();
            } else {
                disableRefreshButton();
View Full Code Here

TOP

Related Classes of org.gephi.desktop.preview.api.PreviewUIModel

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.