@Override public DashletComponent getWallboardComponent() { if (m_dashletComponent == null) { m_dashletComponent = new AbstractDashletComponent() { private VerticalLayout m_verticalLayout = new VerticalLayout(); { m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull(); } @Override public void refresh() { m_verticalLayout.removeAllComponents(); m_browserFrame = new BrowserFrame(null, new ExternalResource("/opennms/rtc/fullscreen-categories-box.jsp")); m_browserFrame.setSizeFull(); m_verticalLayout.addComponent(m_browserFrame); } @Override public Component getComponent() { return m_verticalLayout; } }; } return m_dashletComponent; }
@Override public DashletComponent getWallboardComponent(final UI ui) { if (m_dashletComponent == null) { m_dashletComponent = new AbstractDashletComponent() { private VerticalLayout m_verticalLayout = new VerticalLayout(); { m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull(); } @Override public void refresh() { m_verticalLayout.removeAllComponents(); m_browserFrame = new BrowserFrame(null, new ExternalResource("/opennms/rtc/fullscreen-categories-box.jsp")); m_browserFrame.setSizeFull(); m_verticalLayout.addComponent(m_browserFrame); } @Override public Component getComponent() { return m_verticalLayout; } }; } return m_dashletComponent; }
@Override public DashletComponent getWallboardComponent(final UI ui) { if (m_dashletComponent == null) { m_dashletComponent = new AbstractDashletComponent() { private VerticalLayout m_verticalLayout = new VerticalLayout(); { m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull(); } @Override public void refresh() { m_verticalLayout.removeAllComponents(); String searchString = ""; if (getDashletSpec().getParameters().containsKey("search")) { searchString = getDashletSpec().getParameters().get("search"); } BrowserFrame browserFrame = new BrowserFrame(null, new ExternalResource("/opennms/node-maps#search/" + searchString)); browserFrame.setSizeFull(); m_verticalLayout.addComponent(browserFrame); } @Override public Component getComponent() { return m_verticalLayout; } }; } return m_dashletComponent; }
@Override public DashletComponent getWallboardComponent() { if (m_dashletComponent == null) { m_dashletComponent = new AbstractDashletComponent() { private VerticalLayout m_verticalLayout = new VerticalLayout(); { m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull(); } @Override public void refresh() { m_verticalLayout.removeAllComponents(); String searchString = ""; if (getDashletSpec().getParameters().containsKey("search")) { searchString = getDashletSpec().getParameters().get("search"); } BrowserFrame browserFrame = new BrowserFrame(null, new ExternalResource("/opennms/node-maps#search/" + searchString)); browserFrame.setSizeFull(); m_verticalLayout.addComponent(browserFrame); } @Override public Component getComponent() { return m_verticalLayout; } }; } return m_dashletComponent; }
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
m_verticalLayout.setCaption(getName()); m_verticalLayout.setSizeFull();
TabSheet tabsheet= new TabSheet(); // Create an example of tab VerticalLayout tabExample= new VerticalLayout(); tabExample.addComponent(new Embedded(null, new ThemeResource("anyImage.jpg"))); tabExample.setCaption("Example"); tabsheet.addTab(tabExample).setIcon( new ThemeResource("anyIcon.png")); Iterator<Component> componentIterator = tabsheet.getComponentIterator(); while (componentIterator.hasNext()) { Component c = (Component) componentIterator.next(); Tab tab = tabsheet.getTab(c); System.out.println("test: " + tab.getCaption()); }
@Override public final Component create(Map<String, Object> context) { VerticalLayout vl = new VerticalLayout(); vl.setCaption(m_caption); vl.setSpacing(false); vl.setSizeFull(); OBJ obj = getObjectFromContext(context); if (obj == null) { return null; } vl.addComponent(create(obj)); return vl; }
m_verticalLayout.setCaption(getName()); m_verticalLayout.setWidth("100%");
m_verticalLayout.setCaption(getName()); m_verticalLayout.setWidth("100%"); injectWallboardStyles();
public Component create(Map<String, Object> context) { final RepositoryObject sgo = getRepositoryObjectFromContext(context); VerticalLayout result = new VerticalLayout(); result.setCaption("Tag Editor"); final Table table = new Table(); table.setWidth("100%");
m_verticalLayout.setCaption(getName()); m_verticalLayout.setWidth("100%"); injectDashboardStyles();
/** * {@inheritDoc} */ public Component create(Map<String, Object> context) { final RepositoryObject sgo = getRepositoryObjectFromContext(context); Component editor; if (sgo instanceof StatefulTargetObject) { StatefulTargetObject statefulTarget = (StatefulTargetObject) sgo; if (statefulTarget.isRegistered()) { editor = createTagEditor(sgo); } else { editor = new Label("This target is not yet registered, so you cannot add tags."); } } else { editor = createTagEditor(sgo); } VerticalLayout result = new VerticalLayout(); result.setCaption("Tag Editor"); result.addComponent(editor); result.setComponentAlignment(editor, Alignment.MIDDLE_CENTER); return result; }
/** * {@inheritDoc} */ public Component create(Map<String, Object> context) { RepositoryObject object = getRepositoryObjectFromContext(context); if (object instanceof StatefulTargetObject && !((StatefulTargetObject) object).isRegistered()) { VerticalLayout result = new VerticalLayout(); result.setCaption(CAPTION); result.addComponent(new Label("This target is not yet registered, so it has no log.")); return result; } Table table = new Table(); table.setWidth(FILL_AREA); table.setHeight(FILL_AREA); table.setCaption(CAPTION); table.addContainerProperty(COL_TIME, Date.class, null); table.addContainerProperty(COL_TYPE, String.class, null); table.addContainerProperty(COL_PROPERTIES, TextArea.class, null); table.setColumnExpandRatio(COL_PROPERTIES, 1); try { fillTable(object, table); } catch (IOException ex) { m_logService.log(LogService.LOG_WARNING, "Log viewer failed!", ex); } return table; }
private Component getSimpleFilterTab() { simpleFilterTab = new VerticalLayout(); targetTagTableLayout = new VerticalLayout(); targetTagTableLayout.setSizeFull(); if (menu != null) { targetTagTableLayout.addComponent(menu); targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); } targetTagTableLayout.addComponent(filterByButtons); targetTagTableLayout.setComponentAlignment(filterByButtons, Alignment.MIDDLE_CENTER); targetTagTableLayout.setId(UIComponentIdProvider.TARGET_TAG_DROP_AREA_ID); targetTagTableLayout.setExpandRatio(filterByButtons, 1.0F); simpleFilterTab.setCaption(i18n.getMessage("caption.filter.simple")); simpleFilterTab.addComponent(targetTagTableLayout); simpleFilterTab.setExpandRatio(targetTagTableLayout, 1.0F); simpleFilterTab.addComponent(filterByStatusFooter); simpleFilterTab.setComponentAlignment(filterByStatusFooter, Alignment.MIDDLE_CENTER); simpleFilterTab.setSizeFull(); simpleFilterTab.addStyleName(SPUIStyleDefinitions.SIMPLE_FILTER_HEADER); return simpleFilterTab; }
private Component getSimpleFilterTab() { simpleFilterTab = new VerticalLayout(); targetTagTableLayout = new VerticalLayout(); targetTagTableLayout.setSizeFull(); if (menu != null) { targetTagTableLayout.addComponent(menu); targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); } targetTagTableLayout.addComponent(filterByButtons); targetTagTableLayout.setComponentAlignment(filterByButtons, Alignment.MIDDLE_CENTER); targetTagTableLayout.setId(UIComponentIdProvider.TARGET_TAG_DROP_AREA_ID); targetTagTableLayout.setExpandRatio(filterByButtons, 1.0F); simpleFilterTab.setCaption(i18n.getMessage("caption.filter.simple")); simpleFilterTab.addComponent(targetTagTableLayout); simpleFilterTab.setExpandRatio(targetTagTableLayout, 1.0F); simpleFilterTab.addComponent(filterByStatusFooter); simpleFilterTab.setComponentAlignment(filterByStatusFooter, Alignment.MIDDLE_CENTER); simpleFilterTab.setSizeFull(); simpleFilterTab.addStyleName(SPUIStyleDefinitions.SIMPLE_FILTER_HEADER); return simpleFilterTab; }