websphinx
Class FormButton

java.lang.Object
  |
  +--websphinx.Region
        |
        +--websphinx.Element
              |
              +--websphinx.Link
                    |
                    +--websphinx.FormButton
All Implemented Interfaces:
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

Field Summary
 
Fields inherited from class websphinx.Link
GET, POST, url
 
Fields inherited from class websphinx.Element
child, endTag, parent, sibling, startTag
 
Fields inherited from class websphinx.Region
end, names, source, start, TRUE
 
Constructor Summary
FormButton(Tag startTag, Tag endTag, Form form)
          Make a LinkElement from a start tag and end tag and its containing form.
 
Method Summary
 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(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, 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
 

Constructor Detail

FormButton

public FormButton(Tag startTag,
                  Tag endTag,
                  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 button
endTag - End tag of button (or null if none)
form - Form containing this button
Method Detail

getURL

public java.net.URL getURL()
Get the URL.

Overrides:
getURL in class Link
Returns:
the URL of the link

getForm

public 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(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