001package com.hfg.html; 002 003 004import com.hfg.xml.XMLNode; 005 006//------------------------------------------------------------------------------ 007/** 008 * Represents a horizontal rule (<hr>) tag. 009 * 010 * @author J. Alex Taylor, hairyfatguy.com 011 */ 012//------------------------------------------------------------------------------ 013// com.hfg XML/HTML Coding Library 014// 015// This library is free software; you can redistribute it and/or 016// modify it under the terms of the GNU Lesser General Public 017// License as published by the Free Software Foundation; either 018// version 2.1 of the License, or (at your option) any later version. 019// 020// This library is distributed in the hope that it will be useful, 021// but WITHOUT ANY WARRANTY; without even the implied warranty of 022// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 023// Lesser General Public License for more details. 024// 025// You should have received a copy of the GNU Lesser General Public 026// License along with this library; if not, write to the Free Software 027// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 028// 029// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com 030// jataylor@hairyfatguy.com 031//------------------------------------------------------------------------------ 032 033public class Hr extends HTMLTagWithCoreEvents 034{ 035 036 //########################################################################## 037 // CONSTRUCTORS 038 //########################################################################## 039 040 //-------------------------------------------------------------------------- 041 public Hr() 042 { 043 super(HTML.HR); 044 } 045 046 //-------------------------------------------------------------------------- 047 public Hr(XMLNode inXMLNode) 048 { 049 this(); 050 initFromXMLNode(inXMLNode); 051 } 052 053 //########################################################################## 054 // PUBLIC METHODS 055 //########################################################################## 056 057 //-------------------------------------------------------------------------- 058 public Hr setSize(int inValue) 059 { 060 setAttribute(HTML.SIZE, Integer.toString(inValue)); 061 062 return this; 063 } 064 065 066 //-------------------------------------------------------------------------- 067 public Hr setWidth(String inValue) 068 { 069 setAttribute(HTML.WIDTH, inValue); 070 071 return this; 072 } 073 074 //-------------------------------------------------------------------------- 075 public Hr setWidth(int inValue) 076 { 077 setAttribute(HTML.WIDTH, Integer.toString(inValue)); 078 079 return this; 080 } 081 082 083 // Overrides for HTMLTag setters to allow method chaining. 084 085 //-------------------------------------------------------------------------- 086 @Override 087 public Hr addClass(String inValue) 088 { 089 return (Hr) super.addClass(inValue); 090 } 091 092 //-------------------------------------------------------------------------- 093 @Override 094 public Hr setClass(String inValue) 095 { 096 return (Hr) super.setClass(inValue); 097 } 098 099 //-------------------------------------------------------------------------- 100 @Override 101 public Hr setId(String inValue) 102 { 103 return (Hr) super.setId(inValue); 104 } 105 106 //-------------------------------------------------------------------------- 107 @Override 108 public Hr setStyle(CharSequence inValue) 109 { 110 return (Hr) super.setStyle(inValue); 111 } 112 113 //-------------------------------------------------------------------------- 114 @Override 115 public Hr addStyle(String inValue) 116 { 117 return (Hr) super.addStyle(inValue); 118 } 119 120 // Overrides for HTMLTagWithCoreEvents setters to allow method chaining. 121 122 //-------------------------------------------------------------------------- 123 @Override 124 public Hr setOnClick(String inValue) 125 { 126 return (Hr) super.setOnClick(inValue); 127 } 128 129 //-------------------------------------------------------------------------- 130 @Override 131 public Hr setOnDblClick(String inValue) 132 { 133 return (Hr) super.setOnDblClick(inValue); 134 } 135 136 //-------------------------------------------------------------------------- 137 @Override 138 public Hr setOnMouseDown(String inValue) 139 { 140 return (Hr) super.setOnMouseDown(inValue); 141 } 142 143 //-------------------------------------------------------------------------- 144 @Override 145 public Hr setOnMouseMove(String inValue) 146 { 147 return (Hr) super.setOnMouseMove(inValue); 148 } 149 150 //-------------------------------------------------------------------------- 151 @Override 152 public Hr appendToOnMouseOut(String inValue) 153 { 154 return (Hr) super.appendToOnMouseOut(inValue); 155 } 156 157 //-------------------------------------------------------------------------- 158 @Override 159 public Hr setOnMouseOut(String inValue) 160 { 161 return (Hr) super.setOnMouseOut(inValue); 162 } 163 164 //-------------------------------------------------------------------------- 165 @Override 166 public Hr appendToOnMouseOver(String inValue) 167 { 168 return (Hr) super.appendToOnMouseOver(inValue); 169 } 170 171 //-------------------------------------------------------------------------- 172 @Override 173 public Hr setOnMouseOver(String inValue) 174 { 175 return (Hr) super.setOnMouseOver(inValue); 176 } 177 178 //-------------------------------------------------------------------------- 179 @Override 180 public Hr setOnMouseUp(String inValue) 181 { 182 return (Hr) super.setOnMouseUp(inValue); 183 } 184 185 //-------------------------------------------------------------------------- 186 @Override 187 public Hr setOnKeyDown(String inValue) 188 { 189 return (Hr) super.setOnKeyDown(inValue); 190 } 191 192 //-------------------------------------------------------------------------- 193 @Override 194 public Hr setOnKeyPress(String inValue) 195 { 196 return (Hr) super.setOnKeyPress(inValue); 197 } 198 199 //-------------------------------------------------------------------------- 200 @Override 201 public Hr setOnKeyUp(String inValue) 202 { 203 return (Hr) super.setOnKeyUp(inValue); 204 } 205 206}