org.wicketstuff.lightbox.LightBoxInitializer.java Source code

Java tutorial

Introduction

Here is the source code for org.wicketstuff.lightbox.LightBoxInitializer.java

Source

/*
 * This work is licensed under the Creative Commons Attribution
 * License 2.5. You may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *      http://creativecommons.org/licenses/by/2.5/
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * See the included notice for any additional licensing information.
 */

package org.wicketstuff.lightbox;

import org.apache.wicket.Application;
import org.apache.wicket.IInitializer;
import org.apache.wicket.SharedResources;

/**
 * Initializes the Lightbox component, by registering the shared
 * resources that the components and behaviors will later need.
 * <p/>
 * This file was created on February 27, 2008 by s.crissman.
 *
 */
public class LightBoxInitializer implements IInitializer {

    public void init(Application application) {
        SharedResources resources = application.getSharedResources();

        resources.add("lightbox.css", new LightboxCSSResource());
        resources.add("lightbox.js", new LightboxJavaScriptResource());
    }
}