com.ibm.as400.util.html
Class ImageFormInput
- java.lang.Object
-
- com.ibm.as400.util.html.HTMLTagAttributes
-
- com.ibm.as400.util.html.FormInput
-
- com.ibm.as400.util.html.ImageFormInput
-
- All Implemented Interfaces:
- HTMLConstants, HTMLTagElement, java.io.Serializable
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:
- PropertyChangeEvent
- VetoableChangeEvent
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.as400.util.html.HTMLConstants
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CAPITALS, CENTER, CIRCLE, DISC, JUSTIFY, LARGE_ROMAN, LEFT, LOWER_CASE, LTR, MIDDLE, NUMBERS, RIGHT, RTL, SMALL_ROMAN, SQUARE, TARGET_BLANK, TARGET_PARENT, TARGET_SELF, TARGET_TOP, TEXTTOP, TOP
-
-
Constructor Summary
Constructors Constructor and Description ImageFormInput()
Constructs a default ImageFormInput object.ImageFormInput(java.lang.String name)
Constructs a ImageFormInput object with the specified control name.ImageFormInput(java.lang.String name, java.lang.String source)
Constructs a ImageFormInput object with the specified control name and image source.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getAlignment()
Returns the alignment of the text following the image.java.lang.String
getFOTag()
Returns a comment tag.int
getHeight()
Returns the height of the image in pixels.java.lang.String
getSource()
Returns the source URL for the image.java.lang.String
getTag()
Returns the tag for the image form input type.int
getWidth()
Returns the width of the image in pixels.void
setAlignment(java.lang.String align)
Sets the alignment of the text following the image.void
setHeight(int height)
Sets the height of the image in pixels.void
setSource(java.lang.String source)
Sets the source URL for the image.void
setWidth(int width)
Sets the width of the image in pixels.-
Methods inherited from class com.ibm.as400.util.html.FormInput
addVetoableChangeListener, getDirection, getLanguage, getName, getSize, getValue, removeVetoableChangeListener, setDirection, setLanguage, setName, setSize, setValue, toString
-
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
-
-
-
-
Constructor Detail
-
ImageFormInput
public ImageFormInput()
Constructs a default ImageFormInput object.
-
ImageFormInput
public ImageFormInput(java.lang.String name)
Constructs a ImageFormInput object with the specified control name.- Parameters:
name
- The control name of the input field.
-
ImageFormInput
public ImageFormInput(java.lang.String name, java.lang.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.
-
-
Method Detail
-
getAlignment
public java.lang.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
-
getHeight
public int getHeight()
Returns the height of the image in pixels.- Returns:
- The height.
-
getSource
public java.lang.String getSource()
Returns the source URL for the image.- Returns:
- The URL.
-
getFOTag
public java.lang.String getFOTag()
Returns a comment tag. This method should not be called. There is no XSL-FO support for this class.- Specified by:
getFOTag
in interfaceHTMLTagElement
- Returns:
- The comment tag.
-
getTag
public java.lang.String getTag()
Returns the tag for the image form input type.- Specified by:
getTag
in interfaceHTMLTagElement
- Returns:
- The tag.
-
getWidth
public int getWidth()
Returns the width of the image in pixels.- Returns:
- The width.
-
setAlignment
public void setAlignment(java.lang.String align) throws java.beans.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:
java.beans.PropertyVetoException
- If a change is vetoed.- See Also:
HTMLConstants
-
setHeight
public void setHeight(int height) throws java.beans.PropertyVetoException
Sets the height of the image in pixels.- Parameters:
height
- The height.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setSource
public void setSource(java.lang.String source) throws java.beans.PropertyVetoException
Sets the source URL for the image.- Parameters:
source
- The URL.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setWidth
public void setWidth(int width) throws java.beans.PropertyVetoException
Sets the width of the image in pixels.- Parameters:
width
- The width.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
-