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


Java CssResourceReference类代码示例

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


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

示例1: renderHead

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
    // get Sakai skin
    String skinRepo = serverConfigurationService.getString("skin.repo");
    String skin = siteService.findTool(sessionManager.getCurrentToolSession().getPlacementId()).getSkin();
    if (skin == null) {
        skin = serverConfigurationService.getString("skin.default");
    }
    String toolCSS = skinRepo + "/" + skin + "/tool.css";
    String toolBaseCSS = skinRepo + "/tool_base.css";

    // Sakai additions
    response.render(JavaScriptUrlReferenceHeaderItem.forUrl("/library/js/headscripts.js"));
    response.render(CssUrlReferenceHeaderItem.forUrl(toolBaseCSS));
    response.render(CssUrlReferenceHeaderItem.forUrl(toolCSS));
    response.render(JavaScriptHeaderItem.forScript("\nif (typeof setMainFrameHeight !== 'undefined'){\n"
            + "setMainFrameHeight( window.name );\n"
            + "}", "iframe-resize"));

    // Tool additions (at end so we can override if required)
    response.render(new MetaDataHeaderItem(MetaDataHeaderItem.META_TAG).addTagAttribute("http-equiv", "Content-Type").addTagAttribute("content", "text/html; charset=UTF-8"));
    response.render(CssReferenceHeaderItem.forReference(new CssResourceReference(getClass(), "style.css")));
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:24,代码来源:SakaiPage.java

示例2: renderHead

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
    public void renderHead(IHeaderResponse response) {
        super.renderHead(response);

        String skinCssString = CLASS_DEFAULT_SKIN;
        if (deploymentInfoModel != null && deploymentInfoModel.getObject() != null &&
                StringUtils.isNotEmpty(deploymentInfoModel.getObject().getSkin())) {
            skinCssString = deploymentInfoModel.getObject().getSkin();
        }

        String skinCssPath = String.format("../../../../../../webjars/adminlte/2.3.11/dist/css/skins/%s.min.css", skinCssString);
        response.render(CssHeaderItem.forReference(
                new CssResourceReference(
                        PageBase.class, skinCssPath)
                )
        );
        // this attaches jquery.js as first header item, which is used in our
        // scripts.
        CoreLibrariesContributor.contribute(getApplication(), response);

//		response.render(JavaScriptHeaderItem.forScript("alert(window.name);", "windowNameScript"));
    }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:23,代码来源:PageBase.java

示例3: renderHead

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
    public void renderHead(IHeaderResponse response) {
        // FIXME: funktioniert das wirklich? Im Forscher wird kein Link erzeugt
    	// TODO veit06: Ist das hier wirklich noch n�tig? Duch die Styling-Strategie wird jetzt CSS anders eingebunden
//        LessCSSHelper.initBootstrapLessCSS(this.getClass(), response, getRequestCycle(), new LessCSSHelper.PathTupel(
//                this.getClass(), "less/application.less", "css/application.css"));
    	
    	List<CssResourceReference> cssRefs = StylingFactory.getStylingStrategy().getCssStyleFiles();
    	List<JavaScriptResourceReference> jsRefs = StylingFactory.getStylingStrategy().getJavascriptFiles();
    	
    	if(cssRefs != null) {
    		// CSS Dateien f�r die aktuelle Styling Strategie einbinden
    		for(CssResourceReference cssRef : cssRefs) {
        		response.render(CssReferenceHeaderItem.forReference(cssRef));
    		}
    	}
    	
    	if(jsRefs != null) {
    		// JS Dateien f�r die aktuelle Styling Strategie einbinden
    		for(JavaScriptResourceReference jsRef : jsRefs) {
    			response.render(JavaScriptReferenceHeaderItem.forReference(jsRef));
    		}
    	}
    }
 
开发者ID:Nocket,项目名称:nocket,代码行数:25,代码来源:DMDWebPage.java

示例4: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(
			SelectionPopoverResourceReference.class, "jquery.selectionpopover.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:SelectionPopoverResourceReference.java

示例5: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(
			Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(DropzoneResourceReference.class, "dropzone.css")));
	dependencies.add(OnDomReadyHeaderItem.forScript("Dropzone.autoDiscover = false;"));
	
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:DropzoneResourceReference.java

示例6: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(
			Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(JQueryUIResourceReference.class, "jquery-ui.min.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:10,代码来源:JQueryUIResourceReference.java

示例7: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(
			AtWhoResourceReference.class, "jquery.atwho-caret.js")));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(
			AtWhoResourceReference.class, "jquery.atwho.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:11,代码来源:AtWhoResourceReference.java

示例8: createBundles

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
private void createBundles(Class<?> scope, Set<ResourceReference> resourceReferences) {
	/*
	 * Some bundled css file may contain resources relative to parent paths of the css url, 
	 * for instance, a css may define below style:
	 * 
	 * background: url(../images/clock.png)),
	 *  
	 * if we use a resource name for instance "bundle" here, the generated resource 
	 * path will be something like "http://<server>:<port>/wicket/resource/org.apache.wicket.Application/bundle-ver-1472816165384.css", 
	 * and browser will resolve image url above as "http://<server>:<port>/wicket/resource/images/clock.png", which will cause Wicket
	 * resource loading not working at all. However if we use a long path here for resource name, for instance 
	 * "a/l/o/n/g/p/a/t/h/bundle", the resolved image url will be "http://<server>:<port>/wicket/resource/org.apache.wicket.Application/a/l/o/n/g/p/a/t/clock.png",  
	 * which will be resolved to the correct image with help of our BundleAwareResourceReferenceFactory
	 */
	String name = "a/l/o/n/g/p/a/t/h/bundle";
	
	List<ResourceReference> resourceReferenceList = new ArrayList<>(resourceReferences);
	resourceReferenceList.sort((o1, o2)->sorted.indexOf(o1)-sorted.indexOf(o2));
	
	List<JavaScriptReferenceHeaderItem> javaScriptResourceReferences = new ArrayList<>();
	List<CssReferenceHeaderItem> cssResourceReferences = new ArrayList<>();
	for (ResourceReference resourceReference: resourceReferenceList) {
		if (resourceReference instanceof JavaScriptResourceReference) {
			javaScriptResourceReferences.add(JavaScriptReferenceHeaderItem.forReference(resourceReference));
		} else if (resourceReference instanceof CssResourceReference) {
			cssResourceReferences.add(CssReferenceHeaderItem.forReference(resourceReference));
		}
	}
	
	if (!javaScriptResourceReferences.isEmpty()) {
		javaScriptBundleReferences.add(new JavaScriptConcatResourceBundleReference(
				scope, name + ".js", javaScriptResourceReferences));			
	}
	
	if (!cssResourceReferences.isEmpty()) {
		cssBundleReferences.add(new CachedDependenciesConcatResourceBundleReference<CssReferenceHeaderItem>(
				scope, name + ".css", cssResourceReferences));			
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:40,代码来源:ResourceBundleReferences.java

示例9: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(UserChoiceResourceReference.class, "user-choice.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:8,代码来源:UserChoiceResourceReference.java

示例10: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new HotkeysResourceReference()));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(RevisionSelectorResourceReference.class, "revision-selector.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:8,代码来源:RevisionSelectorResourceReference.java

示例11: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new SnapSvgResourceReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(CommitGraphResourceReference.class, "commit-graph.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:CommitGraphResourceReference.java

示例12: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new HotkeysResourceReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(BranchSelectorResourceReference.class, "branch-selector.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:BranchSelectorResourceReference.java

示例13: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(BranchChoiceResourceReference.class, "branch-choice.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:8,代码来源:BranchChoiceResourceReference.java

示例14: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(
			Select2CssResourceReference.class, "res/select2.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:8,代码来源:Select2CssResourceReference.java

示例15: getDependencies

import org.apache.wicket.request.resource.CssResourceReference; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new HoverResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new SelectionPopoverResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new ClipboardResourceReference()));
	dependencies.add(CssHeaderItem.forReference(new WebjarsCssResourceReference("codemirror/current/theme/eclipse.css")));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(TextDiffPanel.class, "text-diff.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:11,代码来源:TextDiffResourceReference.java


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