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.Button; 019import com.github.gwtbootstrap.client.ui.Navbar; 020import com.github.gwtbootstrap.client.ui.ResponsiveNavbar; 021import com.github.gwtbootstrap.client.ui.constants.NavbarConstants; 022 023//@formatter:off 024/** 025 * {@link Button} that can be used in a {@link Navbar}. 026 * <p> 027 * It is not visible by default and only used as the toggle Button of a 028 * {@link ResponsiveNavbar}. 029 * 030 * @since 2.0.4.0 031 * 032 * @author Dominik Mayer 033 */ 034//@formatter:on 035public class NavbarButton extends Button { 036 037 /** 038 * Creates an empty widget. 039 */ 040 public NavbarButton() { 041 addStyleName(NavbarConstants.NAVBAR_BUTTON); 042// getElement().getStyle().setDisplay(Display.INLINE_BLOCK); 043// addStyleName(ButtonType.PRIMARY.get()); 044 } 045 046 /** 047 * Creates a Button with the given caption. 048 * 049 * @param caption 050 * the caption of the Button 051 */ 052 public NavbarButton(String caption) { 053 super(caption); 054 addStyleName(NavbarConstants.NAVBAR_BUTTON); 055// getElement().getStyle().setDisplay(Display.INLINE_BLOCK); 056 } 057}