Search in sources :

Example 41 with ExternalResource

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

the class GuestView method PostConstruct.

@PostConstruct
public void PostConstruct() {
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(new Label("@RequiresGuest"));
    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 42 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 43 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)

Aggregations

ExternalResource (com.vaadin.server.ExternalResource)43 Link (com.vaadin.ui.Link)24 VerticalLayout (com.vaadin.ui.VerticalLayout)18 Label (com.vaadin.ui.Label)13 PostConstruct (javax.annotation.PostConstruct)11 Button (com.vaadin.ui.Button)8 HorizontalLayout (com.vaadin.ui.HorizontalLayout)7 Resource (com.vaadin.server.Resource)5 Point (org.vaadin.addon.leaflet.shared.Point)5 StreamResource (com.vaadin.server.StreamResource)4 BrowserFrame (com.vaadin.ui.BrowserFrame)4 ClickEvent (com.vaadin.ui.Button.ClickEvent)4 LMap (org.vaadin.addon.leaflet.LMap)3 Bounds (org.vaadin.addon.leaflet.shared.Bounds)3 ReportSave (au.com.vaadinutils.jasper.scheduler.entities.ReportSave)2 ReportSaveParameter (au.com.vaadinutils.jasper.scheduler.entities.ReportSaveParameter)2 ClickEventLogged (au.com.vaadinutils.listener.ClickEventLogged)2 ComboBox (com.vaadin.ui.ComboBox)2 TextField (com.vaadin.ui.TextField)2 HashMap (java.util.HashMap)2