Example usage for com.vaadin.ui Link setId

List of usage examples for com.vaadin.ui Link setId

Introduction

In this page you can find the example usage for com.vaadin.ui Link setId.

Prototype

@Override
    public void setId(String id) 

Source Link

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createAdminAgentOperationViewPageLink() {
    final Link pageLink = new Link(ADMIN_AGENT_OPERATIONS_LINK_TEXT,
            new ExternalResource(LINK_SEPARATOR + AdminViews.ADMIN_AGENT_OPERATIONVIEW_NAME));
    pageLink.setId(ViewAction.VISIT_ADMIN_AGENT_OPERATION_VIEW.name());
    pageLink.setIcon(FontAwesome.USER_SECRET);
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link addCommitteePageLink(final ViewRiksdagenCommittee data) {
    final Link pageLink = new Link(COMMITTEE + data.getEmbeddedId().getDetail(), new ExternalResource(
            PAGE_PREFIX + UserViews.COMMITTEE_VIEW_NAME + PAGE_SEPARATOR + data.getEmbeddedId().getOrgCode()));
    pageLink.setId(ViewAction.VISIT_COMMITTEE_VIEW.name() + PAGE_SEPARATOR + data.getEmbeddedId().getOrgCode());
    pageLink.setIcon(FontAwesome.GROUP);
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link addMinistryPageLink(final ViewRiksdagenMinistry data) {
    final Link pageLink = new Link(MINISTRY + data.getNameId(), new ExternalResource(
            PAGE_PREFIX + UserViews.MINISTRY_VIEW_NAME + PAGE_SEPARATOR + data.getNameId()));
    pageLink.setId(ViewAction.VISIT_MINISTRY_VIEW.name() + PAGE_SEPARATOR + data.getNameId());
    pageLink.setIcon(FontAwesome.GROUP);
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link addPartyPageLink(final ViewRiksdagenParty data) {
    final Link pageLink = new Link(PARTY + data.getPartyName(),
            new ExternalResource(PAGE_PREFIX + UserViews.PARTY_VIEW_NAME + PAGE_SEPARATOR + data.getPartyId()));
    pageLink.setId(ViewAction.VISIT_PARTY_VIEW.name() + PAGE_SEPARATOR + data.getPartyId());
    pageLink.setIcon(FontAwesome.GROUP);
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createPoliticianPageLink(final PersonData personData) {
    final Link pageLink = new Link(POLITICIAN + personData.getFirstName() + ' ' + personData.getLastName(),
            new ExternalResource(
                    PAGE_PREFIX + UserViews.POLITICIAN_VIEW_NAME + PAGE_SEPARATOR + personData.getId()));
    pageLink.setId(ViewAction.VISIT_POLITICIAN_VIEW.name() + PAGE_SEPARATOR + personData.getId());
    pageLink.setIcon(FontAwesome.BUG);//from  w w  w  .j  a v a  2  s.  c o  m
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createSearchDocumentViewPageLink() {
    final Link pageLink = new Link(SEARCH,
            new ExternalResource(PAGE_PREFIX + UserViews.SEARCH_DOCUMENT_VIEW_NAME));
    pageLink.setId(ViewAction.VISIT_DOCUMENT_VIEW.name());
    pageLink.setIcon(FontAwesome.SEARCH);

    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createAdminPagingLink(final String label, final String page, final String pageId,
        final String pageNr) {
    final Link pageLink = new Link(label,
            new ExternalResource(PAGE_PREFIX + page + PAGE_SEPARATOR + "[" + pageNr + "]"));
    pageLink.setId(page + "ShowPage" + PAGE_SEPARATOR + pageNr);
    pageLink.setIcon(FontAwesome.SERVER);

    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createUserHomeViewPageLink() {
    final Link pageLink = new Link("User account:" + UserContextUtil.getUserNameFromSecurityContext(),
            new ExternalResource(PAGE_PREFIX + UserViews.USERHOME_VIEW_NAME));
    pageLink.setId(ViewAction.VISIT_USER_HOME_VIEW.name());
    pageLink.setIcon(FontAwesome.USER);//from   w ww  .  j  a v  a  2  s .c  o  m
    return pageLink;
}

From source file:org.eclipse.hawkbit.ui.components.SPUIComponentProvider.java

License:Open Source License

/**
 * Method to create a link./*  w ww .  j  a v a2 s.c  om*/
 *
 * @param id
 *            of the link
 * @param name
 *            of the link
 * @param resource
 *            path of the link
 * @param icon
 *            of the link
 * @param targetOpen
 *            specify how the link should be open (f. e. new windows =
 *            _blank)
 * @param style
 *            chosen style of the link. Might be {@code null} if no style
 *            should be used
 * @return a link UI component
 */
public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon,
        final String targetOpen, final String style) {

    final Link link = new Link(name, new ExternalResource(resource));
    link.setId(id);
    link.setIcon(icon);
    link.setDescription(name);

    link.setTargetName(targetOpen);
    if (style != null) {
        link.setStyleName(style);
    }

    return link;

}