Package | com.yworks.remote |
Class | public class AbstractFileWriteHandler |
Inheritance | AbstractFileWriteHandler flash.events.EventDispatcher |
Subclasses | DownloadHandler, SaveHandler |
DownloadHandler
and
SaveHandler
.
See also
Property | Defined By | ||
---|---|---|---|
fileName : String [read-only]
The name of the last successfully downloaded file. | AbstractFileWriteHandler | ||
outputIOHandler : GraphMLIOHandler
Get or set the GraphMLIOHandler instance that will be used for graph serialization. | AbstractFileWriteHandler |
Property | Defined By | ||
---|---|---|---|
fileReference : FileReference
The FileReference which handles the file operations. | AbstractFileWriteHandler |
Method | Defined By | ||
---|---|---|---|
AbstractFileWriteHandler(roundtripHandler:RoundtripHandler = null)
Create a new instance. | AbstractFileWriteHandler |
Method | Defined By | ||
---|---|---|---|
createFileReference():FileReference
Creates a new FileReference and sets the fileReference
property. | AbstractFileWriteHandler | ||
createGraphML(graph:IGraph):XML
Create the GraphML representation of the given graph. | AbstractFileWriteHandler | ||
Create the GraphMLIOHandler instance that will be used for graph serialization. | AbstractFileWriteHandler | ||
onCancel(evt:Event):void
Called when the user cancels the download using the file chooser's cancel button. | AbstractFileWriteHandler | ||
onComplete(evt:Event):void
Called when the download operation has finished successfully. | AbstractFileWriteHandler | ||
onHTTPStatus(evt:HTTPStatusEvent):void
Called when the server sends a HTTP status. | AbstractFileWriteHandler | ||
onIOError(evt:IOErrorEvent):void
Called when an IO error occurs while executing the file download. | AbstractFileWriteHandler | ||
onProgress(evt:ProgressEvent):void
Dispatched periodically during the file upload or download operation. | AbstractFileWriteHandler | ||
onSecurityError(evt:SecurityErrorEvent):void
Called when a security error occurs while executing the file download. | AbstractFileWriteHandler | ||
onSelect(evt:Event):void
Called when the user has selected a location for the file download. | AbstractFileWriteHandler |
fileName | property |
fileName:String
[read-only] The name of the last successfully downloaded file.
public function get fileName():String
fileReference | property |
fileReference:FileReference
The FileReference which handles the file operations.
protected function get fileReference():FileReference
protected function set fileReference(value:FileReference):void
outputIOHandler | property |
outputIOHandler:GraphMLIOHandler
Get or set the GraphMLIOHandler
instance that will be used for graph serialization.
public function get outputIOHandler():GraphMLIOHandler
public function set outputIOHandler(value:GraphMLIOHandler):void
See also
AbstractFileWriteHandler | () | Constructor |
public function AbstractFileWriteHandler(roundtripHandler:RoundtripHandler = null)
Create a new instance.
ParametersroundtripHandler:RoundtripHandler (default = null ) — The roundtrip handler to receive the outputIOHandler from.
If none is provided a new DefaultGraphMLIOHandler will manage the
GraphML parsing.
|
See also
createFileReference | () | method |
protected function createFileReference():FileReference
Creates a new FileReference
and sets the fileReference
property.
This method registers all event listeners to the appropriate callbacks and thus should be used to create the file reference in a save or upload method.
ReturnsFileReference — A file reference instance.
|
createGraphML | () | method |
protected function createGraphML(graph:IGraph):XML
Create the GraphML representation of the given graph.
Parameters
graph:IGraph — The graph to be serialized
|
XML — The GraphML as XML
|
See also
createOutputIOHandler | () | method |
protected function createOutputIOHandler():GraphMLIOHandler
Create the GraphMLIOHandler
instance that will be used for graph serialization.
This implementation uses the RoundtripHandler
that has been passed to the constructor and
returns its output io handler. If no RoundtripHandler
was provided, a new
DefaultGraphMLIOHandler
is returned.
GraphMLIOHandler — the GraphMLIOHandler instance created.
|
See also
onCancel | () | method |
protected function onCancel(evt:Event):void
Called when the user cancels the download using the file chooser's cancel button.
Flash Player does not dispatch this event if the user cancels an upload or download through other means (closing the browser or stopping the current application).
This implementation does nothing.
Parameters
evt:Event |
onComplete | () | method |
protected function onComplete(evt:Event):void
Called when the download operation has finished successfully.
This implementation removes the busy cursor.
Parameters
evt:Event |
onHTTPStatus | () | method |
protected function onHTTPStatus(evt:HTTPStatusEvent):void
Called when the server sends a HTTP status.
This implementation is empty.
Parameters
evt:HTTPStatusEvent |
onIOError | () | method |
protected function onIOError(evt:IOErrorEvent):void
Called when an IO error occurs while executing the file download.
This implementation shows an alert message, traces the event and removes the busy cursor.
Parameters
evt:IOErrorEvent |
onProgress | () | method |
protected function onProgress(evt:ProgressEvent):void
Dispatched periodically during the file upload or download operation.
The progress event is dispatched while Flash Player transmits bytes to a server, and it is periodically dispatched during the transmission, even if the transmission is ultimately not successful. To determine if and when the file transmission is actually successful and complete, listen for the complete event.
In some cases, progress events are not received. For example, when the file being transmitted is very small or the upload or download happens very quickly a progress event might not be dispatched.
This implementation does nothing.
Parameters
evt:ProgressEvent |
onSecurityError | () | method |
protected function onSecurityError(evt:SecurityErrorEvent):void
Called when a security error occurs while executing the file download.
This implementation shows an alert message, traces the event and removes the busy cursor.
Parameters
evt:SecurityErrorEvent |
onSelect | () | method |
protected function onSelect(evt:Event):void
Called when the user has selected a location for the file download.
This implementation sets the busy cursor.
Parameters
evt:Event |