org.apache.struts.util
Class ImageButtonBean

java.lang.Object
  extended by org.apache.struts.util.ImageButtonBean
All Implemented Interfaces:
Serializable

public class ImageButtonBean
extends 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: 471754 $ $Date: 2005-05-07 12:11:38 -0400 (Sat, 07 May 2005) $
See Also:
Serialized Form

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

getX

public String getX()

setX

public void setX(String x)

getY

public String getY()

setY

public void setY(String y)

isSelected

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


toString

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

Overrides:
toString in class Object


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.