Java tutorial
/******************************************************************************* * Copyright (c) 2014, 2015 Scott Clarke (scott@dawg6.com). * * This file is part of Dawg6's Common GWT Libary. * * Dawg6's Common GWT Libary is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Dawg6's Common GWT Libary is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package com.dawg6.gwt.client.widgets; import com.google.gwt.dom.client.Element; import com.google.gwt.i18n.shared.DirectionEstimator; import com.google.gwt.user.client.ui.Label; public class StyledLabel extends Label { public StyledLabel() { super(); } public StyledLabel(Element element) { super(element); } public StyledLabel(String text, boolean wordWrap) { super(text, wordWrap); } public StyledLabel(String text, boolean wordWrap, String style) { super(text, wordWrap); if (style != null) addStyleName(style); } public StyledLabel(String text, Direction dir) { super(text, dir); } public StyledLabel(String text, DirectionEstimator directionEstimator) { super(text, directionEstimator); } public StyledLabel(String text, String style) { super(text); addStyleName(style); } public StyledLabel addStyle(String style) { addStyleName(style); return this; } }