org.apache.struts.util

Class ImageButtonBean

Implemented Interfaces:
Serializable

public class ImageButtonBean
extends java.lang.Object
implements Serializable

A simple JavaBean to encapsulate the request parameters sent for an HTML input element of type image. Such an element causes two parameters to be sent, one each for the X and Y coordinates of the button press. An instance of this bean within an ActionForm can be used to capture these and provide a simple means of detecting whether or not the corresponding image was selected.
Version:
$Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary

private String
x
The X coordinate of the button press.
private String
y
The Y coordinate of the button press.

Constructor Summary

ImageButtonBean()
Construct an instance with empty property values.
ImageButtonBean(String x, String y)
Construct an instance with the supplied property values.

Method Summary

String
getX()
String
getY()
boolean
isSelected()
A convenience method to determine whether or not the corresponding image element was selected.
void
setX(String x)
void
setY(String y)
String
toString()
Return a string representation of this object.

Field Details

x

private String x
The X coordinate of the button press.

y

private String y
The Y coordinate of the button press.

Constructor Details

ImageButtonBean

public ImageButtonBean()
Construct an instance with empty property values.

ImageButtonBean

public ImageButtonBean(String x,
                       String y)
Construct an instance with the supplied property values.
Parameters:
x - The X coordinate of the button press.
y - The Y coordinate of the button press.

Method Details

getX

public String getX()

getY

public String getY()

isSelected

public boolean isSelected()
A convenience method to determine whether or not the corresponding image element was selected.

setX

public void setX(String x)

setY

public void setY(String y)

toString

public String toString()
Return a string representation of this object.

Copyright B) 2000-2007 - The Apache Software Foundation