Package | com.yworks.remote |
Class | public class LoadHandler |
Inheritance | LoadHandler AbstractFileReadHandler flash.events.EventDispatcher |
This implementation delegates the work to a flash.net.FileReference
.
For a server-based read handler see class UploadHandler
See also
Method | Defined By | ||
---|---|---|---|
LoadHandler(roundtripHandler:RoundtripHandler = null)
Create a new instance. | LoadHandler | ||
Opens the file browser to load a file. | LoadHandler |
Method | Defined By | ||
---|---|---|---|
Create the GraphMLIOHandler instance that will be used for graph deserialization. | AbstractFileReadHandler | ||
dispatchXMLResult(result:XML):void
Dispatches a XMLResultEvent containing the received XML data. | AbstractFileReadHandler | ||
handleResult(result:XML):void
Updates the graph with the new GraphML
Has to be called after the upload is complete and the response is received. | AbstractFileReadHandler | ||
onCancel(event:Event):void
Called when the user chose the cancel button of the upload dialog. | AbstractFileReadHandler | ||
onComplete(event:Event):void [override]
Called after the load is complete and the response is received. | LoadHandler | ||
onHTTPStatus(evt:HTTPStatusEvent):void
Called when the server sends a HTTP status. | AbstractFileReadHandler | ||
onIOError(evt:IOErrorEvent):void
Called when an IO error occurs while executing the file download. | AbstractFileReadHandler | ||
onSecurityError(evt:SecurityErrorEvent):void
Called when a security error occurs while executing the file download. | AbstractFileReadHandler | ||
onSelected(event:Event):void [override]
Called when a file is chosen to load from the FileChooser. | LoadHandler | ||
onUploadComplete(event:DataEvent):void
Called after the upload is complete and the response is received. | AbstractFileReadHandler | ||
openDialog(graph:IGraph = null, defaultFileName:String = null):void
Opens the file dialog. | AbstractFileReadHandler |
LoadHandler | () | Constructor |
public function LoadHandler(roundtripHandler:RoundtripHandler = null)
Create a new instance.
ParametersroundtripHandler:RoundtripHandler (default = null ) — The roundtrip handler to receive the inputIOHandler from.
If none is provided a new DefaultGraphMLIOHandler is created.
|
load | () | method |
public function load(graph:IGraph = null, defaultFileName:String = null):void
Opens the file browser to load a file.
Event handling can be customized by overriding the various protected event handler functions.
Parameters
graph:IGraph (default = null ) — The graph instance in which the file contents will be stored. If no graph is passed,
the roundtripHandler will be used to store the graph to. Note, that in this
case, the roundtripHandler has to be properly initialized.
| |
defaultFileName:String (default = null ) — The default file name to be shown in the browser's download dialog.
|
See also
onComplete | () | method |
override protected function onComplete(event:Event):void
Called after the load is complete and the response is received.
Parameters
event:Event |
onSelected | () | method |
override protected function onSelected(event:Event):void
Called when a file is chosen to load from the FileChooser.
Starts the load process.
Parameters
event:Event |