Package | com.yworks.io.graphml.realizer |
Class | public class ShapeNodeStyleRealizerSerializer |
Inheritance | ShapeNodeStyleRealizerSerializer AbstractNodeRealizerSerializer Object |
IRealizerSerializer
that can read y:ShapeNode elements written by yFiles Java and write
ShapeNodeStyle instances into y:ShapeNode elements
readable by yFiles Java.
Property | Defined By | ||
---|---|---|---|
instance : ShapeNodeStyleRealizerSerializer [static] [read-only]
The shared instance. | ShapeNodeStyleRealizerSerializer |
Method | Defined By | ||
---|---|---|---|
canRead(node:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context. | AbstractNodeRealizerSerializer | ||
[override]
Whether this instance can serialize the style of the given node in the given context. | ShapeNodeStyleRealizerSerializer | ||
Create a style instance that can represent the node graphics information of the given xml element. | AbstractNodeRealizerSerializer | ||
getElementName(item:Object):String [override]
Returns the name of the element that will be written by this serializer given the provided item. | ShapeNodeStyleRealizerSerializer | ||
getElementNames():Array [override]
Returns the names of all XML elements that can be parsed or written by this serializer. | ShapeNodeStyleRealizerSerializer | ||
getNamespace():Namespace
Returns GraphMLConstants.YWORKS_EXT_NS. | AbstractNodeRealizerSerializer | ||
getStyleClass():Class [override]
Returns the style class that can be serialized or deserialized by this instance. | ShapeNodeStyleRealizerSerializer | ||
[override]
Parses a serialized yFiles Java node realizer into the given style. | ShapeNodeStyleRealizerSerializer | ||
[override]
Write the given node style in a format that can be parsed into a node realizer by yFiles Java. | ShapeNodeStyleRealizerSerializer | ||
Write the attributes of the realizer xml element
| AbstractNodeRealizerSerializer |
Method | Defined By | ||
---|---|---|---|
Parse a GraphML border style element
| ShapeNodeStyleRealizerSerializer | ||
Parse a GraphML fill element
| ShapeNodeStyleRealizerSerializer | ||
Parse a GraphML shape element
| ShapeNodeStyleRealizerSerializer | ||
shape2String(shape:uint):String
Gets a String for serialization from an integer id
| ShapeNodeStyleRealizerSerializer | ||
string2Shape(string:String):Object
Gets an integer id (as defined in ShapeNodeShape) for a serialization String. | ShapeNodeStyleRealizerSerializer |
instance | property |
instance:ShapeNodeStyleRealizerSerializer
[read-only] The shared instance.
public static function get instance():ShapeNodeStyleRealizerSerializer
canWrite | () | method |
override public function canWrite(node:INode, context:GraphMLWriteContext):Boolean
Whether this instance can serialize the style of the given node in the given context.
Parameters
node:INode — The node.
| |
context:GraphMLWriteContext — The write context.
|
Boolean — true if this instance can serialize the given node's style.
|
getElementName | () | method |
override public function getElementName(item:Object):String
Returns the name of the element that will be written by this serializer given the provided item.
Parameters
item:Object |
String — the name of the item
|
getElementNames | () | method |
override public function getElementNames():Array
Returns the names of all XML elements that can be parsed or written by this serializer.
ReturnsArray — The names of all xml elements this serializer can handle as Array .
|
getStyleClass | () | method |
override public function getStyleClass():Class
Returns the style class that can be serialized or deserialized by this instance.
ReturnsClass — The class that can be serialized by this instance.
|
parse | () | method |
override public function parse(style:INodeStyle, layout:IMutableRectangle, element:XML, context:GraphMLParseContext):void
Parses a serialized yFiles Java node realizer into the given style.
Parameters
style:INodeStyle — A node style that is used to display the appearance of the yFiles Java node realizer.
| |
layout:IMutableRectangle — A mutable rectangle that will be set to the bounds of the parsed realizer.
| |
element:XML — the graphml node element
| |
context:GraphMLParseContext — the current parsing context
|
parseBorderStyle | () | method |
protected function parseBorderStyle(style:ShapeNodeStyle, borderStyleElement:XML, context:GraphMLParseContext):void
Parse a GraphML border style element
Parameters
style:ShapeNodeStyle — The ShapeNodeStyle instance to write the parameters to.
| |
borderStyleElement:XML — The xml element to parse.
| |
context:GraphMLParseContext — The parse context.
|
parseFill | () | method |
protected function parseFill(style:ShapeNodeStyle, fillElement:XML, context:GraphMLParseContext):void
Parse a GraphML fill element
Parameters
style:ShapeNodeStyle — The ShapeNodeStyle instance to write the parameters to.
| |
fillElement:XML — The xml element to parse.
| |
context:GraphMLParseContext — The parse context.
|
parseShape | () | method |
protected function parseShape(style:ShapeNodeStyle, shapeElement:XML, context:GraphMLParseContext):void
Parse a GraphML shape element
Parameters
style:ShapeNodeStyle — The ShapeNodeStyle instance to write the parameters to.
| |
shapeElement:XML — The xml element to parse.
| |
context:GraphMLParseContext — The parse context.
|
shape2String | () | method |
protected function shape2String(shape:uint):String
Gets a String for serialization from an integer id
Parameters
shape:uint — The integer id of the shape as defined in ShapeNodeShape
|
String — The serialization String
|
string2Shape | () | method |
protected function string2Shape(string:String):Object
Gets an integer id (as defined in ShapeNodeShape
) for a serialization String.
Parameters
string:String — The serialization String.
|
Object — The integer id of the shape as defined in ShapeNodeShape
|
write | () | method |
override public function write(node:INode, writer:IXmlWriter, context:GraphMLWriteContext):void
Write the given node style in a format that can be parsed into a node realizer by yFiles Java.
Parameters
node:INode — node whose style can be serialized to a format that can be read by yFiles Java.
| |
writer:IXmlWriter — The xml writer
| |
context:GraphMLWriteContext — The current write context.
|