Search in sources :

Example 1 with ContentType

use of org.opennms.features.topology.api.browsers.ContentType in project opennms by OpenNMS.

the class TopologyUI method updateTabVisibility.

private void updateTabVisibility() {
    for (int i = 0; i < tabSheet.getComponentCount(); i++) {
        TabSheet.Tab tab = tabSheet.getTab(i);
        if (tab.getComponent() instanceof SelectionAwareTable) {
            ContentType contentType = ((SelectionAwareTable) tab.getComponent()).getContentType();
            boolean visible = m_graphContainer.getTopologyServiceClient().contributesTo(contentType);
            tab.setVisible(visible);
        }
    }
}
Also used : ContentType(org.opennms.features.topology.api.browsers.ContentType) SelectionAwareTable(org.opennms.features.topology.api.browsers.SelectionAwareTable) TabSheet(com.vaadin.ui.TabSheet)

Aggregations

TabSheet (com.vaadin.ui.TabSheet)1 ContentType (org.opennms.features.topology.api.browsers.ContentType)1 SelectionAwareTable (org.opennms.features.topology.api.browsers.SelectionAwareTable)1