Search in sources :

Example 1 with SearchReplaceUI

use of org.gephi.datalab.plugin.manipulators.general.ui.SearchReplaceUI in project gephi by gephi.

the class SearchReplace method execute.

@Override
public void execute() {
    SearchReplaceUI ui = Lookup.getDefault().lookup(SearchReplaceUI.class);
    if (ui.isActive()) {
        // Do not open more than one Search/Replace dialog
        return;
    }
    if (Lookup.getDefault().lookup(DataTablesController.class).isNodeTableMode()) {
        ui.setMode(SearchReplaceUI.Mode.NODES_TABLE);
    } else {
        ui.setMode(SearchReplaceUI.Mode.EDGES_TABLE);
    }
    DialogDescriptor dd = new DialogDescriptor(ui, getName());
    dd.setModal(true);
    dd.setOptions(new Object[] { NbBundle.getMessage(SearchReplace.class, "SearchReplace.window.close") });
    ui.setActive(true);
    DialogDisplayer.getDefault().notify(dd);
    ui.setActive(false);
}
Also used : SearchReplaceUI(org.gephi.datalab.plugin.manipulators.general.ui.SearchReplaceUI) DialogDescriptor(org.openide.DialogDescriptor) DataTablesController(org.gephi.datalab.api.datatables.DataTablesController)

Aggregations

DataTablesController (org.gephi.datalab.api.datatables.DataTablesController)1 SearchReplaceUI (org.gephi.datalab.plugin.manipulators.general.ui.SearchReplaceUI)1 DialogDescriptor (org.openide.DialogDescriptor)1