All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.util.html.ImageFormInput

java.lang.Object
   |
   +----com.ibm.as400.util.html.FormInput
           |
           +----com.ibm.as400.util.html.ImageFormInput

public class ImageFormInput
extends FormInput
implements HTMLConstants
The ImageFormInput class represents a image input type in an HTML form. The trailing slash "/" on the ImageFormInput tag allows it to conform to the XHTML specification.

Here is an example of a ImageFormInput tag:
<input type="image" name="myPicture" src="image.gif" align="top" height="100" width="100" />

ImageFormInput objects generate the following events:


Constructor Index

 o ImageFormInput()
Constructs a default ImageFormInput object.
 o ImageFormInput(String)
Constructs a ImageFormInput object with the specified control name.
 o ImageFormInput(String, String)
Constructs a ImageFormInput object with the specified control name and image source.

Method Index

 o getAlignment()
Returns the alignment of the text following the image.
 o getHeight()
Returns the height of the image in pixels.
 o getSource()
Returns the source URL for the image.
 o getTag()
Returns the tag for the image form input type.
 o getWidth()
Returns the width of the image in pixels.
 o setAlignment(String)
Sets the alignment of the text following the image.
 o setHeight(int)
Sets the height of the image in pixels.
 o setSource(String)
Sets the source URL for the image.
 o setWidth(int)
Sets the width of the image in pixels.

Constructors

 o ImageFormInput
 public ImageFormInput()
Constructs a default ImageFormInput object.

 o ImageFormInput
 public ImageFormInput(String name)
Constructs a ImageFormInput object with the specified control name.

Parameters:
name - The control name of the input field.
 o ImageFormInput
 public ImageFormInput(String name,
                       String source)
Constructs a ImageFormInput object with the specified control name and image source.

Parameters:
name - The control name of the input field.
source - The source URL of the image.

Methods

 o getAlignment
 public String getAlignment()
Returns the alignment of the text following the image.

Returns:
The alignment. One of the following constants defined in HTMLConstants: BASELINE, BOTTOM, ABSBOTTOM, LEFT, RIGHT, MIDDLE, ABSMIDDLE, TOP, or TEXTOP.
See Also:
HTMLConstants
 o getHeight
 public int getHeight()
Returns the height of the image in pixels.

Returns:
The height.
 o getSource
 public String getSource()
Returns the source URL for the image.

Returns:
The URL.
 o getTag
 public String getTag()
Returns the tag for the image form input type.

Returns:
The tag.
Overrides:
getTag in class FormInput
 o getWidth
 public int getWidth()
Returns the width of the image in pixels.

Returns:
The width.
 o setAlignment
 public void setAlignment(String align) throws PropertyVetoException
Sets the alignment of the text following the image. The default alignment is top.

Parameters:
align - The alignment. One of the following constants defined in HTMLConstants: BASELINE, BOTTOM, ABSBOTTOM, LEFT, RIGHT, MIDDLE, ABSMIDDLE, TOP, or TEXTOP.
Throws: PropertyVetoException
If a change is vetoed.
See Also:
HTMLConstants
 o setHeight
 public void setHeight(int height) throws PropertyVetoException
Sets the height of the image in pixels.

Parameters:
height - The height.
Throws: PropertyVetoException
If a change is vetoed.
 o setSource
 public void setSource(String source) throws PropertyVetoException
Sets the source URL for the image.

Parameters:
source - The URL.
Throws: PropertyVetoException
If a change is vetoed.
 o setWidth
 public void setWidth(int width) throws PropertyVetoException
Sets the width of the image in pixels.

Parameters:
width - The width.
Throws: PropertyVetoException
If a change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index