001package org.gwtbootstrap3.client.ui.html; 002 003import org.gwtbootstrap3.client.ui.base.mixin.HTMLMixin; 004import org.gwtbootstrap3.client.ui.gwt.HTMLPanel; 005 006import com.google.gwt.dom.client.SpanElement; 007 008/* 009 * #%L 010 * GwtBootstrap3 011 * %% 012 * Copyright (C) 2013 GwtBootstrap3 013 * %% 014 * Licensed under the Apache License, Version 2.0 (the "License"); 015 * you may not use this file except in compliance with the License. 016 * You may obtain a copy of the License at 017 * 018 * http://www.apache.org/licenses/LICENSE-2.0 019 * 020 * Unless required by applicable law or agreed to in writing, software 021 * distributed under the License is distributed on an "AS IS" BASIS, 022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 023 * See the License for the specific language governing permissions and 024 * limitations under the License. 025 * #L% 026 */ 027 028/** 029 * @author Sven Jacobs 030 * @author Grant Slender 031 */ 032public class Span extends HTMLPanel { 033 034 private final HTMLMixin<Span> textMixin = new HTMLMixin<Span>(this); 035 036 public Span() { 037 super(SpanElement.TAG, ""); 038 } 039 040 public Span(final String html) { 041 this(); 042 setHTML(html); 043 } 044 045 public void setText(final String text) { 046 textMixin.setText(text); 047 } 048 049 public String getText() { 050 return textMixin.getText(); 051 } 052 053 public String getHTML() { 054 return textMixin.getHTML(); 055 } 056 057 public void setHTML(final String html) { 058 textMixin.setHTML(html); 059 } 060}