com.ge.research.html
Class ImageTag

java.lang.Object
  extended bycom.ge.research.html.HTMLTag
      extended bycom.ge.research.html.ImageTag

public class ImageTag
extends HTMLTag

Encapsulates all the attributes of an HTML "IMG" element, its accessors, validations, and default values.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:31 $
Author:
garbiras
Created on:
Sep 9, 2002

Field Summary
 
Fields inherited from class com.ge.research.html.HTMLTag
HORIZONTAL_LINE, LINEBREAK, reconstructTag, tag, WHITESPACE
 
Constructor Summary
ImageTag()
          Default constructor.
 
Method Summary
 java.lang.String getAlign()
          Returns the value of the HTML Tag ALIGN attribute.
 java.lang.String getAlt()
          Returns the value of the HTML Tag ALT attribute.
 int getBorder()
          Returns the value of the HTML Tag BORDER WIDTH attribute.
 int getHeight()
          Returns the value of the HTML Tag HEIGHT attribute.
 int getHSpace()
          Returns the value of the HTML Tag HSPACE attribute.
 boolean getIsMap()
          Returns the value of the HTML Tag ISMAP attribute.
 java.lang.String getSrc()
          Returns the value of the HTML Tag SRC attribute.
 java.lang.String getUseMap()
          Returns the value of the HTML Tag USEMAP attribute.
 int getVSpace()
          Returns the value of the HTML Tag VSPACE attribute.
 int getWidth()
          Returns the value of the HTML Tag WIDTH attribute.
protected  void resetTagSpecificInformation()
          Resets the tag attributes and content of the HTML Tag to their default values.
 void setAlign(java.lang.String attribute)
          Sets the align attribute and validates its value.
 void setAlt(java.lang.String attribute)
          Sets the HTML Tag ALT attribute.
 void setBorder(int attribute)
          Sets the HTML Tag BORDER WIDTH attribute.
 void setHeight(int attribute)
          Sets the HTML Tag HEIGHT attribute.
 void setHSpace(int attribute)
          Sets the HTML Tag HSPACE attribute.
 void setIsMap(boolean attribute)
          Sets the HTML Tag ISMAP attribute.
 void setSrc(java.lang.String attribute)
          Sets the HTML Tag SRC attribute.
 void setUseMap(java.lang.String attribute)
          Sets the HTML Tag USEMAP attribute.
 void setVSpace(int attribute)
          Sets the HTML Tag VSPACE attribute.
 void setWidth(int attribute)
          Sets the HTML Tag WIDTH attribute.
protected  void writeTagSpecificAttributes()
          Adds the tag specific attribute information to the HTML Tag.
 
Methods inherited from class com.ge.research.html.HTMLTag
addAttribute, addAttribute, getId, getOnClick, getOnContextMenu, getOnDblClick, getOnDrag, getOnDragEnd, getOnDragStart, getOnFocus, getOnFocusOut, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnMoveEnd, getOnMoveStart, getStyle, getStyleClass, getTitle, removeAttribute, reset, setId, setOnClick, setOnContextMenu, setOnDblClick, setOnDrag, setOnDragEnd, setOnDragStart, setOnFocus, setOnFocusOut, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnMoveEnd, setOnMoveStart, setStyle, setStyleClass, setTitle, toString, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeTagSpecificData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageTag

public ImageTag()
Default constructor. Calls super(TagPropertyConstants.IMAGE_TAG).

See Also:
TagPropertyConstants.IMAGE_TAG
Method Detail

getAlign

public java.lang.String getAlign()
Returns the value of the HTML Tag ALIGN attribute.

Returns:
The current value of the HTML Tag ALIGN attribute

getAlt

public java.lang.String getAlt()
Returns the value of the HTML Tag ALT attribute.

Returns:
The current value of the HTML Tag ALT attribute

getBorder

public int getBorder()
Returns the value of the HTML Tag BORDER WIDTH attribute.

Returns:
The current value of the HTML Tag BORDER WIDTH attribute

getHeight

public int getHeight()
Returns the value of the HTML Tag HEIGHT attribute.

Returns:
The current value of the HTML Tag HEIGHT attribute

getHSpace

public int getHSpace()
Returns the value of the HTML Tag HSPACE attribute.

Returns:
The current value of the HTML Tag HSPACE attribute

getIsMap

public boolean getIsMap()
Returns the value of the HTML Tag ISMAP attribute.

Returns:
true if the tag uses a server-side image map; false if the tag does not use a server-side image map

getSrc

public java.lang.String getSrc()
Returns the value of the HTML Tag SRC attribute.

Returns:
The current value of the HTML Tag SRC attribute

getUseMap

public java.lang.String getUseMap()
Returns the value of the HTML Tag USEMAP attribute.

Returns:
The current value of the HTML Tag USEMAP attribute

getVSpace

public int getVSpace()
Returns the value of the HTML Tag VSPACE attribute.

Returns:
The current value of the HTML Tag VSPACE attribute

getWidth

public int getWidth()
Returns the value of the HTML Tag WIDTH attribute.

Returns:
The current value of the HTML Tag WIDTH attribute

setAlign

public void setAlign(java.lang.String attribute)
Sets the align attribute and validates its value. If the new value is not an acceptable value, then the align attribute is set to null. Sets the HTMLTag.reconstructTag value to true.

Parameters:
attribute - the new align value
See Also:
TagPropertyConstants.isAlignType(java.lang.String), HTMLTag.reconstructTag

setAlt

public void setAlt(java.lang.String attribute)
Sets the HTML Tag ALT attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag ALT attribute
See Also:
HTMLTag.reconstructTag

setBorder

public void setBorder(int attribute)
Sets the HTML Tag BORDER WIDTH attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag BORDER WIDTH attribute
See Also:
HTMLTag.reconstructTag

setHeight

public void setHeight(int attribute)
Sets the HTML Tag HEIGHT attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new height value
See Also:
HTMLTag.reconstructTag

setHSpace

public void setHSpace(int attribute)
Sets the HTML Tag HSPACE attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new hspace value
See Also:
HTMLTag.reconstructTag

setIsMap

public void setIsMap(boolean attribute)
Sets the HTML Tag ISMAP attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - true if this HTML Tag should use a server-side image map; false if this HTML Tag should not use a server side image map
See Also:
HTMLTag.reconstructTag

setSrc

public void setSrc(java.lang.String attribute)
Sets the HTML Tag SRC attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag SRC attribute
See Also:
HTMLTag.reconstructTag

setUseMap

public void setUseMap(java.lang.String attribute)
Sets the HTML Tag USEMAP attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new value for the HTML Tag USEMAP attribute
See Also:
HTMLTag.reconstructTag

setVSpace

public void setVSpace(int attribute)
Sets the HTML Tag VSPACE attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new vspace value
See Also:
HTMLTag.reconstructTag

setWidth

public void setWidth(int attribute)
Sets the HTML Tag WIDTH attribute. Sets the value of the HTMLTag.reconstructTag to true.

Parameters:
attribute - the new width value
See Also:
HTMLTag.reconstructTag

resetTagSpecificInformation

protected void resetTagSpecificInformation()
Description copied from class: HTMLTag
Resets the tag attributes and content of the HTML Tag to their default values. Called by HTMLTag.reset(). This method is not implemented in HTMLTag. Subclasses that contain tag content information should implement this method to set their information to their default values.

Overrides:
resetTagSpecificInformation in class HTMLTag
See Also:
HTMLTag.reset()

writeTagSpecificAttributes

protected void writeTagSpecificAttributes()
Description copied from class: HTMLTag
Adds the tag specific attribute information to the HTML Tag. Called by HTMLTag.toString(). This method is not implemented in HTMLTag. Subclasses that contain additional attribute information should implement this method to write those attributes in the inline tag.

Overrides:
writeTagSpecificAttributes in class HTMLTag
See Also:
HTMLTag.toString()