Abstract base class for realizerserializers that can read and/or write edge graphics information written/to be parsed by yFiles Java
public function canRead(node:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context.
Parameters
Returns
public function canWrite(edge:IEdge, context:GraphMLWriteContext):Boolean
Whether this instance can serialize the given edge style in the given context.
Parameters
Returns
public function createStyleInstance(element:XML, context:GraphMLParseContext):IEdgeStyle
Create a style instance that can represent the edge graphics information of the given xml element.
Parameters
Returns
| IEdgeStyle —
the deserialized edge style instance.
|
public function getElementName(item:Object):String
Subclasses have to override this method.
Parameters
Returns
Throws
public function getElementNames():Array
Subclasses have to override this method.
Returns
Throws
public function getNamespace():Namespace
Returns the namespace of the element this serilaizer writes.
Returns
| Namespace — GraphMLConstants.YWORKS_EXT_NS
|
public function getStyleClass():Class
Subclasses have to override this method.
Returns
Throws
public function parse(style:IEdgeStyle, element:XML, context:GraphMLParseContext):void
Parses a serialized yFiles Java edge realizer into the given style.
Parameters
| style:IEdgeStyle — An edge style that is used to display the appearance of the yFiles Java edge realizer.
|
| |
| element:XML — the graphml edge element
|
| |
| context:GraphMLParseContext — the current parsing context
|
protected function parseArrows(arrowsElement:XML, style:IEdgeStyle):void
Parse the GraphML arrows element that defines the arrows for the current edge
Parameters
| arrowsElement:XML — The GraphML arrows element
|
| |
| style:IEdgeStyle — the edge style
|
protected function parsePath(pathElement:XML, edge:IEdge, graph:IGraph):void
Parse the GraphML Path element which defines the control points of the current edge
Parameters
| pathElement:XML — A GraphML path element
|
| |
| edge:IEdge — The current edge
|
| |
| graph:IGraph — The current graph instance
|
public function write(edge:IEdge, writer:IXmlWriter, context:GraphMLWriteContext):void
Write the given edge style in a format that can be parsed into a edge realizer by yFiles Java.
Parameters
| edge:IEdge — An edge style that can be serialized to a format that can be read by yFiles Java.
|
| |
| writer:IXmlWriter — The xml writer
|
| |
| context:GraphMLWriteContext — The current write context.
|
public function writeAttributes(edge:IEdge, writer:IXmlWriter, context:GraphMLWriteContext):void
Write the attributes of the realizer xml element
Parameters
| edge:IEdge — An edge style that can be serialized to a format that can be read by yFiles Java.
|
| |
| writer:IXmlWriter — The xml writer.
|
| |
| context:GraphMLWriteContext — The current write context.
|