001/*
002 * #%L
003 * GwtMaterial
004 * %%
005 * Copyright (C) 2015 - 2017 GwtMaterialDesign
006 * %%
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 * 
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 * 
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 * #L%
019 */
020package gwt.material.design.client.ui;
021
022import com.google.gwt.dom.client.Document;
023import gwt.material.design.client.base.HasNoSideNavSelection;
024import gwt.material.design.client.base.MaterialWidget;
025import gwt.material.design.client.constants.CssName;
026
027//@formatter:off
028
029/**
030 * If your sidenav requires just a plain contents like input fields (for filter forms), pictures, labels & description , MaterialSideNavContent
031 * is a right widget because it implements {@link HasNoSideNavSelection} meaning it will not behave like MaterialSideNav links {@link MaterialLink}
032 * that navigates and it is selectable inside the {@link MaterialSideNav}.
033 * <p>
034 * <h3>UiBinder Usage:</h3>
035 * <pre>
036 * {@code
037 *  <m:MaterialSideNavContent padding="0">
038 *      <m:MaterialImage url="https://photo.elsoar.com/wp-content/images/tasty-fast-food-recipes-2.jpg" />
039 *      <m:MaterialRow>
040 *          <m:MaterialLabel text="File Name" fontSize="0.9em" grid="s6"/>
041 *          <m:MaterialLabel text="food-recipe.jpg" grid="s6"/>
042 *      </m:MaterialRow>
043 *      <m:MaterialRow>
044 *          <m:MaterialLabel text="Type" fontSize="0.9em" grid="s6"/>
045 *          <m:MaterialLabel text="Image" grid="s6"/>
046 *      </m:MaterialRow>
047 *      <m:MaterialRow>
048 *          <m:MaterialLabel text="File Size" fontSize="0.9em" grid="s6"/>
049 *          <m:MaterialLabel text="400 kb" grid="s6"/>
050 *      </m:MaterialRow>
051 *      <m:MaterialRow>
052 *          <m:MaterialLabel text="Owner" fontSize="0.9em" grid="s6"/>
053 *          <m:MaterialLabel text="John Doe" grid="s6"/>
054 *      </m:MaterialRow>
055 *      <m:MaterialRow>
056 *          <m:MaterialLabel text="Created" fontSize="0.9em" grid="s6"/>
057 *          <m:MaterialLabel text="April 21, 2017" grid="s6"/>
058 *      </m:MaterialRow>
059 *  </m:MaterialSideNavContent>
060 * }
061 * </pre>
062 *
063 * @author kevzlou7979
064 * @author Ben Dol
065 * @see <a href="http://gwtmaterialdesign.github.io/gwt-material-demo/#sidenavs">Material SideNav</a>
066 * @see <a href="https://material.io/guidelines/patterns/navigation-drawer.html">Material Design Specification</a>
067 * @see <a href="https://gwtmaterialdesign.github.io/gwt-material-patterns/snapshot/#sidenav_content">Pattern</a>
068 */
069//@formatter:on
070public class MaterialSideNavContent extends MaterialWidget implements HasNoSideNavSelection {
071
072    public MaterialSideNavContent() {
073        super(Document.get().createDivElement(), CssName.SIDE_NAV_CONTENT);
074    }
075}