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.incubator;
017
018 import com.google.gwt.user.client.ui.HTMLPanel;
019 import com.google.gwt.user.client.ui.HasHTML;
020
021 //@formatter:off
022 /**
023 * Header for the column of a {@link Table}.
024 *
025 * @since 2.0.4.0
026 *
027 * @author Dominik Mayer
028 *
029 * @see <a href="http://twitter.github.com/bootstrap/base-css.html#tables">Bootstrap documentation</a>
030 */
031 //@formatter:on
032 public class TableHeader extends HTMLPanel implements HasHTML {
033
034 public TableHeader() {
035 super("th", "");
036 }
037
038 public TableHeader(String html) {
039 this();
040 setHTML(html);
041 }
042
043 /**
044 * {@inheritDoc}
045 */
046 public String getText() {
047 return getElement().getInnerText();
048 }
049
050 /**
051 * {@inheritDoc}
052 */
053 public void setText(String text) {
054 getElement().setInnerText(text);
055 }
056
057 /**
058 * {@inheritDoc}
059 */
060 public String getHTML() {
061 return getElement().getInnerHTML();
062 }
063
064 /**
065 * {@inheritDoc}
066 */
067 public void setHTML(String html) {
068 getElement().setInnerHTML(html);
069 }
070 }