List of usage examples for org.apache.wicket.request.resource CssResourceReference CssResourceReference
public CssResourceReference(Class<?> scope, String name)
From source file:org.apache.isis.viewer.wicket.ui.components.scalars.datepicker.TextFieldWithDatePicker.java
License:Apache License
@Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); response.render(CssHeaderItem.forReference( new CssResourceReference(TextFieldWithDatePicker.class, "css/bootstrap-datetimepicker.css"))); response.render(JavaScriptHeaderItem .forReference(new JavaScriptResourceReference(TextFieldWithDatePicker.class, "js/moment.js"))); response.render(JavaScriptHeaderItem.forReference( new JavaScriptResourceReference(TextFieldWithDatePicker.class, "js/bootstrap-datetimepicker.js"))); response.render(OnDomReadyHeaderItem.forScript(createScript(config))); }
From source file:org.apache.isis.viewer.wicket.ui.components.widgets.select2.Select2BootstrapCssReference.java
License:Apache License
@Override public Iterable<? extends HeaderItem> getDependencies() { return Lists.newArrayList( CssHeaderItem.forReference(new CssResourceReference(Select2Choice.class, "res/select2.css"))); }
From source file:org.apache.isis.viewer.wicket.ui.panels.PanelUtil.java
License:Apache License
public static CssResourceReference cssResourceReferenceFor(final Class<?> cls, final String suffix) { final String url = cssFor(cls, suffix); if (url == null) { return null; }//from w w w .jav a 2 s .c om return new CssResourceReference(cls, url); }
From source file:org.apache.karaf.webconsole.core.behavior.BootstrapBehavior.java
License:Apache License
@Override protected ResourceReference[] getResourceReferences() { return new ResourceReference[] { new CssResourceReference(BootstrapBehavior.class, "bootstrap/css/bootstrap.css"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-alert.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-button.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-carousel.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-collapse.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-dropdown.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-modal.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-scrollspy.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-tab.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-tooltip.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-popover.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-transition.js"), new JavaScriptResourceReference(BootstrapBehavior.class, "bootstrap/js/bootstrap-typeahead.js") }; }
From source file:org.apache.karaf.webconsole.core.behavior.CssBehavior.java
License:Apache License
public CssBehavior(Class<?> pageClass, String resource) { this(new CssResourceReference(pageClass, resource)); }
From source file:org.artifactory.common.wicket.contributor.ResourcePackage.java
License:Open Source License
public ResourcePackage addCss(final String path, final String media) { add(new IHeaderContributor() { @Override/*from w w w . j a v a2 s.c o m*/ public void renderHead(IHeaderResponse response) { response.renderCSSReference(new CssResourceReference(scope, path), media); } }); return this; }
From source file:org.cast.isi.page.ForgotPassword.java
License:Open Source License
public void renderHead(final IHeaderResponse response) { renderThemeCSS(response, "css/main.css"); response.renderCSSReference(new CssResourceReference(this.getClass(), "/css/main.css")); super.renderHead(response); }
From source file:org.cdlflex.ui.pages.BasePage.java
License:Apache License
@Override protected void onInitialize() { super.onInitialize(); add(new FrontendDependencyBehavior(BootstrapCssResourceReference.get(), BootstrapJsResourceReference.get(), BootstrapThemeResourceReference.get(), new CssResourceReference(BasePage.class, "style.css"))); }
From source file:org.cdlflex.ui.util.ResourceReferencesTest.java
License:Apache License
@Test public void asHeaderItem_withCssResourceReferenceAsResourceReference_returnsCorrectHeaderItemType() { ResourceReference ref = new CssResourceReference(ResourceReferencesTest.class, "css"); HeaderItem headerItem = ResourceReferences.asHeaderItem(ref); assertThat(headerItem, instanceOf(CssReferenceHeaderItem.class)); }
From source file:org.cdlflex.ui.util.ResourceReferencesTest.java
License:Apache License
@Test public void asHeaderItem_withCssResourceReference_returnsCorrectHeaderItemType() { CssResourceReference ref = new CssResourceReference(ResourceReferencesTest.class, "css"); HeaderItem headerItem = ResourceReferences.asHeaderItem(ref); assertThat(headerItem, instanceOf(CssReferenceHeaderItem.class)); }