Search in sources :

Example 1 with ProjectPropertiesUI

use of org.gephi.project.spi.ProjectPropertiesUI in project gephi by gephi.

the class ProjectControllerUIImpl method projectProperties.

@Override
public void projectProperties() {
    Project project = controller.getCurrentProject();
    ProjectPropertiesUI ui = Lookup.getDefault().lookup(ProjectPropertiesUI.class);
    if (ui != null) {
        JPanel panel = ui.getPanel();
        ui.setup(project);
        DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(ProjectControllerUIImpl.class, "ProjectProperties_dialog_title"));
        Object result = DialogDisplayer.getDefault().notify(dd);
        if (result == NotifyDescriptor.OK_OPTION) {
            ui.unsetup(project);
        }
    }
}
Also used : Project(org.gephi.project.api.Project) ProjectPropertiesUI(org.gephi.project.spi.ProjectPropertiesUI) JPanel(javax.swing.JPanel) DialogDescriptor(org.openide.DialogDescriptor) FileObject(org.openide.filesystems.FileObject)

Aggregations

JPanel (javax.swing.JPanel)1 Project (org.gephi.project.api.Project)1 ProjectPropertiesUI (org.gephi.project.spi.ProjectPropertiesUI)1 DialogDescriptor (org.openide.DialogDescriptor)1 FileObject (org.openide.filesystems.FileObject)1