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 */
016 package com.github.gwtbootstrap.client.ui;
017
018 import com.github.gwtbootstrap.client.ui.constants.Constants;
019 import com.google.gwt.user.client.ui.Anchor;
020
021 //@formatter:off
022 /**
023 * Navbar widget that shows text in a large font.
024 *
025 * <p>
026 * Usually used for the name of the website or brand.
027 * </p>
028 *
029 * <p>
030 * <h3>UiBinder Usage:</h3>
031 *
032 * <pre>
033 * {@code <b:Brand>GWT-Bootstrap</b:Brand>}
034 * </pre>
035 * </p>
036 *
037 * @since 2.0.4.0
038 *
039 * @author Dominik Mayer
040 *
041 * @see <a href="http://twitter.github.com/bootstrap/components.html#navbar">Bootstrap documentation</a>
042 * @see Navbar
043 */
044 //@formatter.on
045 public class Brand extends Anchor {
046
047 /**
048 * Creates an empty widget.
049 */
050 public Brand() {
051 setStyleName(Constants.BRAND);
052 addStyleName(Constants.ACTIVE);
053 // setHref(Constants.EMPTY_HREF);
054 }
055
056 /**
057 * Creates a widget with the text set.
058 *
059 * @param text name of the brand or project
060 */
061 public Brand(String text) {
062 this();
063 setText(text);
064 }
065 }