|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.raj.htmlForms.HtmlFormElement
|
+--com.raj.htmlForms.HtmlInput
|
+--com.raj.htmlForms.HtmlButtons
|
+--com.raj.htmlForms.HtmlImageButton
This class represents the <input type="image"> HTML button.
This class (HtmlImageButton.java) is part of the com.raj.htmlForms package that
automatically generates HTML forms programmatically.
CREATED 26-FEB-2002, Copyright (c) Rajnish Bhaskar 2002
| Field Summary |
| Fields inherited from class com.raj.htmlForms.HtmlFormElement |
isXHTML, out |
| Constructor Summary | |
HtmlImageButton(java.io.Writer w)
Minimal constructor for any form element. |
|
HtmlImageButton(java.io.Writer w,
boolean x,
java.lang.String n)
Constructor that sets the writer and name and a boolean which determines whether or not XHTML will be written |
|
HtmlImageButton(java.io.Writer w,
java.lang.String n)
Constructor that sets the name of the image button |
|
HtmlImageButton(java.io.Writer w,
java.lang.String n,
java.lang.String s)
Constructor that sets the name and text of the reset button |
|
| Method Summary | |
java.lang.String |
getAlign()
gets the src of this input element |
java.lang.String |
getAlt()
gets the alternate text of this input element |
java.lang.String |
getIsmap()
if this object is a server side imagemap, this is returned, else the empty string |
java.lang.String |
getSrc()
gets the src of this input element |
java.lang.String |
getUsemap()
gets the name of an imagemap that applies to this input element |
void |
reset()
resets all attributes of the element back to a blank state |
void |
setAlign(java.lang.String x)
sets the alignment of this input element |
void |
setAlt(java.lang.String x)
sets the alternate text of this input element |
void |
setIsmap(boolean x)
tells the server that this image is an imagemap |
void |
setSrc(java.lang.String x)
sets the src of this input element |
void |
setUsemap(java.lang.String x)
sets the name of an imagemap that applies to this input element |
java.lang.String |
toString()
Writes the attributes of this object to a string and returns them. |
void |
write()
writes an HTML image button to the given writer |
| Methods inherited from class com.raj.htmlForms.HtmlInput |
getAccessKey, getDisabled, getReadOnly, getSize, getValue, isDisabled, setAccessKey, setReadOnly, setSize, setValue |
| Methods inherited from class com.raj.htmlForms.HtmlFormElement |
getDir, getId, getLang, getName, getOnBlur, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getTabIndex, getTheClass, getTitle, getXhtml, setDir, setId, setLang, setName, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyle, setTabIndex, setTheClass, setTitle, setXhtml |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HtmlImageButton(java.io.Writer w)
foo becomes setFoo(). The attribute names can be
found at the W3C HTML reference or many other places on the web.
w - the Writer to which all the data will be written out
public HtmlImageButton(java.io.Writer w,
boolean x,
java.lang.String n)
w - the Writer to which all the data will be written outx - if true, XHTML will be written, else falsen - the name of this element
public HtmlImageButton(java.io.Writer w,
java.lang.String n)
w - the Writer to which all the data will be written outn - the name of this control
public HtmlImageButton(java.io.Writer w,
java.lang.String n,
java.lang.String s)
w - the Writer to which all the data will be written outn - the name of this element| Method Detail |
public void setSrc(java.lang.String x)
public java.lang.String getSrc()
public void setAlt(java.lang.String x)
public java.lang.String getAlt()
public void setAlign(java.lang.String x)
public java.lang.String getAlign()
public void setUsemap(java.lang.String x)
public java.lang.String getUsemap()
public void setIsmap(boolean x)
public java.lang.String getIsmap()
public void reset()
HtmlFormElement
reset in class HtmlInputpublic java.lang.String toString()
HtmlFormElement
The toString() method should logically return a string representing the attributes
of the HTML element, eg if you set the name, title and style of the element then you should return a
string containing:
name="myName" title="some title" style="foo: xxx; bar: yyy;"
The responsibility for turning this into a form deliverable to a user agent belongs to
the write() method.
toString in class HtmlInputHtmlFormElement.write()public void write()
write in class HtmlFormElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||