Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2012 GWT-Bootstrap
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.gwtbootstrap.client.ui.config;
import com.github.gwtbootstrap.client.ui.base.IsResponsive;
import com.github.gwtbootstrap.client.ui.resources.Resources;
/**
*
Using custom CSS/JS resources.
*
*
* If you need to adapt resources, create your resource package, add your files and implement this interface, then add a
* replace-with tag and public tag to your module xml. Example:
*
*
*
*
* 1. Create your Resources package and add css,js directory to that (under your module xml package) and add your resources to adove css,
* js directory. (Bootstarp's css filename should be bootstrap.min.css and Bootstrap's js filename should be bootstrap.min.js)
*
* src/main/java/com/example
* |-- client
* |-- resources
* | |-- css
* | | `-- bootstrap.min.css < your custom css
* | | `-- bootstrap-responsive.min.css < your custom css
* | |-- js
* | | `-- bootstrap.min.js < your custom js
* | |-- ExampleConfigurator.java < your custom Configurator class
* | `-- ExampleResources.java < your custom Resources interface
* |-- server
* |-- shared
* `-- Example.gwt.xml < your module xml file
*
*
*
* 2. Create a Resources Interface (extending {@link Resources}) override the
* getters of the files you want to replace.
*
*
* public MyConfigurator implements Configurator {
* public Resources getResources() {
* return GWT.create(MyResources.class);
* }
* }
*
*
*
*
*
* 4. Add a replace-with tag, source and public to your module xml (
* *.gwt.xml):
*
*
* {@literal
*
*
*
*
*
*
*
*
*
* }
*
*
*
*
*
A more detailed tutorial and a full working example can be found here.
* @since 2.0.4.0
*
* @author Dominik Mayer
* @author ohashi keisuke
* @author Carlos A Becker
*
* @see Resources
* @see DefaultConfigurator
*/
public interface Configurator {
/**
* Get the Bootstrap Resources that should be used for this project.
*
* @return the Bootstrap Resources
*/
Resources getResources();
//@formatter:off
/**
* Determines whether the project uses a responsive design.
*
*
* If the responsive
* design is enabled, the interface can adapt to the screen size and show
* different content on smartphones, tablets and desktop computers.
*
*
* @return true if the responsive features should be enabled.
* Default: false
*
* @see IsResponsive
*
* @see Bootstrap documentation
*/
boolean hasResponsiveDesign();
}