List of usage examples for com.vaadin.ui Flash setHeight
@Override public void setHeight(String height)
From source file:edu.nps.moves.mmowgli.modules.cards.HowToPlayCardsPopup.java
License:Open Source License
@HibernateSessionThreadLocalConstructor public HowToPlayCardsPopup() { super(null);//from www .j a v a 2s . c om super.initGui(); setModal(true); setListener(this); setTitleString("How to Play"); Media m = getMedia(); Component comp = new Label("Not found"); if (m.getType() == Media.MediaType.VIDEO) { /* * Quicktime qt = new Quicktime(null,res); qt.setWidth("94%"); qt.setHeight("340px"); //"100%"); qt.setScale(Scale.Aspect); qt.setAutoplay(true); comp = * qt; */ } else if (m.getType() == Media.MediaType.YOUTUBE) { try { Flash ytp = new Flash(); ytp.setSource(new ExternalResource("https://www.youtube.com/v/" + m.getUrl())); ytp.setParameter("allowFullScreen", "true"); ytp.setParameter("showRelated", "false"); ytp.setWidth(CALLTOACTION_VIDEO_W); ytp.setHeight(CALLTOACTION_VIDEO_H); comp = ytp; } catch (Exception ex) { System.err.println("Exception instantiating YouTubPlayer: " + ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage()); } } contentVLayout.addComponent(comp); contentVLayout.setComponentAlignment(comp, Alignment.MIDDLE_CENTER); }