Search in sources :

Example 11 with Link

use of com.vaadin.ui.Link in project vaadin-samples by xpoft.

the class RoleAdminView method PostConstruct.

@PostConstruct
public void PostConstruct() {
    LoggerFactory.getLogger(this.getClass()).debug("POST");
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(new Label("ROLE_ADMIN"));
    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 Link

use of com.vaadin.ui.Link in project vaadin-samples by xpoft.

the class AuthenticatedView method PostConstruct.

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

use of com.vaadin.ui.Link 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("@RequiresRoles(\"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)

Example 14 with Link

use of com.vaadin.ui.Link in project vaadin-samples by xpoft.

the class RoleAdminView method PostConstruct.

@PostConstruct
public void PostConstruct() {
    setSizeFull();
    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(new Label("@RequiresRoles(\"admin\")"));
    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 15 with Link

use of com.vaadin.ui.Link in project Activiti by Activiti.

the class ProfilePanel method initContactSection.

protected void initContactSection() {
    Label header = createProfileHeader(infoPanelLayout, i18nManager.getMessage(Messages.PROFILE_CONTACT));
    header.addStyleName(ExplorerLayout.STYLE_H3);
    header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    infoPanelLayout.addComponent(header);
    GridLayout contactLayout = createInfoSectionLayout(2, 4);
    // Email
    if (!editable && isDefined(user.getEmail())) {
        addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_EMAIL), user.getEmail());
    } else if (editable) {
        emailField = new TextField();
        addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_EMAIL), emailField, user.getEmail());
    }
    // Phone
    if (!editable && isDefined(phone)) {
        addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phone);
    } else if (editable) {
        phoneField = new TextField();
        addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phoneField, phone);
    }
    // Twitter
    if (!editable && isDefined(twitterName)) {
        Link twitterLink = new Link(twitterName, new ExternalResource("http://www.twitter.com/" + twitterName));
        addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterLink);
    } else if (editable) {
        twitterField = new TextField();
        addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterField, twitterName);
    }
    // Skype
    if (!editable && isDefined(skypeId)) {
        // The skype entry shows the name + skype icon, laid out in a small grid
        GridLayout skypeLayout = new GridLayout(2, 1);
        skypeLayout.setSpacing(true);
        skypeLayout.setSizeUndefined();
        Label skypeIdLabel = new Label(skypeId);
        skypeIdLabel.setSizeUndefined();
        skypeLayout.addComponent(skypeIdLabel);
        addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_SKYPE), skypeLayout);
    } else if (editable) {
        skypeField = new TextField();
        addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_SKYPE), skypeField, skypeId);
    }
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField) ExternalResource(com.vaadin.terminal.ExternalResource) Link(com.vaadin.ui.Link)

Aggregations

Link (com.vaadin.ui.Link)36 ExternalResource (com.vaadin.server.ExternalResource)24 VerticalLayout (com.vaadin.ui.VerticalLayout)21 Label (com.vaadin.ui.Label)18 HorizontalLayout (com.vaadin.ui.HorizontalLayout)8 PostConstruct (javax.annotation.PostConstruct)7 ExternalResource (com.vaadin.terminal.ExternalResource)5 Button (com.vaadin.ui.Button)4 StreamResource (com.vaadin.terminal.StreamResource)3 TextField (com.vaadin.ui.TextField)3 ComboBox (com.vaadin.ui.ComboBox)2 Embedded (com.vaadin.ui.Embedded)2 GridLayout (com.vaadin.ui.GridLayout)2 HashMap (java.util.HashMap)2 Secured (org.springframework.security.access.annotation.Secured)2 AnnisUser (annis.libgui.AnnisUser)1 InstanceConfig (annis.libgui.InstanceConfig)1 LoginDataLostException (annis.libgui.LoginDataLostException)1 VisualizerInput (annis.libgui.visualizers.VisualizerInput)1 VisualizerPlugin (annis.libgui.visualizers.VisualizerPlugin)1