Search in sources :

Example 1 with SetColumnFormatTaskFactory

use of org.cytoscape.browser.internal.task.SetColumnFormatTaskFactory in project cytoscape-impl by cytoscape.

the class CyActivator method start.

@Override
public void start(BundleContext bc) {
    CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
    PopupMenuHelper popupMenuHelper = new PopupMenuHelper(serviceRegistrar);
    AbstractTableBrowser nodeTableBrowser = new DefaultTableBrowser("Node Table", CyNode.class, serviceRegistrar, popupMenuHelper);
    AbstractTableBrowser edgeTableBrowser = new DefaultTableBrowser("Edge Table", CyEdge.class, serviceRegistrar, popupMenuHelper);
    AbstractTableBrowser networkTableBrowser = new DefaultTableBrowser("Network Table", CyNetwork.class, serviceRegistrar, popupMenuHelper);
    AbstractTableBrowser globalTableBrowser = new GlobalTableBrowser("Unassigned Tables", serviceRegistrar, popupMenuHelper);
    registerAllServices(bc, nodeTableBrowser, new Properties());
    registerAllServices(bc, edgeTableBrowser, new Properties());
    registerAllServices(bc, networkTableBrowser, new Properties());
    final Properties globalTableProp = new Properties();
    registerService(bc, globalTableBrowser, ActionListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, SessionLoadedListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, SessionAboutToBeSavedListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, TableAboutToBeDeletedListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, TableAddedListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, TablePrivacyChangedListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, RowsSetListener.class, globalTableProp);
    registerService(bc, globalTableBrowser, RowsDeletedListener.class, globalTableProp);
    registerServiceListener(bc, popupMenuHelper::addTableColumnTaskFactory, popupMenuHelper::removeTableColumnTaskFactory, TableColumnTaskFactory.class);
    registerServiceListener(bc, popupMenuHelper::addTableCellTaskFactory, popupMenuHelper::removeTableCellTaskFactory, TableCellTaskFactory.class);
    {
        ClearAllErrorsTaskFactory taskFactory = new ClearAllErrorsTaskFactory(serviceRegistrar);
        Properties props = new Properties();
        props.setProperty(TITLE, "Clear all errors");
        registerService(bc, taskFactory, TableColumnTaskFactory.class, props);
    }
    {
        SetColumnFormatTaskFactory taskFactory = new SetColumnFormatTaskFactory(serviceRegistrar);
        Properties props = new Properties();
        props.setProperty(TITLE, "Format column...");
        registerService(bc, taskFactory, TableColumnTaskFactory.class, props);
    }
}
Also used : PopupMenuHelper(org.cytoscape.browser.internal.view.PopupMenuHelper) GlobalTableBrowser(org.cytoscape.browser.internal.view.GlobalTableBrowser) AbstractTableBrowser(org.cytoscape.browser.internal.view.AbstractTableBrowser) SetColumnFormatTaskFactory(org.cytoscape.browser.internal.task.SetColumnFormatTaskFactory) TableColumnTaskFactory(org.cytoscape.task.TableColumnTaskFactory) ClearAllErrorsTaskFactory(org.cytoscape.browser.internal.task.ClearAllErrorsTaskFactory) DefaultTableBrowser(org.cytoscape.browser.internal.view.DefaultTableBrowser) Properties(java.util.Properties) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar)

Aggregations

Properties (java.util.Properties)1 ClearAllErrorsTaskFactory (org.cytoscape.browser.internal.task.ClearAllErrorsTaskFactory)1 SetColumnFormatTaskFactory (org.cytoscape.browser.internal.task.SetColumnFormatTaskFactory)1 AbstractTableBrowser (org.cytoscape.browser.internal.view.AbstractTableBrowser)1 DefaultTableBrowser (org.cytoscape.browser.internal.view.DefaultTableBrowser)1 GlobalTableBrowser (org.cytoscape.browser.internal.view.GlobalTableBrowser)1 PopupMenuHelper (org.cytoscape.browser.internal.view.PopupMenuHelper)1 CyServiceRegistrar (org.cytoscape.service.util.CyServiceRegistrar)1 TableColumnTaskFactory (org.cytoscape.task.TableColumnTaskFactory)1