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);
}
Aggregations