Example usage for org.apache.wicket.request.resource CssResourceReference CssResourceReference

List of usage examples for org.apache.wicket.request.resource CssResourceReference CssResourceReference

Introduction

In this page you can find the example usage for org.apache.wicket.request.resource CssResourceReference CssResourceReference.

Prototype

public CssResourceReference(Class<?> scope, String name) 

Source Link

Document

Construct.

Usage

From source file:com.googlecode.wicket.jquery.core.resource.StyleSheetPackageHeaderItem.java

License:Apache License

/**
 * Constructor// w w  w .j a v  a2s. c o m
 * 
 * @param scope the scope
 */
public StyleSheetPackageHeaderItem(Class<?> scope) {
    super(new CssResourceReference(scope, scope.getSimpleName() + ".css"), null, null, null);
}

From source file:com.googlecode.wicket.jquery.ui.plugins.datepicker.RangeDatePickerBehavior.java

License:Apache License

public RangeDatePickerBehavior(final String selector, final Options options) {
    super(selector, METHOD, options);

    this.add(new CssResourceReference(RangeDatePickerBehavior.class, "css/base.css"));
    this.add(new CssResourceReference(RangeDatePickerBehavior.class, "css/clean.css"));
    this.add(new JavaScriptResourceReference(RangeDatePickerBehavior.class, "js/datepicker.js"));
}

From source file:com.googlecode.wicket.jquery.ui.plugins.SnippetBehavior.java

License:Apache License

public SnippetBehavior(String selector, String language, Options options) {
    super(selector, "snippet", options);

    this.language = language;

    this.add(new JavaScriptResourceReference(SnippetBehavior.class, "jquery.snippet.min.js"));
    this.add(new CssResourceReference(SnippetBehavior.class, "jquery.snippet.min.css"));
}

From source file:com.googlecode.wicket.jquery.ui.theme.Initializer.java

License:Apache License

@Override
public void init(Application application) {
    application.getMarkupSettings().setStripWicketTags(true);

    JQueryUILibrarySettings.get()//  w  w  w . jav a2s  .c o  m
            .setStyleSheetReference(new CssResourceReference(Initializer.class, "jquery-ui.css"));
}

From source file:com.googlecode.wicket.kendo.ui.theme.Initializer.java

License:Apache License

@Override
public void init(Application application) {
    application.getMarkupSettings().setStripWicketTags(true);

    KendoUILibrarySettings settings = KendoUILibrarySettings.get();
    settings.setCommonStyleSheetReference(new CssResourceReference(Initializer.class, "kendo.common.min.css"));
    settings.setThemeStyleSheetReference(new CssResourceReference(Initializer.class, "kendo.uniform.min.css"));
    settings.setMobileStyleSheetReference(
            new CssResourceReference(Initializer.class, "kendo.uniform.mobile.min.css"));
}

From source file:com.googlecode.wicketelements.components.togglepane.TogglePane.java

License:Apache License

/**
 * Creates a toggle pane with the specified Wicket id.
 *
 * @param idParam The toggle pane's Wicket id.
 *//* w w  w .  ja va2 s  .  co m*/
public TogglePane(final String idParam) {
    super(idParam);
    titleComponent = createTitleComponent(TITLE_WICKET_ID);
    contentComponent = createContentComponent(CONTENT_WICKET_ID);
    container = new WebMarkupContainer("togglePane-container");
    container.add(titleComponent);
    container.add(contentComponent);
    setOutputMarkupId(true);
    state = new DefaultTogglePaneState(this);
    add(container);
    add(new Behavior() {
        @Override
        public void renderHead(final Component component, final IHeaderResponse response) {
            response.renderCSSReference(new CssResourceReference(TogglePane.class, "TogglePane.css"),
                    "screen, projection");
        }
    });
}

From source file:com.lazaridis.spring.wicket.Index.java

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    val cssResRef = new CssResourceReference(App.class, "example.css");
    response.render(CssHeaderItem.forReference(cssResRef));
}

From source file:com.mastfrog.acteur.wicket.borrowed.HomePageApplication.java

License:Apache License

@Override
public void init() {
    super.init();
    mountPage("index.html", HomePage.class);
    mountPage("home", HomePage.class);
    mountResource("main_style.css", new CssResourceReference(HomePage.class, "main_style.css"));
}

From source file:com.mastfrog.acteur.wicket.borrowed.NavomaticApplication.java

License:Apache License

@Override
protected void init() {
    super.init();

    getComponentInstantiationListeners().add(new DisabledLinkBehavior.LinkInstantiationListener());
    mountResource("style.css", new CssResourceReference(HomePage.class, "style.css"));
    mountResource("logo.png", new PackageResourceReference(HomePage.class, "logo.png"));
    mountResource("wicket-bg.png", new PackageResourceReference(HomePage.class, "wicket-bg.png"));
}

From source file:com.norconex.commons.wicket.markup.html.CssPage.java

License:Apache License

@SuppressWarnings("nls")
@Override/*from w  w  w. j  ava 2 s  .  c  o  m*/
public void renderHead(IHeaderResponse response) {
    // Start local and go up to super classes to find a CSS that matches
    // the class name.
    String css = getClass().getSimpleName() + ".css";
    boolean found = exists(getClass(), css);
    if (!found) {
        css = "wicket-package.css";
        found = exists(getClass(), css);
    }
    if (found) {
        response.render(CssHeaderItem.forReference(new CssResourceReference(getClass(), css)));
    }
}