org.apache.struts.util
Class ImageButtonBean
java.lang.Object
|
+--org.apache.struts.util.ImageButtonBean
- All Implemented Interfaces:
- java.io.Serializable
- public class ImageButtonBean
- extends java.lang.Object
- implements java.io.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) $
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
x
The X coordinate of the button press. |
private java.lang.String |
y
The Y coordinate of the button press. |
Constructor Summary |
ImageButtonBean()
Construct an instance with empty property values. |
ImageButtonBean(java.lang.String x,
java.lang.String y)
Construct an instance with the supplied property values. |
Method Summary |
java.lang.String |
getX()
|
java.lang.String |
getY()
|
boolean |
isSelected()
A convenience method to determine whether or not the corresponding image
element was selected. |
void |
setX(java.lang.String x)
|
void |
setY(java.lang.String y)
|
java.lang.String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
x
private java.lang.String x
- The X coordinate of the button press.
y
private java.lang.String y
- The Y coordinate of the button press.
ImageButtonBean
public ImageButtonBean()
- Construct an instance with empty property values.
ImageButtonBean
public ImageButtonBean(java.lang.String x,
java.lang.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.
getX
public java.lang.String getX()
setX
public void setX(java.lang.String x)
getY
public java.lang.String getY()
setY
public void setY(java.lang.String y)
isSelected
public boolean isSelected()
- A convenience method to determine whether or not the corresponding image
element was selected.
toString
public java.lang.String toString()
- Return a string representation of this object.
- Overrides:
toString
in class java.lang.Object
Copyright © 2000-2005 - The Apache Software Foundation