FileDocCategorySizeDatePackage
UpdateAdapter.javaAPI DocphoneME MR2 API (J2ME)5316Wed May 02 18:00:34 BST 2007com.sun.perseus.model

UpdateAdapter

public class UpdateAdapter extends Object implements UpdateListener
A simple UpdateListener implementation which can check whether or not the document loading succeeded.
version
$Id: UpdateAdapter.java,v 1.5 2006/04/21 06:39:49 st125089 Exp $

Fields Summary
protected boolean
loadComplete
Set to true if the load complete method is called Set to false when loadStarting is called.
protected boolean
loadingFailed
Set to true if the loadingFailed method is called. Set to false when loadStarting is called
protected boolean
loadStarting
Set to true if the loadStarting method is called
protected Exception
loadingFailedException
The last recorded loadingFailed exception
Constructors Summary
Methods Summary
public java.lang.ExceptiongetLoadingFailedException()

return
the last loadingFailed exception

        return loadingFailedException;
    
public booleanhasLoadingFailed()

return
true if the loading has failed.

        return loadingFailed;
    
public voidloadBegun(ModelNode node)
Invoked when the input node has started loading

param
node the ModelNode for which loading has started.

    
public voidloadComplete(ModelNode node)
Invoked when the node has finished loading.

param
node the node for which loading is complete.

        if (node instanceof DocumentNode) {
            loadComplete = true;
        }
    
public voidloadStarting(DocumentNode documentNode, java.io.InputStream is)
Invoked when the document starts loading

param
documentNode the DocumentNode for which loading is starting
param
is the InputStream from which SVG content is loaded.

        loadStarting = true;
        loadingFailed = false;
        loadComplete = false;
    
public booleanloadSuccess()

return
true if a document loading started and then failed

        System.err.println(">>>>>>>>>>>> loadStarting : " + loadStarting);
        System.err.println(">>>>>>>>>>>> loadComplete : " + loadComplete);
        System.err.println(">>>>>>>>>>>> loadingFailed: " + loadingFailed);

        return loadStarting && loadComplete && !loadingFailed;
    
public voidloadingFailed(DocumentNode documentNode, java.lang.Exception error)
Invoked when a document error happened before finishing loading.

param
documentNode the DocumentNode for which loading has failed.
param
error the exception which describes the reason why loading failed.

        loadingFailed = true;
        loadingFailedException = error;
    
public voidmodifiedNode(ModelNode node)
Invoked when a node was just modified

param
node the node which was modified

    
public voidmodifyingNode(ModelNode node)
Invoked when a node is about to be modified

param
node the node which is about to be modified

    
public voidmodifyingNodeRendering(ModelNode node)
Invoked when a node's rendering is about to be modified

param
node the node which is about to be modified


                             
        
    
public voidnodeInserted(ModelNode node)
Invoked when a node has been inserted into the tree

param
node the newly inserted node

    
public voidtextInserted(ModelNode node)
Invoked when a string has been appended, during a load phase. This is only used when parsing a document and is used in support of progressive download, like the other loadXXX methods.

param
node the ModelNode on which text has been inserted.