Package | com.yworks.io.graphml.realizer |
Class | public class ProxyNodeRealizerSerializer |
Inheritance | ProxyNodeRealizerSerializer AbstractJavaNodeRealizerSerializer Object |
Implements | ILabelElementSelector, IInactiveLabelElementSelector |
ProxyShapeNodeRealizer
and
ProxyAutoBoundsNodeRealizer
instances.
There are no corresponding proxy node styles in yFiles FLEX. Instead, this implementation tries to find a suitable realizer serializer for the currently active realizer of the proxy realizer and delegates the actual parsing to that serializer.
Property | Defined By | ||
---|---|---|---|
instance : ProxyNodeRealizerSerializer [static] [read-only]
Returns the shared instance of the realizer serializer. | ProxyNodeRealizerSerializer |
Method | Defined By | ||
---|---|---|---|
canRead(node:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context. | AbstractJavaNodeRealizerSerializer | ||
Whether this instance can serialize the style of the given node in the given context. | AbstractJavaNodeRealizerSerializer | ||
[override]
This implementation tries to find a realizer serializer for the currently active
realizer of the proxy realizer. | ProxyNodeRealizerSerializer | ||
getElementName(item:Object):String
Returns the name of the element that will be written by this serializer given the provided item. | AbstractJavaNodeRealizerSerializer | ||
getElementNames():Array [override]
This realizer serializer will parse both
ProxyShapeNodeRealizer and
ProxyAutoBoundsNodeRealizer instances. | ProxyNodeRealizerSerializer | ||
getNamespace():Namespace
Returns the namespace of the element this serilaizer writes. | AbstractJavaNodeRealizerSerializer | ||
getStyleClass():Class [override]
Always returns null, beacuse this realizer serializer
can only read realiers. | ProxyNodeRealizerSerializer | ||
[override]
Tries to find a realizer serializers for the active and inactive realizer of the proxy realizer. | ProxyNodeRealizerSerializer | ||
selectInactiveLabelElements(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):XMLList
Returns all child NodeLabel elements of the collapsed realizer element. | ProxyNodeRealizerSerializer | ||
selectLabelElements(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):XMLList
Returns all child NodeLabel elements of the expanded realizer element. | ProxyNodeRealizerSerializer | ||
[override]
Because only the active realizer of all yFiles Java proxy realizers is parsed,
serialization is handled by the serializers for style instances representing the active
realizers. | ProxyNodeRealizerSerializer | ||
Write the attributes of the realizer xml element
| AbstractJavaNodeRealizerSerializer |
Method | Defined By | ||
---|---|---|---|
Create the default style instance that is used if no realizer serializer
is found for the currently active realizer of the proxy realizer. | ProxyNodeRealizerSerializer | ||
Writes the fill style into the XML writer. | AbstractJavaNodeRealizerSerializer |
instance | property |
instance:ProxyNodeRealizerSerializer
[read-only] Returns the shared instance of the realizer serializer.
public static function get instance():ProxyNodeRealizerSerializer
createDefaultStyle | () | method |
protected function createDefaultStyle(element:XML, context:GraphMLParseContext):INodeStyle
Create the default style instance that is used if no realizer serializer is found for the currently active realizer of the proxy realizer.
The default implementation returns an instance of JavaShapeNodeStyle
.
Parameters
element:XML — The current XML element.
| |
context:GraphMLParseContext — The current parse context
|
INodeStyle — A node style instance.
|
createStyleInstance | () | method |
override public function createStyleInstance(element:XML, context:GraphMLParseContext):INodeStyle
This implementation tries to find a realizer serializer for the currently active
realizer of the proxy realizer. Style creation will be delegated to the realizer
serializer of the active realizer, if such a serializer is available. Else,
An instance returned by createDefaultStyle
is used.
Parameters
element:XML — The current XML element.
| |
context:GraphMLParseContext — The current parse context
|
INodeStyle — A style instance for the node element that is being parsed.
|
See also
getElementNames | () | method |
override public function getElementNames():Array
This realizer serializer will parse both
ProxyShapeNodeRealizer
and
ProxyAutoBoundsNodeRealizer
instances.
Array |
getStyleClass | () | method |
override public function getStyleClass():Class
Always returns null
, beacuse this realizer serializer
can only read realiers.
Class |
parse | () | method |
override public function parse(style:INodeStyle, layout:IMutableRectangle, element:XML, context:GraphMLParseContext):void
Tries to find a realizer serializers for the active and inactive realizer of the proxy realizer. If such serializers are found, parsing is delgated to those instances.
The representation of the expanded state of the node is assigned to the given style
while the
collapsed style is set in the IChangeDummyNodeAppearanceCallback
of the node if a
FoldingManager
is found in the lookup of the graph.
Parameters
style:INodeStyle — The style instance that represents the currenlty active realizer instance of the proxy realizer.
| |
layout:IMutableRectangle — The node layout.
| |
element:XML — The proxy realizer XML element
| |
context:GraphMLParseContext — The current parse context.
|
selectInactiveLabelElements | () | method |
public function selectInactiveLabelElements(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):XMLList
Returns all child NodeLabel
elements of the collapsed realizer element.
Parameters
context:GraphMLParseContext — The current parse context.
| |
defaultValue:Boolean — Whether the default value is being parsed.
| |
dataElement:XML — The data XML element
|
XMLList — All child NodeLabel elements of the collapsed realizer element.
|
selectLabelElements | () | method |
public function selectLabelElements(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):XMLList
Returns all child NodeLabel
elements of the expanded realizer element.
Parameters
context:GraphMLParseContext — The current parse context.
| |
defaultValue:Boolean — Whether the default value is being parsed.
| |
dataElement:XML — The data XML element
|
XMLList — All child NodeLabel elements of the expanded realizer element.
|
write | () | method |
override public function write(node:INode, writer:IXmlWriter, context:GraphMLWriteContext):void
Because only the active realizer of all yFiles Java proxy realizers is parsed, serialization is handled by the serializers for style instances representing the active realizers. Therefore, this implementation is empty.
Parameters
node:INode — The node that is to be serialized
| |
writer:IXmlWriter — The xml writer
| |
context:GraphMLWriteContext — The current write context
|