/** * Initializes the upper left component. Does not show the mode switch. */ private void initUpperLeftComponent() { m_upperLeftComponent = new HorizontalLayout(); m_upperLeftComponent.setHeight("100%"); m_upperLeftComponent.setSpacing(true); m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); m_upperLeftComponent.addComponent(m_languageSwitch); m_upperLeftComponent.addComponent(m_filePathLabel); }
hourLayout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); Label colonLabel = new Label("<b>:</b>"); colonLabel.setContentMode(ContentMode.HTML);
@Inject public ContentViews(WorkbenchContext workbenchContext, ContentViewsDefinition<T> definition) { this.workbenchContext = workbenchContext; this.definition = definition; setSizeFull(); setSpacing(false); setMargin(false); addStyleName("content-views"); toolBar = new HorizontalLayout(); toolBar.addStyleName("toolbar"); toolBar.setWidth(100, Unit.PERCENTAGE); toolBar.setSpacing(true); toolBar.setDefaultComponentAlignment(Alignment.BOTTOM_LEFT); final CssLayout viewModes = new CssLayout(); viewModes.addStyleName("view-modes"); toolBar.addComponent(viewModes); toolBar.setComponentAlignment(viewModes, Alignment.BOTTOM_RIGHT); addComponents(toolBar); definition.getViews().forEach((id, presenterDefinition) -> { final Button contentViewIcon = createContentViewIcon(id, presenterDefinition.getIcon()); contentViewToggleControls.put(id, contentViewIcon); viewModes.addComponent(contentViewIcon); }); workbenchContext.displayedContentViewId().observe(viewId -> { this.contentViewToggleControls.values().forEach(control -> control.removeStyleName("active")); viewId.ifPresent(this::switchView); }); }
horizontalLayout1.setDefaultComponentAlignment(Alignment.TOP_RIGHT); HorizontalLayout horizontalLayout2= new HorizontalLayout(); horizontalLayout1.addComponent(horizontalLayout2);
statusBar.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); statusBar.addComponent(statusLabel); statusBar.setWidth("100%");
horizontalLayout1.setDefaultComponentAlignment(Alignment.TOP_RIGHT); HorizontalLayout horizontalLayout2= new HorizontalLayout(); horizontalLayout1.addComponent(horizontalLayout2);
top.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); top.addStyleName(ValoTheme.MENU_TITLE); Label title = new Label("EHCACHE MONITOR");
leftButtonGroup.addComponent(collapseButton); leftButtonGroup.addComponent(expandButton); leftButtonGroup.setDefaultComponentAlignment(Alignment.TOP_LEFT); rightButtonGroup.addComponent(refreshButton); rightButtonGroup.addComponent(reloadButton); rightButtonGroup.setDefaultComponentAlignment(Alignment.TOP_RIGHT);