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.base.HtmlWidget;
019
020
021 //@formatter:off
022 /**
023 * Simple html paragraph widget.
024 *
025 * @since 2.0.4.0
026 *
027 * @author ohashi keisuke
028 * @author Dominik Mayer
029 */
030 //@formatter:on
031 public class Paragraph extends HtmlWidget {
032
033 /**
034 * Creates an empty paragraph.
035 */
036 public Paragraph() {
037 super("p");
038 }
039
040 /**
041 * Creates a widget with the html set..
042 * @param html content html
043 */
044 public Paragraph(String html) {
045 super("p", html);
046 }
047
048 /**
049 * get Inner Text
050 * @return innter Text
051 */
052 public String getText() {
053 return getElement().getInnerText();
054 }
055
056 /**
057 * set Inner Text
058 * @param text set Text
059 */
060 public void setText(String text) {
061 getElement().setInnerText(text);
062 }
063 }