All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.html.Colgroup Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.html;

import com.hfg.html.attribute.Align;
import com.hfg.html.attribute.VAlign;

//------------------------------------------------------------------------------
/**
 Table column group (<colgroup>) tag.
 
@author J. Alex Taylor, hairyfatguy.com
*/ //------------------------------------------------------------------------------ // com.hfg XML/HTML Coding Library // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library 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 // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com // [email protected] //------------------------------------------------------------------------------ // // http://www.w3.org/TR/html401/struct/tables.html#edef-COLGROUP // // // // // public class Colgroup extends HTMLTag { //########################################################################## // CONSTRUCTORS //########################################################################## //-------------------------------------------------------------------------- public Colgroup() { super(HTML.COLGROUP); } //########################################################################## // PUBLIC METHODS //########################################################################## //-------------------------------------------------------------------------- public Col addCol() { Col col = new Col(); addSubtag(col); return col; } //-------------------------------------------------------------------------- public Colgroup setSpan(int inValue) { setAttribute(HTML.SPAN, inValue); return this; } //-------------------------------------------------------------------------- public Colgroup setWidth(String inValue) { setAttribute(HTML.WIDTH, inValue); return this; } //-------------------------------------------------------------------------- public Colgroup setAlign(Align inValue) { setAttribute(inValue.getHTMLAttributeName(), inValue.toString()); return this; } //-------------------------------------------------------------------------- public Colgroup setVAlign(VAlign inValue) { setAttribute(inValue.getHTMLAttributeName(), inValue.toString()); return this; } //-------------------------------------------------------------------------- /** Alignment char, e.g. char=':'. @param inValue the value to use for the 'char' attribute @return this Col object to enable method chaining */ public Colgroup setChar(char inValue) { setAttribute(HTML.CHAR, inValue); return this; } //-------------------------------------------------------------------------- /** Offset for the alignment char. @param inValue the value to use for the 'charoff' attribute @return this Col object to enable method chaining */ public Colgroup setCharOffset(int inValue) { setAttribute(HTML.CHAROFF, inValue); return this; } // Overrides for HTMLTag setters to allow method chaining. //-------------------------------------------------------------------------- @Override public Colgroup addClass(String inValue) { return (Colgroup) super.addClass(inValue); } //-------------------------------------------------------------------------- @Override public Colgroup setClass(String inValue) { return (Colgroup) super.setClass(inValue); } //-------------------------------------------------------------------------- @Override public Colgroup setId(String inValue) { return (Colgroup) super.setId(inValue); } //-------------------------------------------------------------------------- @Override public Colgroup setStyle(CharSequence inValue) { return (Colgroup) super.setStyle(inValue); } //-------------------------------------------------------------------------- @Override public Colgroup addStyle(String inValue) { return (Colgroup) super.addStyle(inValue); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy