All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.html.Button
java.lang.Object
|
+----sdsu.html.Button
- public class Button
- extends Object
- implements HTML
Creates input buttons for use in an HTML form. Documentation for button types comes
in part from
Web pages by Arnoud "Galactus" Engelfriet galactus@html.com. See
http://www.htmlhelp.com/
Use static methods Button.checkBox(...), Button.radio(...), Button.submit(...)
Button.reset(...), Button.hidden(...) to create instances of this class.
- Version:
- 0.8 8 April 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
-
checkBox(String, String)
- Returns a checkbox.
-
hidden(String, String)
- Allows you to embed information in the form which you do
not want changed.
-
makeSelected()
- Use on radio buttons and check boxes.
-
radio(String, String)
- Produces a radio button.
-
reset(String)
- Produces a button, which will restore the form to
its original state if pressed.
-
submit(String)
- Produces a button, which when pressed sends the contents of
the form to the server.
-
toString()
- Returns the html button tags in a string for use in a html page
checkBox
public static Button checkBox(String name,
String value)
- Returns a checkbox. Here is an example:
radio
public static Button radio(String name,
String value)
- Produces a radio button. A radio button always exists in a group.
All members of this group should have the
same NAME attribute, and different VALUEs. The VALUE of the selected
radio button will be sent to the
server. You can specify CHECKED on one radio button,
which then will come up selected initially.
An example:
submit
public static Button submit(String value)
- Produces a button, which when pressed sends the contents of
the form to the server. You can have more than
one submit button in the form. Each should have a different NAME.
The name and value of the pressed button
will be sent to the server as well. The value of the VALUE attribute is
typically used as text on the submit button.
An example:
reset
public static Button reset(String value)
- Produces a button, which will restore the form to
its original state if pressed. The value of the VALUE
attribute is typically used as text on the reset button.
An example:
hidden
public static Button hidden(String name,
String value)
- Allows you to embed information in the form which you do
not want changed. This can be useful if the
document is generated by a script and you need to store
state information. NAME and VALUE of this input
field will be sent to the server without modifications.
- Parameters:
- name - name of button created, plain text only
- value - value submitted with form, plain text only
makeSelected
public void makeSelected()
- Use on radio buttons and check boxes. This will make the button (box) appear
selected when form is displayed. Only one radio button can be selected
toString
public String toString()
- Returns the html button tags in a string for use in a html page
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index