当前位置: 首页>>代码示例>>Java>>正文


Java Link.setIcon方法代码示例

本文整理汇总了Java中com.vaadin.ui.Link.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Java Link.setIcon方法的具体用法?Java Link.setIcon怎么用?Java Link.setIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Link的用法示例。


在下文中一共展示了Link.setIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: filterTracksByArtistId

import com.vaadin.ui.Link; //导入方法依赖的package包/类
private void filterTracksByArtistId(int artistId){
	if(artistId >= 0) {
		trackTable.removeAllItems();
		for(Track track : tracks) {
			if(track.getArtist().getId() == artistId){
				Link downloadLink = new Link(null, new ExternalResource(track.getFile().getAudioMp3UrlString()));
    			downloadLink.setIcon(new ThemeResource("img/download.png")); //$NON-NLS-1$
    			String albumTitle = ""; //$NON-NLS-1$
    			if(track.getAlbum() != null && track.getAlbum().getName().length() > 0) {
    				track.getAlbum().getName();
    			}
    			trackTable.addItem(new Object[] {new CheckBox(), track.getTitle(),
    					albumTitle, downloadLink}, track.getId());
			}
		}
	}
}
 
开发者ID:mwolski89,项目名称:own-music-cloud,代码行数:18,代码来源:ArtistView.java

示例2: getHelpLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
/**
 * Generates help/documentation links from within management UI.
 *
 * @param uri
 *            to documentation site
 *
 * @return generated link
 */
public static Link getHelpLink(final String uri) {

    final Link link = new Link("", new ExternalResource(uri));
    link.setTargetName("_blank");
    link.setIcon(FontAwesome.QUESTION_CIRCLE);
    link.setDescription("Documentation");
    return link;

}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:18,代码来源:SPUIComponentProvider.java

示例3: createMainViewPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@Override
public Link createMainViewPageLink() {
	final Link pageLink = new Link(MAIN_VIEW_LINK_TEXT, new ExternalResource(
			LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME));
	pageLink.setId(ViewAction.VISIT_MAIN_VIEW.name());
	pageLink.setIcon(VaadinIcons.STAR);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:9,代码来源:PageLinkFactoryImpl.java

示例4: createRegisterPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@Override
public Link createRegisterPageLink() {
	final Link pageLink = new Link("Register", new ExternalResource(
			LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME + PAGE_SEPARATOR + ApplicationPageMode.REGISTER));
	pageLink.setId(ViewAction.VISIT_REGISTER.name());
	pageLink.setIcon(VaadinIcons.RANDOM);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:9,代码来源:PageLinkFactoryImpl.java

示例5: createLoginPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@Override
public Link createLoginPageLink() {
	final Link pageLink = new Link("Login", new ExternalResource(
			LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME + PAGE_SEPARATOR + ApplicationPageMode.LOGIN));
	pageLink.setId(ViewAction.VISIT_LOGIN.name());
	pageLink.setIcon(VaadinIcons.SIGN_IN);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:9,代码来源:PageLinkFactoryImpl.java

示例6: addCommitteePageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.GROUP);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:11,代码来源:PageLinkFactoryImpl.java

示例7: addMinistryPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.GROUP);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:11,代码来源:PageLinkFactoryImpl.java

示例8: addPartyPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.GROUP);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:11,代码来源:PageLinkFactoryImpl.java

示例9: createPoliticianPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.BUG);
	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:12,代码来源:PageLinkFactoryImpl.java

示例10: createSearchDocumentViewPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.SEARCH);

	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:10,代码来源:PageLinkFactoryImpl.java

示例11: createAdminPagingLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.SERVER);

	return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:12,代码来源:PageLinkFactoryImpl.java

示例12: createUserHomeViewPageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
@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(VaadinIcons.USER);
		return pageLink;
}
 
开发者ID:Hack23,项目名称:cia,代码行数:9,代码来源:PageLinkFactoryImpl.java

示例13: getGravatarImageLink

import com.vaadin.ui.Link; //导入方法依赖的package包/类
public static Link getGravatarImageLink(final String email) {
    final URL gravatarUrl = GravatarUtil.getGravatarUrl(email, 32);
    final Link link = new Link(null, new ExternalResource("http://www.gravatar.com/"));
    link.setStyleName("gravatar");
    link.setIcon(new ExternalResource(gravatarUrl));
    link.setWidth(32, Sizeable.Unit.PIXELS);
    link.setHeight(32, Sizeable.Unit.PIXELS);
    return link;
}
 
开发者ID:bubblecloud,项目名称:ilves,代码行数:10,代码来源:GravatarUtil.java

示例14: filterTracksByAlbum

import com.vaadin.ui.Link; //导入方法依赖的package包/类
private void filterTracksByAlbum(int albumId) {
	if(albumId >=0){
   		trackTable.removeAllItems();
		for(Track track : parser.parseTracks(trackService.getTracksByAlbum(albumId))) {
			if(track.getArtist().getId() == albumId){
				Link downloadLink = new Link(null, new ExternalResource(track.getFile().getAudioMp3UrlString()));
       			downloadLink.setIcon(new ThemeResource("img/download.png")); //$NON-NLS-1$
       			trackTable.addItem(new Object[] {track.getTitle(), track.getArtist().getName(),
       					downloadLink}, track.getId());
   			}
		}
	} 
}
 
开发者ID:mwolski89,项目名称:own-music-cloud,代码行数:14,代码来源:AlbumView.java

示例15: reloadTableData

import com.vaadin.ui.Link; //导入方法依赖的package包/类
public void reloadTableData() {
       albums = updateAlbums();
       albumTable.removeAllItems();
	trackTable.removeAllItems();

       for(Album album : albums) {
       	Link downloadLink = new Link(null, new ExternalResource("#")); //$NON-NLS-1$
		downloadLink.setIcon(new ThemeResource("img/download.png")); //$NON-NLS-1$
		CheckBox selectCB = new CheckBox();
           albumTable.addItem(new Object[] {selectCB, album.getName(), album.getArtist().getName(), 
           		downloadLink}, album.getId());
       }
}
 
开发者ID:mwolski89,项目名称:own-music-cloud,代码行数:14,代码来源:AlbumView.java


注:本文中的com.vaadin.ui.Link.setIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。