com.hfg.html.ImageMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com_hfg Show documentation
Show all versions of com_hfg Show documentation
com.hfg xml, html, svg, and bioinformatics utility library
package com.hfg.html;
//------------------------------------------------------------------------------
/**
* Represents an image map (<map>) tag. Named ImageMap to avoid colliding with
* java.util.Map.
*
* Note: HTML references imagemaps by the 'name' attribute while XHTML uses the 'id'
* attribute.
*
* @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]
//------------------------------------------------------------------------------
public class ImageMap extends HTMLTagWithCoreEvents
{
//##########################################################################
// CONSTRUCTORS
//##########################################################################
//--------------------------------------------------------------------------
public ImageMap()
{
super(HTML.MAP);
}
//--------------------------------------------------------------------------
public ImageMap(String inName)
{
this();
setName(inName);
}
//##########################################################################
// PUBLIC METHODS
//##########################################################################
//--------------------------------------------------------------------------
public Area addArea()
{
Area area = new Area();
// Using addSubtag() instead of addSubtag() because content (text)
// may flow around embedded subtags.
addSubtag(area);
return area;
}
//--------------------------------------------------------------------------
public ImageMap setName(String inValue)
{
setAttribute(HTML.NAME, inValue);
return this;
}
// Overrides for HTMLTag setters to allow method chaining.
//--------------------------------------------------------------------------
@Override
public ImageMap setId(String inValue)
{
return (ImageMap) super.setId(inValue);
}
// Overrides for HTMLTagWithCoreEvents setters to allow method chaining.
//--------------------------------------------------------------------------
@Override
public ImageMap setOnClick(String inValue)
{
return (ImageMap) super.setOnClick(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnDblClick(String inValue)
{
return (ImageMap) super.setOnDblClick(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnMouseDown(String inValue)
{
return (ImageMap) super.setOnMouseDown(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnMouseMove(String inValue)
{
return (ImageMap) super.setOnMouseMove(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnMouseOut(String inValue)
{
return (ImageMap) super.setOnMouseOut(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnMouseOver(String inValue)
{
return (ImageMap) super.setOnMouseOver(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnMouseUp(String inValue)
{
return (ImageMap) super.setOnMouseUp(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnKeyDown(String inValue)
{
return (ImageMap) super.setOnKeyDown(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnKeyPress(String inValue)
{
return (ImageMap) super.setOnKeyPress(inValue);
}
//--------------------------------------------------------------------------
@Override
public ImageMap setOnKeyUp(String inValue)
{
return (ImageMap) super.setOnKeyUp(inValue);
}
}