| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuic.widgets.html.HTMLObserverAdapter
public class HTMLObserverAdapter
A default implementation of the HTMLObserver interface.
 All methods in this class are null-ops. Users of this class need only
 override those methods of interest.
HTMLObserver| Constructor Summary | |
|---|---|
HTMLObserverAdapter()
 | 
|
| Method Summary | |
|---|---|
 void | 
formSubmitUpdate(HTMLPane pane,
                 URL docBaseURL,
                 int method,
                 String action,
                 String data)
Notification that a form submission has been initiated.  | 
 void | 
historyUpdate(HTMLPane pane,
              int position)
Notification of a change in position within the Pane's document history.  | 
 void | 
linkActivatedUpdate(HTMLPane pane,
                    URL url,
                    String targetFrame,
                    String jName)
Notification that a hyperlink has been activated via the keyboard or mouse.  | 
 void | 
linkFocusedUpdate(HTMLPane pane,
                  URL url)
Notification that a hyperlink has received or lost keyboard/mouse focus.  | 
 void | 
showNewFrameRequest(HTMLPane pane,
                    String targetFrame,
                    URL url)
Notification for a new HTMLPane to be created with
 the specified top-level frame name and showing the specified document. | 
 void | 
statusUpdate(HTMLPane pane,
             int status,
             URL url,
             int value,
             String message)
Gives general notifications of events or errors which are occuring within the Pane.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public HTMLObserverAdapter()
| Method Detail | 
|---|
public void linkActivatedUpdate(HTMLPane pane,
                                URL url,
                                String targetFrame,
                                String jName)
HTMLObserverURL protocol is 'mailto', which the Pane cannot currently handle.
 If the jname argument is not null the pane will not attempt to follow the link, allowing
 it to be handled here.
linkActivatedUpdate in interface HTMLObserverpane - the HTMLPane which has called this methodurl - the URL of the link that has been activatedtargetFrame - the name of the frame where the contents of the URL are
                    to be displayedjName - A name given to the link so it can be handled outside the calling Pane
public void linkFocusedUpdate(HTMLPane pane,
                              URL url)
HTMLObserverURL
 sent is not null then a new link has now received focus.
 If the URL is null then a link which previously had focus
 has now lost it, and no link is currently focused.
 This method can be used, for example, to update a status display which shows the currently focused link on the user's screen.
linkFocusedUpdate in interface HTMLObserverpane - the HTMLPane which has called this methodurl - the URL of the focused link, or null if no link has the focus
public void statusUpdate(HTMLPane pane,
                         int status,
                         URL url,
                         int value,
                         String message)
HTMLObserverDOC_LENGTH status argument listed below, the value argument sent
 will be the nesting level of the frame initiating this call. A nesting of 0 indicates the
 Pane's top level frame has made the call. Often you will only be interested in calls from the
 top level frame. For example, if a frameset document is loading you may get the DOC_LOADED
 status call several times, but the one that really counts is the frame 0 call, and this is
 never sent until all sub-frames have finished loading.
 The current status arguments sent to this method are:
HTMLConstants.PRE_CONNECTURL to receive data.
 HTMLConstants.PARSE_FAILEDURL or was unable to parse the content.
 Most likely this will be due to an incorrectly specified URL.
 The message argument may contain further details of the reason for failure.
 HTMLConstants.CONNECTEDURL and is receiving any content.
 HTMLConstants.DOC_LENGTHURL is known and is contained
 in the value argument.
 HTMLConstants.TITLEURL is known and is contained
 in the message argument. Only the title of a document in the Pane's top level frame
 will be sent to this method. If the document has no name, the message will be null, unless the
 document is a FrameSet document in which case the message "FrameSet" will be sent.
 HTMLConstants.PARSE_FAILED_POST_CONNECTURL. This will most
 likely be an IOException such as a server time-out.
 HTMLConstants.WAITING_FOR_IMAGESHTMLConstants.DOC_LOADED
statusUpdate in interface HTMLObserverpane - the HTMLPane which has called this methodstatus - the status code of the updateurl - a URL related to the status codevalue - a value related to the status codemessage - a message related to the status code
public void formSubmitUpdate(HTMLPane pane,
                             URL docBaseURL,
                             int method,
                             String action,
                             String data)
HTMLObserverhandleFormSubmission is enabled or
 disabled by the Config object controlling the Pane.
 The method argument will be either HTMLConstants.V_GET, HTMLConstants.V_POST, or HTMLConstants.V_JFORM
 If the argument is V_JFORM then the Pane will take no action, irrespective of whether
 handleFormSubmission is enabled. This allows the programmer to treat this method as
 a pseudo actionListener for controls placed within documents.
 
The data argument sent to this method is an x-www-form-urlencoded concatenated string of the form results gathered from successful form controls.
formSubmitUpdate in interface HTMLObserverpane - the HTMLPane which has called this methoddocBaseURL - the URL of the document containing the form, possibly modified
                   by the <BASE> tagmethod - a code for the form method - GET, POST or JFORMaction - the value of the action attribute (if any) specified in the FORM tagdata - the concatenated, encoded form resultsHTMLConfig.setHandleFormSubmission(boolean)
public void historyUpdate(HTMLPane pane,
                          int position)
HTMLObserver
 if (position == HTMLConstants.AT_HISTORY_MIDDLE) { 
     //...enable both the 'back' and 'forward' buttons 
 } else { 
     if ((position & HTMLConstants.AT_HISTORY_TOP) > 0) { 
         //...disable the 'forward' button  
     } else {  
         //...enable the 'forward' button  
     }  
     if ((position & HTMLConstants.AT_HISTORY_BOTTOM) > 0) {  
         //...disable the 'back' button   
     } else {   
         //...enable the 'back' button   
     }   
 }
 
historyUpdate in interface HTMLObserverpane - the HTMLPane which has called this methodposition - a value denoting the current position within the Pane's history
public void showNewFrameRequest(HTMLPane pane,
                                String targetFrame,
                                URL url)
HTMLObserverHTMLPane to be created with
 the specified top-level frame name and showing the specified document. This method will be only be called if handleNewFrames is disabled in the
 Config object controlling the Pane. The need for a new frame
 occurs when an HTML anchor or other tag specifies that a URL should be displayed in a
 frame which has a name unknown to the Pane, or when the reserved HTML name "_blank" is
 specified.
showNewFrameRequest in interface HTMLObserverpane - the HTMLPane which has called this methodtargetFrame - the name to be given to the top-level frame of the new Pane,
                    or null if no name has been specifiedurl - the URL of the document to be displayed in the new PaneHTMLConfig.setHandleNewFrames(boolean)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||