PAJES 3.0.21

org.pajes.html
Class SubmitImage

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Input
          extended by org.pajes.html.Submit
              extended by org.pajes.html.SubmitImage
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML

public class SubmitImage
extends Submit

This class creates a Submit image on the form. Extended functionality allows an input field on the form to be populated when the user clicks the image.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pajes.html.Input
TYPE_ATTRIBUTE
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
SubmitImage(Form form, java.lang.String name, java.lang.String imageSource)
          Generate a Submit image for the form.
SubmitImage(Form form, java.lang.String name, java.lang.String imageSource, boolean disableOnClickValidation)
          Generate a Submit image for the form.
SubmitImage(Form form, java.lang.String name, java.lang.String imageSource, InputHidden hiddenField)
          Generate a Submit image for the form.
SubmitImage(Form form, java.lang.String name, java.lang.String imageSource, InputHidden hiddenField, java.lang.String fieldValue)
          Generate a Submit image for the form.
 
Method Summary
 java.lang.String getAlignment()
          Gets the alignment of the image with respect to other text and images.
 java.lang.String getAlternateText()
          Gets the alternate text to be displayed before the image is loaded.
 java.lang.Integer getBorderWidth()
          Gets the width of the border around the image.
 java.lang.String getHeight()
          Gets the height of the image.
 java.lang.String getImageMapToUse()
          Returns the client-side image map that will define the coordinates and related hyperlinks.
 java.lang.String getImageSource()
          Gets the source attribute of this image.
 SubmitImage setAlignment(java.lang.String alignment)
          Sets the alignment of the image with respect to other text and images.
 SubmitImage setAlternateText(java.lang.String alternateText)
          Sets the alternate text to be displayed before the image is loaded.
protected  void setAttribute(TagAttribute attribute)
          Adds the specified attribute.
 SubmitImage setBorderWidth(int borderWidth)
          Sets the width of the border around the image.
 SubmitImage setHeight(java.lang.String height)
          Sets the height of the image.
 SubmitImage setImageMapToUse(java.lang.String map)
          Specifies the client-side image map that will define the coordinates and related hyperlinks.
 SubmitImage setImageSource(java.lang.String imageSource)
          Sets the source attribute of this image.
 SubmitImage setWidth(java.lang.String width)
          Sets the width of the image.
 
Methods inherited from class org.pajes.html.Submit
getHiddenField, getHiddenFieldValue, getInactiveText, isActive, isOnChangeCheckingDisabled, isOnClickValidationDisabled, setActive, setChanged, setCheckForChangedFields, setCheckForChangedFieldsConfirmation, setHiddenField, setInactiveText, setInactiveText, setOnClickValidation, setSubmitConfirmation, write, writeSubmitJavaScript, writeTag
 
Methods inherited from class org.pajes.html.Input
addClientValidation, addContent, clone, getClientValidation, getClientValidation, getDOMReference, getFieldNameForErrorMessage, getForm, getInstance, getLabel, getName, getOnBlurHandler, getOnChangeHandler, getOnFocusHandler, getOnSelectHandler, getReadOnlyStyleSheetClass, getTabIndex, getType, getValue, isChangeFlagEnabled, isDisabled, isReadOnly, isRequiringValidation, logNoFormWarning, removeClientValidation, removeClientValidation, removeClientValidation, removeMandatoryClientValidation, setChangedFlag, setContent, setDisabled, setFieldNameInErrorMessage, setFieldNameInErrorMessage, setForm, setId, setLabel, setName, setOnBlurHandler, setOnBlurValidation, setOnChangeHandler, setOnClickHandler, setOnFocusHandler, setOnSelectHandler, setReadOnly, setReadOnlyStyleSheetClass, setTabIndex, setTabIndex, setTabIndex, setValue
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString, writeContent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubmitImage

public SubmitImage(Form form,
                   java.lang.String name,
                   java.lang.String imageSource)
Generate a Submit image for the form.

Parameters:
form - the form which is to be submitted.
name - the name of the image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"

SubmitImage

public SubmitImage(Form form,
                   java.lang.String name,
                   java.lang.String imageSource,
                   boolean disableOnClickValidation)
Generate a Submit image for the form.

Parameters:
form - the form which is to be submitted.
name - the name of the image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
disableOnClickValidation - if true, suppresses the onClick validation.

SubmitImage

public SubmitImage(Form form,
                   java.lang.String name,
                   java.lang.String imageSource,
                   InputHidden hiddenField)
Generate a Submit image for the form. When the image is clicked, the specified hidden field will be updated with the the name of the image pushed.

Parameters:
form - the form which is to be submitted.
name - the name of the image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
hiddenField - the hidden field input element whish will be updated when the image is clicked.

SubmitImage

public SubmitImage(Form form,
                   java.lang.String name,
                   java.lang.String imageSource,
                   InputHidden hiddenField,
                   java.lang.String fieldValue)
Generate a Submit image for the form. When the image is clicked, the specified hidden field will be updated with the the name of the image pushed.

Parameters:
form - the form which is to be submitted.
name - the name of the image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
hiddenField - the hidden field input element whish will be updated when the image is clicked.
fieldValue - the value to set in the hidden field.
Method Detail

getAlignment

public java.lang.String getAlignment()
Gets the alignment of the image with respect to other text and images.

Returns:
the alignment of the image.

getAlternateText

public java.lang.String getAlternateText()
Gets the alternate text to be displayed before the image is loaded. In some browsers, this text will also appear as a "tool tip" when the mouse cursor passes over the image.

Returns:
the text displayed before the image is loaded.

getBorderWidth

public java.lang.Integer getBorderWidth()
Gets the width of the border around the image.

Returns:
the width of the border around the image, or null if it has not been defined.

getHeight

public java.lang.String getHeight()
Gets the height of the image.

Returns:
the height of the image in pixels or a percent.

getImageMapToUse

public java.lang.String getImageMapToUse()
Returns the client-side image map that will define the coordinates and related hyperlinks.

Returns:
the image map that defines the coordinates and related hyperlinks.

getImageSource

public java.lang.String getImageSource()
Gets the source attribute of this image.

Returns:
the source URL of the image. Eg. "images/picture.jpg"

setAlignment

public SubmitImage setAlignment(java.lang.String alignment)
Sets the alignment of the image with respect to other text and images.

Parameters:
alignment - the alignment of the image.
Returns:
the modified SubmitImage object.

setAlternateText

public SubmitImage setAlternateText(java.lang.String alternateText)
Sets the alternate text to be displayed before the image is loaded. In some browsers, this text will also appear as a "tool tip" when the mouse cursor passes over the image.

Parameters:
alternateText - the text displayed before the image is loaded.
Returns:
the modified SubmitImage object.

setBorderWidth

public SubmitImage setBorderWidth(int borderWidth)
Sets the width of the border around the image.

Parameters:
borderWidth - the width of the border around the image.
Returns:
the modified SubmitImage object.

setHeight

public SubmitImage setHeight(java.lang.String height)
Sets the height of the image.

Parameters:
height - the height of the image in pixels or a percent.
Returns:
the modified SubmitImage object.

setImageMapToUse

public SubmitImage setImageMapToUse(java.lang.String map)
Specifies the client-side image map that will define the coordinates and related hyperlinks.

Parameters:
map - the image map that defines the coordinates and related hyperlinks.
Returns:
the modified SubmitImage object.

setImageSource

public SubmitImage setImageSource(java.lang.String imageSource)
Sets the source attribute of this image.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
Returns:
the modified SubmitImage object.

setWidth

public SubmitImage setWidth(java.lang.String width)
Sets the width of the image.

Parameters:
width - the width of the image in pixels or a percent.
Returns:
the modified SubmitImage object.

setAttribute

protected void setAttribute(TagAttribute attribute)
Description copied from class: Tag
Adds the specified attribute.

Overrides:
setAttribute in class Tag
Parameters:
attribute - The attribute.
See Also:
Tag.setAttribute(org.pajes.html.TagAttribute)

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.