Search in sources :

Example 1 with BrowserTable

use of org.cytoscape.browser.internal.view.BrowserTable in project cytoscape-impl by cytoscape.

the class ClearErrorsEdit method getBrowserTable.

public static BrowserTable getBrowserTable(final CyTable table, final CyServiceRegistrar serviceRegistrar) {
    final CySwingApplication swingAppManager = serviceRegistrar.getService(CySwingApplication.class);
    final CytoPanel cytoPanel = swingAppManager.getCytoPanel(CytoPanelName.SOUTH);
    if (cytoPanel != null) {
        final int count = cytoPanel.getCytoPanelComponentCount();
        for (int i = 0; i < count; i++) {
            final Component c = cytoPanel.getComponentAt(i);
            if (c instanceof AbstractTableBrowser) {
                final AbstractTableBrowser tableBrowser = (AbstractTableBrowser) c;
                final BrowserTable browserTable = tableBrowser.getBrowserTable(table);
                if (browserTable != null)
                    return browserTable;
            }
        }
    }
    return null;
}
Also used : CySwingApplication(org.cytoscape.application.swing.CySwingApplication) AbstractTableBrowser(org.cytoscape.browser.internal.view.AbstractTableBrowser) BrowserTable(org.cytoscape.browser.internal.view.BrowserTable) CytoPanel(org.cytoscape.application.swing.CytoPanel) Component(java.awt.Component)

Example 2 with BrowserTable

use of org.cytoscape.browser.internal.view.BrowserTable in project cytoscape-impl by cytoscape.

the class SetColumnFormatTask method getBrowserTable.

public static BrowserTable getBrowserTable(final CyTable table, final CyServiceRegistrar serviceRegistrar) {
    final CySwingApplication swingAppManager = serviceRegistrar.getService(CySwingApplication.class);
    final CytoPanel cytoPanel = swingAppManager.getCytoPanel(CytoPanelName.SOUTH);
    if (cytoPanel != null) {
        final int count = cytoPanel.getCytoPanelComponentCount();
        for (int i = 0; i < count; i++) {
            final Component c = cytoPanel.getComponentAt(i);
            if (c instanceof AbstractTableBrowser) {
                final AbstractTableBrowser tableBrowser = (AbstractTableBrowser) c;
                final BrowserTable browserTable = tableBrowser.getBrowserTable(table);
                if (browserTable != null)
                    return browserTable;
            }
        }
    }
    return null;
}
Also used : CySwingApplication(org.cytoscape.application.swing.CySwingApplication) AbstractTableBrowser(org.cytoscape.browser.internal.view.AbstractTableBrowser) BrowserTable(org.cytoscape.browser.internal.view.BrowserTable) CytoPanel(org.cytoscape.application.swing.CytoPanel) Component(java.awt.Component)

Aggregations

Component (java.awt.Component)2 CySwingApplication (org.cytoscape.application.swing.CySwingApplication)2 CytoPanel (org.cytoscape.application.swing.CytoPanel)2 AbstractTableBrowser (org.cytoscape.browser.internal.view.AbstractTableBrowser)2 BrowserTable (org.cytoscape.browser.internal.view.BrowserTable)2