• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StringResourceStream类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.util.resource.StringResourceStream的典型用法代码示例。如果您正苦于以下问题:Java StringResourceStream类的具体用法?Java StringResourceStream怎么用?Java StringResourceStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringResourceStream类属于org.apache.wicket.util.resource包,在下文中一共展示了StringResourceStream类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: StartSharingButton

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
public StartSharingButton(String id, String uid) {
	super(id);
	this.uid = uid;
	setOutputMarkupPlaceholderTag(true);
	setVisible(false);
	add(download = new AjaxDownloadBehavior(new ResourceStreamResource() {
		private static final long serialVersionUID = 1L;

		{
			setCacheDuration(NONE);
		}

		@Override
		protected IResourceStream getResourceStream(Attributes attributes) {
			setFileName(String.format("public_%s.jnlp", getOnlineClient(uid).getRoom().getId()));
			StringResourceStream srs = new StringResourceStream(app, "application/x-java-jnlp-file");
			srs.setCharset(UTF_8);
			return srs;
		}
	}));
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:22,代码来源:StartSharingButton.java


示例2: createFormPageMarkup

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
private IMarkupFragment createFormPageMarkup(final String componentId) {
	String markup = /*"<html><head></head>" +*/ "<body><form wicket:id='form'><select wicket:id='" + componentId
			+ "' /></form></body>" /*+ "</html>"*/;

	try {
		// set a ContainerInfo to be able to use HtmlHeaderContainer so header contribution
		// still work. WICKET-3700
		ContainerInfo containerInfo = new ContainerInfo(new ExtendedWicketTester.StartComponentInForm());
		MarkupResourceStream markupResourceStream = new MarkupResourceStream(new StringResourceStream(markup),
				containerInfo, ExtendedWicketTester.StartComponentInForm.class);

		MarkupParser markupParser = getTester().getApplication().getMarkupSettings().getMarkupFactory()
				.newMarkupParser(markupResourceStream);
		return markupParser.parse();
	} catch (Exception e) {
		fail("Error while parsing the markup for the autogenerated page: " + e.getMessage());
		return null;
	}
}
 
开发者ID:premium-minds,项目名称:pm-wicket-utils,代码行数:20,代码来源:BooleanDropDownTest.java


示例3: getMarkupResourceStream

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
public IResourceStream getMarkupResourceStream(
		MarkupContainer container, Class<?> containerClass) {
	String html = 
			"<wicket:panel>" +
			"	<input type='checkbox' wicket:id='checkbox'></input>" +
			"</wicket:panel>";
	return new StringResourceStream(html);
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:SelectionColumn.java


示例4: getResourceStream

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
@Override
protected IResourceStream getResourceStream(Attributes attributes) {
	final ChatDao dao = getBean(ChatDao.class);
	final boolean admin = hasAdminLevel(getRights());
	final StringBuilder sb = new StringBuilder();
	chatForm.process(
			() -> {
				if (admin) {
					setFileName(String.format(CHAT_FNAME_TMPL, "global"));
					export(dao.getGlobal(0, Integer.MAX_VALUE), sb);
				}
				return true;
			}
			, r -> {
				if (admin || isModerator(getUserId(), r.getId())) {
					setFileName(String.format(CHAT_FNAME_TMPL, "room_" + r.getId()));
					export(dao.getRoom(r.getId(), 0, Integer.MAX_VALUE, true), sb);
				}
				return true;
			}, u -> {
				setFileName(String.format(CHAT_FNAME_TMPL, "user_" + u.getId()));
				export(dao.getUser(u.getId(), 0, Integer.MAX_VALUE), sb);
				return true;
			});
	StringResourceStream srs = new StringResourceStream(sb, "text/csv");
	srs.setCharset(UTF_8);
	return srs;
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:29,代码来源:ChatToolbar.java


示例5: ReadOnlySettingsModalPanel

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
public ReadOnlySettingsModalPanel(final DownloadModalSettings settings) {
    super(new SyntaxHighlighter("content", settings.getContent(), settings.getSyntax()));

    final AjaxSettingsDownloadBehavior ajaxSettingsDownloadBehavior =
            new AjaxSettingsDownloadBehavior(settings.getSaveToFileName()) {

                @Override
                protected StringResourceStream getResourceStream() {
                    FilteredResourcesWebAddon filteredResourcesWebAddon = addonsManager.addonByType(
                            FilteredResourcesWebAddon.class);
                    String settingsMimeType = settings.getSettingsMimeType();
                    String settingsContent = settings.getContent();
                    try {
                        String filtered = filteredResourcesWebAddon.filterResource(null,
                                (Properties) InfoFactoryHolder.get().createProperties(),
                                new StringReader(settingsContent));
                        return new StringResourceStream(filtered, settingsMimeType);
                    } catch (Exception e) {
                        log.error("Unable to filter settings: " + e.getMessage());
                        return new StringResourceStream(settingsContent, settingsMimeType);
                    }
                }
            };

    add(ajaxSettingsDownloadBehavior);

    Component exportLink = new TitledAjaxLink("export", settings.getDownloadButtonTitle()) {
        public void onClick(AjaxRequestTarget target) {
            ajaxSettingsDownloadBehavior.initiate(target);
        }
    };
    exportLink.add(new CssClass(new DefaultButtonStyleModel(exportLink)));
    add(exportLink);

    setWidth(700);
    add(new ModalCloseLink("cancel", "Cancel"));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:38,代码来源:ReadOnlySettingsModalPanel.java


示例6: PlainTextExampleResponder

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
public PlainTextExampleResponder(final PageParameters parameters) {
	super(parameters);
	
	StringBuilder sb = new StringBuilder();
	sb.append("plain text example.");

    getRequestCycle().scheduleRequestHandlerAfterCurrent(
    		new ResourceStreamRequestHandler(new StringResourceStream(sb.toString()))
    	);
}
 
开发者ID:kivatek,项目名称:stonefort,代码行数:11,代码来源:PlainTextExampleResponder.java


示例7: getMarkupResourceStream

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
@Override
public IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass)
{
	return new StringResourceStream("");
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:6,代码来源:AbstractWebSocketProcessor.java


示例8: getMarkupResourceStream

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
@Override
public IResourceStream getMarkupResourceStream(final MarkupContainer container,
        final Class<?> containerClass) {
    return new StringResourceStream("<html><body>"
            + "<form wicket:id=\"form\"><span wicket:id=\"field\"></span></form></body></html>");
}
 
开发者ID:apache,项目名称:syncope,代码行数:7,代码来源:TestPage.java


示例9: getResourceStream

import org.apache.wicket.util.resource.StringResourceStream; //导入依赖的package包/类
protected abstract StringResourceStream getResourceStream(); 
开发者ID:alancnet,项目名称:artifactory,代码行数:2,代码来源:AjaxSettingsDownloadBehavior.java



注:本文中的org.apache.wicket.util.resource.StringResourceStream类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HttpScheme类代码示例发布时间:2022-05-22
下一篇:
Java Session类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap