本文整理汇总了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")));
}
示例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"));
}
示例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));
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}