Java Code Examples for com.vaadin.ui.CssLayout#setStyleName()
The following examples show how to use
com.vaadin.ui.CssLayout#setStyleName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CubaTokenList.java From cuba with Apache License 2.0 | 6 votes |
public CubaTokenList(WebTokenList<T> owner) { this.owner = owner; composition = new CssLayout(); composition.setWidthUndefined(); composition.setStyleName(TOKENLIST_COMPOSITION_STYLENAME); tokenContainerWrapper = new CssLayout(); tokenContainerWrapper.setStyleName(TOKENLIST_WRAPPER_STYLENAME); tokenContainer = new CubaScrollBoxLayout(); tokenContainer.setStyleName(TOKENLIST_SCROLLBOX_STYLENAME); tokenContainer.setWidthUndefined(); tokenContainer.setMargin(new MarginInfo(true, false, false, false)); tokenContainerWrapper.addComponent(tokenContainer); composition.addComponent(tokenContainerWrapper); setPrimaryStyleName(TOKENLIST_STYLENAME); // do not trigger overridden method super.setWidth(-1, Unit.PIXELS); }
Example 2
Source File: GenericChartWrapper.java From mycollab with GNU Affero General Public License v3.0 | 6 votes |
final protected void displayChart() { removeAllComponents(); final JFreeChart chart = createChart(); final JFreeChartWrapper chartWrapper = new JFreeChartWrapper(chart); final CssLayout borderWrap = new CssLayout(); borderWrap.addComponent(chartWrapper); borderWrap.setStyleName("chart-wrapper"); borderWrap.setHeight(height + "px"); borderWrap.setWidth(width + "px"); chartWrapper.setHeight(height + "px"); chartWrapper.setWidth(width + "px"); chartWrapper.setGraphHeight(height); chartWrapper.setGraphWidth(width); this.addComponent(borderWrap); final Component legendBox = createLegendBox(); if (legendBox != null) { this.addComponent(legendBox); } }
Example 3
Source File: ProjectSubscribersComp.java From mycollab with GNU Affero General Public License v3.0 | 5 votes |
@Override protected Component initContent() { ProjectMemberService projectMemberService = AppContextUtil.getSpringBean(ProjectMemberService.class); List<SimpleUser> members = projectMemberService.getActiveUsersInProject(projectId, AppUI.getAccountId()); CssLayout container = new CssLayout(); container.setStyleName("followers-container"); final CheckBox selectAllCheckbox = new CheckBox("All", defaultSelectAll); selectAllCheckbox.addValueChangeListener(valueChangeEvent -> { boolean val = selectAllCheckbox.getValue(); for (FollowerCheckbox followerCheckbox : memberSelections) { followerCheckbox.setValue(val); } }); container.addComponent(selectAllCheckbox); for (SimpleUser user : members) { final FollowerCheckbox memberCheckbox = new FollowerCheckbox(user); memberCheckbox.addValueChangeListener(valueChangeEvent -> { if (!memberCheckbox.getValue()) { selectAllCheckbox.setValue(false); } }); if (defaultSelectAll || selectedUsers.contains(user.getUsername())) { memberCheckbox.setValue(true); } memberSelections.add(memberCheckbox); container.addComponent(memberCheckbox); } return container; }
Example 4
Source File: AbstractHawkbitLoginUI.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
private static Component buildHeader() { final CssLayout cssLayout = new CssLayout(); cssLayout.setStyleName("view-header"); return cssLayout; }
Example 5
Source File: AbstractHawkbitUI.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
private Component buildHeader() { final CssLayout cssLayout = new CssLayout(); cssLayout.setStyleName("view-header"); return cssLayout; }