List of usage examples for com.vaadin.ui Embedded TYPE_IMAGE
int TYPE_IMAGE
To view the source code for com.vaadin.ui Embedded TYPE_IMAGE.
Click Source Link
From source file:org.processbase.ui.servlet.LoginPanel.java
License:Open Source License
private void createLogo() { ThemeResource themeResource = new ThemeResource("icons/processbase.png"); logo = new Embedded("", themeResource); logo.setType(Embedded.TYPE_IMAGE); }
From source file:org.processbase.ui.servlet.MainWindow.java
License:Open Source License
Layout getHeader() { HorizontalLayout header = new HorizontalLayout(); header.setWidth("100%"); header.setMargin(false);/*from w w w. j a v a 2s. c o m*/ header.setSpacing(true); ThemeResource themeResource = new ThemeResource("icons/processbase.png"); Embedded logo = new Embedded(); logo.setSource(themeResource); logo.setType(Embedded.TYPE_IMAGE); header.addComponent(logo); header.setExpandRatio(logo, 1.0f); Label helloUser = new Label("Welcome, " + user.getFirstName() + " " + user.getLastName()); // helloUser.setStyleName(Runo.LABEL_H2); header.addComponent(helloUser); header.setComponentAlignment(helloUser, Alignment.MIDDLE_RIGHT); header.setExpandRatio(helloUser, 1.0f); Button profile = new Button(((PbApplication) getApplication()).getPbMessages().getString("btnProfile"), new Button.ClickListener() { public void buttonClick(ClickEvent event) { openProfileWindow(); } }); profile.setStyleName(Runo.BUTTON_LINK); header.addComponent(profile); header.setComponentAlignment(profile, Alignment.MIDDLE_RIGHT); Button logout = new Button(((PbApplication) getApplication()).getPbMessages().getString("btnLogout"), new Button.ClickListener() { public void buttonClick(ClickEvent event) { openLogoutWindow(); } }); logout.setStyleName(Runo.BUTTON_LINK); header.addComponent(logout); header.setComponentAlignment(logout, Alignment.MIDDLE_RIGHT); return header; }