001/*
002 *  Copyright 2012 GWT-Bootstrap
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package com.github.gwtbootstrap.client.ui.base;
017
018import com.github.gwtbootstrap.client.ui.config.Configurator;
019import com.github.gwtbootstrap.client.ui.constants.Device;
020
021/**
022 * An interface for classes with a dedicated responsive behavior.
023 * 
024 * <p>
025 * <b>They are only used if the responsive design is turned on!</b>
026 * 
027 * @since 2.0.4.0
028 * 
029 * @author Dominik Mayer
030 * 
031 * @see Configurator#hasResponsiveDesign()
032 * @see <a
033 *      href="http://twitter.github.com/bootstrap/scaffolding.html#responsive">Bootstrap
034 *      documentation</a>
035 * 
036 */
037public interface IsResponsive {
038
039        /**
040         * Sets the kind of device, this widget is shown on.
041         * 
042         * <p>
043         * The widget is not shown on any other device.
044         * </p>
045         * 
046         * <p>
047         * <b>Only works if responsive design is turned on!</b>
048         * </p>
049         * 
050         * @param device
051         * 
052         * @see Configurator#hasResponsiveDesign()
053         * @see #setHideOn(Device)
054         */
055        void setShowOn(Device device);
056
057        /**
058         * Sets the kind of device, this widget is hidden on.
059         * 
060         * <p>
061         * The widget is not hidden on any other device.
062         * </p>
063         * 
064         * <p>
065         * <b>Only works if responsive design is turned on!</b>
066         * </p>
067         * 
068         * @param device
069         * 
070         * @see Configurator#hasResponsiveDesign()
071         * @see #setShowOn(Device)
072         */
073        void setHideOn(Device device);
074}