List of usage examples for com.vaadin.ui Image setSizeUndefined
@Override public void setSizeUndefined()
From source file:com.esofthead.mycollab.vaadin.ui.AttachmentPreviewWindow.java
License:Open Source License
private void initUI() { Image previewImage = new Image(null, this.previewResource); previewImage.setSizeUndefined(); this.setContent(previewImage); this.setResizable(false); }
From source file:lifetime.component.Backgrounds.java
License:Apache License
public static Image getBackground(Backgrounds background) { Image i = new Image("", background.getResource()); i.setSizeUndefined(); return i;//from www . j a v a2s .com }
From source file:org.jdal.vaadin.auth.LoginView.java
License:Apache License
@Override protected Component buildPanel() { Label greeting = new Label(getMessage("loginView.greeting")); greeting.addStyleName("jd-login-greeting"); greeting.addStyleName(Reindeer.LABEL_H2); Label applicationNameLabel = new Label(getMessage(applicationName)); applicationNameLabel.addStyleName("jd-login-appname"); applicationNameLabel.addStyleName(Reindeer.LABEL_H2); applicationNameLabel.setSizeUndefined(); loginButton.addClickListener(this); loginButton.setCaption(getMessage("loginView.loginButtonCaption")); loginButton.addStyleName("jd-login-button"); // add shortcut listener for enter key loginButton.addShortcutListener(new ShortcutListener("Sign In", KeyCode.ENTER, null) { @Override//from w ww .j av a 2 s . co m public void handleAction(Object sender, Object target) { loginButton.click(); } }); Image image = null; HorizontalLayout imageWrapper = null; if (applicationIcon != null) { image = new Image(null, applicationIcon); image.setSizeUndefined(); image.setStyleName("jd-login-icon"); imageWrapper = new HorizontalLayout(); imageWrapper.setMargin(false); imageWrapper.addComponent(image); imageWrapper.setComponentAlignment(image, Alignment.MIDDLE_CENTER); } BoxFormBuilder fb = new BoxFormBuilder(); fb.setDefaultWidth(BoxFormBuilder.SIZE_FULL); fb.row(); fb.startBox(); fb.setFixedHeight(); fb.row(false); fb.add(greeting, Alignment.TOP_LEFT); fb.add(applicationNameLabel, Alignment.TOP_RIGHT); fb.endBox(); // add application icon if (image != null) { fb.row(BoxFormBuilder.SIZE_FULL); fb.add(imageWrapper, BoxFormBuilder.SIZE_FULL, Alignment.MIDDLE_CENTER); } fb.row(); fb.startBox(); fb.row(30); fb.add(errorLabel, BoxFormBuilder.SIZE_FULL, Alignment.BOTTOM_CENTER); fb.endBox(); fb.row(); fb.startBox(); fb.setFixedHeight(); fb.row(); fb.add(username, getMessage("loginView.username"), Alignment.BOTTOM_CENTER); fb.add(password, getMessage("loginView.password"), Alignment.BOTTOM_CENTER); fb.add(loginButton, 100, Alignment.BOTTOM_CENTER); fb.endBox(); Component form = fb.getForm(); form.setWidth(this.getWidth(), Unit.PIXELS); form.setHeight(getHeight(), Unit.PIXELS); form.setStyleName("jd-login"); return form; }