Search in sources :

Example 11 with ExternalResource

use of com.vaadin.server.ExternalResource in project vaadin-samples by xpoft.

the class UserView method PostConstruct.

@PostConstruct
public void PostConstruct() {
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(new Label("@RequiresUser"));
    layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
    setContent(layout);
}
Also used : Label(com.vaadin.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout) ExternalResource(com.vaadin.server.ExternalResource) Link(com.vaadin.ui.Link) PostConstruct(javax.annotation.PostConstruct)

Example 12 with ExternalResource

use of com.vaadin.server.ExternalResource in project vaadin-samples by xpoft.

the class I18N method PostConstruct.

@PostConstruct
public void PostConstruct() throws GeneralSecurityException {
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(chooseLanguage);
    layout.addComponent(new Label(messageSource.getMessage("i18n.message1")));
    layout.addComponent(new Button(messageSource.getMessage("i18n.button1"), new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            Notification.show(messageSource.getMessage("i18n.notification1"));
        }
    }));
    Link link1 = new Link(messageSource.getMessage("i18n.link1"), new ExternalResource("http://vaadin.com/addon/springvaadinintegration"));
    link1.setTargetName("_blank");
    layout.addComponent(link1);
    layout.addComponent(new Button(messageSource.getMessage("main.go_back"), new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            Page.getCurrent().setUriFragment("!" + MainView.NAME);
        }
    }));
    setContent(layout);
}
Also used : ExternalResource(com.vaadin.server.ExternalResource) PostConstruct(javax.annotation.PostConstruct)

Example 13 with ExternalResource

use of com.vaadin.server.ExternalResource in project vaadin-samples by xpoft.

the class RoleUserView method PostConstruct.

@PostConstruct
public void PostConstruct() {
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(new Label("ROLE_USER"));
    layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
    setContent(layout);
}
Also used : Label(com.vaadin.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout) ExternalResource(com.vaadin.server.ExternalResource) Link(com.vaadin.ui.Link) PostConstruct(javax.annotation.PostConstruct)

Aggregations

ExternalResource (com.vaadin.server.ExternalResource)13 PostConstruct (javax.annotation.PostConstruct)11 Label (com.vaadin.ui.Label)9 Link (com.vaadin.ui.Link)9 VerticalLayout (com.vaadin.ui.VerticalLayout)9 HorizontalLayout (com.vaadin.ui.HorizontalLayout)3 Styles (com.vaadin.server.Page.Styles)1 BrowserFrame (com.vaadin.ui.BrowserFrame)1 Button (com.vaadin.ui.Button)1 Locale (java.util.Locale)1 PluginManagerUIMainPanel (org.opennms.features.pluginmgr.vaadin.pluginmanager.PluginManagerUIMainPanel)1