001package org.gwtbootstrap3.client.ui.gwt;
002
003/*
004 * #%L
005 * GwtBootstrap3
006 * %%
007 * Copyright (C) 2013 - 2014 GwtBootstrap3
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023import org.gwtbootstrap3.client.ui.base.HasId;
024import org.gwtbootstrap3.client.ui.base.HasPull;
025import org.gwtbootstrap3.client.ui.base.HasResponsiveness;
026import org.gwtbootstrap3.client.ui.base.helper.StyleHelper;
027import org.gwtbootstrap3.client.ui.base.mixin.IdMixin;
028import org.gwtbootstrap3.client.ui.base.mixin.PullMixin;
029import org.gwtbootstrap3.client.ui.constants.DeviceSize;
030import org.gwtbootstrap3.client.ui.constants.Pull;
031
032public class Widget extends com.google.gwt.user.client.ui.Widget implements HasResponsiveness, HasId, HasPull {
033
034    private final IdMixin<Widget> idMixin = new IdMixin<Widget>(this);
035    private final PullMixin<Widget> pullMixin = new PullMixin<Widget>(this);
036
037    /**
038     * {@inheritDoc}
039     */
040    @Override
041    public void setId(final String id) {
042        idMixin.setId(id);
043    }
044
045    /**
046     * {@inheritDoc}
047     */
048    @Override
049    public String getId() {
050        return idMixin.getId();
051    }
052
053    /**
054     * {@inheritDoc}
055     */
056    @Override
057    public void setVisibleOn(final DeviceSize deviceSize) {
058        StyleHelper.setVisibleOn(this, deviceSize);
059    }
060
061    /**
062     * {@inheritDoc}
063     */
064    @Override
065    public void setHiddenOn(final DeviceSize deviceSize) {
066        StyleHelper.setHiddenOn(this, deviceSize);
067    }
068
069    /**
070     * {@inheritDoc}
071     */
072    @Override
073    public void setPull(final Pull pull) {
074        pullMixin.setPull(pull);
075    }
076
077    /**
078     * {@inheritDoc}
079     */
080    @Override
081    public Pull getPull() {
082        return pullMixin.getPull();
083    }
084
085}