websphinx
Class FormButton
java.lang.Object
|
+--websphinx.Region
|
+--websphinx.Element
|
+--websphinx.Link
|
+--websphinx.FormButton
- All Implemented Interfaces:
- websphinx.util.Prioritized
- public class FormButton
- extends Link
Button element in an HTML form -- for example, <INPUT TYPE=submit> or <INPUT TYPE=image>.
- See Also:
Page
,
Link
Constructor Summary |
FormButton(websphinx.Tag startTag,
websphinx.Tag endTag,
websphinx.Form form)
Make a LinkElement from a start tag and end tag and its containing form. |
Method Summary |
websphinx.Form |
getForm()
Get the form. |
int |
getMethod()
Get the method used to access this link. |
java.net.URL |
getURL()
Get the URL. |
protected java.net.URL |
urlFromHref(websphinx.Tag tag,
java.net.URL base)
Construct the URL for this button, from its start tag and a base URL (for relative references). |
Methods inherited from class websphinx.Link |
discardContent, disconnect, FileToURL, getDepth, getDirectory, getDirectoryURL, getDirectoryURL, getDownloadParameters, getFile, getFilename, getHost, getPage, getPageURL, getPageURL, getParentURL, getParentURL, getPort, getPriority, getProtocol, getQuery, getRef, getServiceURL, getServiceURL, getStatus, relativeTo, relativeTo, replaceHref, setDepth, setDownloadParameters, setPage, setPriority, setStatus, setText, toDescription, toText, toURL, toURLDelimiters, URLToFile |
Methods inherited from class websphinx.Element |
enumerateHTMLAttributes, getChild, getEndTag, getHTMLAttribute, getHTMLAttribute, getNext, getParent, getSibling, getStartTag, getTagName, hasHTMLAttribute |
Methods inherited from class websphinx.Region |
enumerateObjectLabels, findEnd, findStart, getEnd, getField, getFields, getLabel, getLabel, getLength, getNumericLabel, getObjectLabel, getObjectLabels, getRootElement, getSource, getStart, hasAllLabels, hasAllLabels, hasAnyLabels, hasAnyLabels, hasLabel, removeLabel, setField, setFields, setLabel, setLabel, setObjectLabel, span, toHTML, toString, toTags |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FormButton
public FormButton(websphinx.Tag startTag,
websphinx.Tag endTag,
websphinx.Form form)
throws java.net.MalformedURLException
- Make a LinkElement from a start tag and end tag and its containing form.
The tags and form must be on the same page.
- Parameters:
startTag
- Start tag of buttonendTag
- End tag of button (or null if none)form
- Form containing this button
getURL
public java.net.URL getURL()
- Get the URL.
- Overrides:
getURL
in class Link
- Returns:
- the URL of the link
getForm
public websphinx.Form getForm()
- Get the form.
- Returns:
- the form containing this button
getMethod
public int getMethod()
- Get the method used to access this link.
- Overrides:
getMethod
in class Link
- Returns:
- GET or POST.
urlFromHref
protected java.net.URL urlFromHref(websphinx.Tag tag,
java.net.URL base)
throws java.net.MalformedURLException
- Construct the URL for this button, from its start tag and a base URL (for relative references).
- Overrides:
urlFromHref
in class Link
- Parameters:
tag
- Start tag of button, such as <INPUT TYPE=submit>.base
- Base URL used for relative references
- Returns:
- URL to which the button points
java.net.MalformedURLException