public synchronized void onUnbind(final IViewContribution viewContribution) { LOG.info("Unbinding IViewContribution {} from WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.remove(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onUnbind()", e); } } } }
public void setWidgetManager(WidgetManager widgetManager) { m_widgetManager = widgetManager; m_widgetManager.addUpdateListener(this); }
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); // Set expand ratio so that all extra space is allocated to this vertical component m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); m_mapLayout = createMapLayout(); m_mapLayout.setSizeFull(); m_menuBar = new TopologyMenuBar(); m_contextMenu = new TopologyContextMenu(); updateMenu(); if(m_widgetManager.widgetCount() != 0) { updateWidgetView(m_widgetManager); }else { m_layout.addComponent(m_mapLayout); } // Set expand ratio so that extra space is not allocated to this vertical component if (m_showHeader) { m_rootLayout.addComponent(m_menuBar, 1); } else { m_rootLayout.addComponent(m_menuBar, 0); } }
@Override protected void init(final VaadinRequest request) { request.getService().addSessionDestroyListener((SessionDestroyListener) event -> m_widgetManager.removeUpdateListener(TopologyUI.this));
tabSheet.setSizeFull(); for(IViewContribution viewContrib : manager.getWidgets()) {
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); // Set expand ratio so that all extra space is allocated to this vertical component m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); m_mapLayout = createMapLayout(); m_mapLayout.setSizeFull(); m_menuBar = new TopologyMenuBar(); m_contextMenu = new TopologyContextMenu(getUI()); updateMenu(); if(m_widgetManager.widgetCount() != 0) { updateWidgetView(m_widgetManager); }else { m_layout.addComponent(m_mapLayout); } // Set expand ratio so that extra space is not allocated to this vertical component if (m_showHeader) { m_rootLayout.addComponent(m_menuBar, 1); } else { m_rootLayout.addComponent(m_menuBar, 0); } }
@Override protected void init(final VaadinRequest request) { request.getService().addSessionDestroyListener((SessionDestroyListener) event -> m_widgetManager.removeUpdateListener(TopologyUI.this));
tabSheet.setSizeFull(); for(IViewContribution viewContrib : manager.getWidgets()) {
public synchronized void onUnbind(final IViewContribution viewContribution) { LOG.info("Unbinding IViewContribution {} from WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.remove(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onUnbind()", e); } } } }
synchronized (m_layout) { m_layout.removeAllComponents(); if(widgetManager.widgetCount() == 0) { m_layout.addComponent(m_mapLayout); } else {
public void setWidgetManager(WidgetManager widgetManager) { m_widgetManager = widgetManager; m_widgetManager.addUpdateListener(this); }
public synchronized void onBind(IViewContribution viewContribution) { LOG.info("Binding IViewContribution {} to WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.add(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onBind()", e); } } }
synchronized (m_layout) { m_layout.removeAllComponents(); if(widgetManager.widgetCount() == 0) { m_layout.addComponent(m_mapLayout); } else {
public synchronized void onBind(IViewContribution viewContribution) { LOG.info("Binding IViewContribution {} to WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.add(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onBind()", e); } } }
public synchronized void onBind(IViewContribution viewContribution) { LOG.info("Binding IViewContribution {} to WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.add(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onBind()", e); } } }
public synchronized void onUnbind(final IViewContribution viewContribution) { LOG.info("Unbinding IViewContribution {} from WidgetManager {}", viewContribution, this); synchronized (m_viewContributors) { try { m_viewContributors.remove(viewContribution); updateWidgetListeners(); } catch (final Throwable e) { LOG.warn("Exception during onUnbind()", e); } } } }