List of usage examples for com.vaadin.server ExternalResource ExternalResource
public ExternalResource(String sourceURL)
From source file:com.mycompany.vaadinviews.MyVerticalLayout.java
public MyVerticalLayout() { Link lnk = new Link("FieldBinderWithBeanValidation", new ExternalResource("#!" + FieldBinderWithBeanValidation.NAME)); addComponent(lnk);//from w w w . j a v a 2s.c om }
From source file:com.nfl.dm.clubsites.cms.articles.subapp.articleeditor.layouteditor.LayoutEditorViewImpl.java
License:Open Source License
@Override public void setArticleUrl(String url) { layout.removeAllComponents();/* ww w . j a va2s . c o m*/ BrowserFrame editor = new BrowserFrame(null, new ExternalResource(url)); editor.setWidth("650px"); editor.setHeight("100%"); layout.addComponent(editor); }
From source file:com.nfl.poc.editor.app.NFLEditorViewImpl.java
License:Open Source License
public NFLEditorViewImpl() { root.setSizeFull();/*from ww w. j av a 2 s . c om*/ // Vaadin Iframe component BrowserFrame editor = new BrowserFrame(null, new ExternalResource("nfl-editor")); editor.setSizeFull(); root.addComponent(editor); }
From source file:com.ocs.dynamo.ui.component.URLField.java
License:Apache License
/** * Updates the field value - renders a clickable URL if the field value is not empty * /* w ww. java2s. com*/ * @param value */ private void updateLink(String value) { if (bar != null) { bar.removeAllComponents(); if (!StringUtils.isEmpty(value)) { String temp = StringUtil.prependProtocol(value); link = new Link(temp, new ExternalResource(temp), "_blank", 0, 0, BorderStyle.DEFAULT); bar.addComponent(link); } else { link = null; } } }
From source file:com.peergreen.example.webconsole.extensions.ConfirmDialogExtension.java
License:Open Source License
public ConfirmDialogExtension() { setSizeFull();/* w w w . j a v a2 s. co m*/ setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(ConfirmDialogExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); Label title = new Label("Drag and drop components from a panel to another"); title.addStyleName("h1"); addComponent(title); setComponentAlignment(title, Alignment.MIDDLE_CENTER); HorizontalLayout row = new HorizontalLayout(); row.setSizeFull(); row.setSpacing(true); row.setMargin(true); VerticalLayout leftPanel = new VerticalLayout(); leftPanel.setSpacing(true); leftPanel.addStyleName("dashed-area"); leftPanel.addComponent(getDraggableComponent(new Label("Label"))); leftPanel.addComponent(getDraggableComponent(new Button("Button"))); DragAndDropWrapper leftPanelWrapper = new DragAndDropWrapper(leftPanel); row.addComponent(leftPanelWrapper); row.setComponentAlignment(leftPanelWrapper, Alignment.TOP_LEFT); VerticalLayout rightPanel = new VerticalLayout(); rightPanel.setSpacing(true); rightPanel.addStyleName("dashed-area"); DragAndDropWrapper rightPanelWrapper = new DragAndDropWrapper(rightPanel); row.addComponent(rightPanelWrapper); row.setComponentAlignment(rightPanelWrapper, Alignment.TOP_RIGHT); leftPanelWrapper.setDropHandler(new ConfirmDialogExtensionDropHandler(rightPanel, leftPanel)); rightPanelWrapper.setDropHandler(new ConfirmDialogExtensionDropHandler(leftPanel, rightPanel)); addComponent(row); setExpandRatio(row, 1.5f); }
From source file:com.peergreen.example.webconsole.extensions.CssContributionExtension.java
License:Open Source License
public CssContributionExtension() { setSizeFull();//from w w w .j ava2s .c o m setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(CssContributionExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); }
From source file:com.peergreen.example.webconsole.extensions.DefaultWindowExtension.java
License:Open Source License
public DefaultWindowExtension() { setSizeFull();/*w w w. ja v a 2 s.c o m*/ setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(DefaultWindowExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); Button simpleButton = new Button("Click to open a Window"); simpleButton.setWidth("400px"); simpleButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { final UI ui = clickEvent.getConnector().getUI(); String caption = "Default window"; Label content = new Label("This is a simple window"); Button close = new Button("Close"); close.addStyleName("wide"); close.addStyleName("default"); final DefaultWindow window = new DefaultWindow(caption, content, close); window.center(); ui.addWindow(window); close.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { window.close(); } }); } }); addComponent(simpleButton); setExpandRatio(simpleButton, 1.5f); }
From source file:com.peergreen.example.webconsole.extensions.NavigatorExtension.java
License:Open Source License
public NavigatorExtension() { setSizeFull();//from www .j a v a2 s . c om setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(NavigatorExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); }
From source file:com.peergreen.example.webconsole.extensions.NotifierExtension.java
License:Open Source License
public NotifierExtension() { setSizeFull();/*from w ww. j a va 2 s . c o m*/ setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(NotifierExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); }
From source file:com.peergreen.example.webconsole.extensions.SimpleExtension.java
License:Open Source License
public SimpleExtension() { setSizeFull();//from w ww .j a v a2 s .co m setSpacing(true); setMargin(true); Link showCodeSource = new Link("Show code source", new ExternalResource(GitHubClassURL.getURL(SimpleExtension.class))); showCodeSource.setTargetName("_blank"); addComponent(showCodeSource); setComponentAlignment(showCodeSource, Alignment.TOP_RIGHT); }