001package com.hfg.html; 002 003import com.hfg.html.attribute.Shape; 004import com.hfg.xml.XMLNode; 005 006//------------------------------------------------------------------------------ 007/** 008 * Represents an image map area (<area>) 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 Area extends HTMLTagWithCoreEvents 034{ 035 //########################################################################## 036 // CONSTRUCTORS 037 //########################################################################## 038 039 //-------------------------------------------------------------------------- 040 public Area() 041 { 042 super(HTML.AREA); 043 } 044 045 //-------------------------------------------------------------------------- 046 public Area(XMLNode inXMLNode) 047 { 048 this(); 049 initFromXMLNode(inXMLNode); 050 } 051 052 053 //########################################################################## 054 // PUBLIC METHODS 055 //########################################################################## 056 057 058 //-------------------------------------------------------------------------- 059 public Area setAlt(String inValue) 060 { 061 setAttribute(HTML.ALT, inValue); 062 return this; 063 } 064 065 //-------------------------------------------------------------------------- 066 public Area setCoords(String inValue) 067 { 068 setAttribute(HTML.COORDS, inValue); 069 return this; 070 } 071 072 //-------------------------------------------------------------------------- 073 public Area setHref(String inValue) 074 { 075 setAttribute(HTML.HREF, inValue); 076 return this; 077 } 078 079 //-------------------------------------------------------------------------- 080 public Area setShape(Shape inValue) 081 { 082 setAttribute(HTML.SHAPE, inValue.toString()); 083 return this; 084 } 085 086 //-------------------------------------------------------------------------- 087 public Area setTarget(String inValue) 088 { 089 setAttribute(HTML.TARGET, inValue); 090 return this; 091 } 092 093 //-------------------------------------------------------------------------- 094 public Area setTitle(String inValue) 095 { 096 setAttribute(HTML.TITLE, inValue); 097 return this; 098 } 099 100 // Overrides for HTMLTagWithCoreEvents setters to allow method chaining. 101 102 //-------------------------------------------------------------------------- 103 @Override 104 public Area setOnClick(String inValue) 105 { 106 return (Area) super.setOnClick(inValue); 107 } 108 109 //-------------------------------------------------------------------------- 110 @Override 111 public Area setOnDblClick(String inValue) 112 { 113 return (Area) super.setOnDblClick(inValue); 114 } 115 116 //-------------------------------------------------------------------------- 117 @Override 118 public Area setOnMouseDown(String inValue) 119 { 120 return (Area) super.setOnMouseDown(inValue); 121 } 122 123 //-------------------------------------------------------------------------- 124 @Override 125 public Area setOnMouseMove(String inValue) 126 { 127 return (Area) super.setOnMouseMove(inValue); 128 } 129 130 //-------------------------------------------------------------------------- 131 @Override 132 public Area setOnMouseOut(String inValue) 133 { 134 return (Area) super.setOnMouseOut(inValue); 135 } 136 137 //-------------------------------------------------------------------------- 138 @Override 139 public Area setOnMouseOver(String inValue) 140 { 141 return (Area) super.setOnMouseOver(inValue); 142 } 143 144 //-------------------------------------------------------------------------- 145 @Override 146 public Area setOnMouseUp(String inValue) 147 { 148 return (Area) super.setOnMouseUp(inValue); 149 } 150 151 //-------------------------------------------------------------------------- 152 @Override 153 public Area setOnKeyDown(String inValue) 154 { 155 return (Area) super.setOnKeyDown(inValue); 156 } 157 158 //-------------------------------------------------------------------------- 159 @Override 160 public Area setOnKeyPress(String inValue) 161 { 162 return (Area) super.setOnKeyPress(inValue); 163 } 164 165 //-------------------------------------------------------------------------- 166 @Override 167 public Area setOnKeyUp(String inValue) 168 { 169 return (Area) super.setOnKeyUp(inValue); 170 } 171 172}