Package | com.yworks.io.graphml.writer.serializer |
Class | public class DelegatingStyleSerializer |
Inheritance | DelegatingStyleSerializer AbstractSerializer Object |
Subclasses | FilterNodeStyleSerializer |
IDelegatingStyle
instances.
Subclasses have to override the elementName
and type
properties
and the serializeStyle
method.
Property | Defined By | ||
---|---|---|---|
type : Class [read-only]
The type which this serializer claims to handle. | DelegatingStyleSerializer |
Method | Defined By | ||
---|---|---|---|
canHandle(context:GraphMLWriteContext, subject:Object):Boolean [override]
This implementation returns true if the subject is of the type which is returned
by the type property and is not null
Return whether this serializer can handle a specific object. | DelegatingStyleSerializer | ||
Serialize the given style to a IXmlWriter. | AbstractSerializer |
Method | Defined By | ||
---|---|---|---|
[override]
This implementation serializes the wrapped style into a <y:Wrapped>
element and calls serializeStyle(). | DelegatingStyleSerializer | ||
Serializes the properties of the style. | DelegatingStyleSerializer |
type | property |
type:Class
[read-only] The type which this serializer claims to handle.
Subclasses have to override this property.
protected function get type():Class
canHandle | () | method |
override public function canHandle(context:GraphMLWriteContext, subject:Object):Boolean
This implementation returns true if the subject is of the type which is returned
by the type
property and is not null
Return whether this serializer can handle a specific object.
Parameters
context:GraphMLWriteContext — The write context.
| |
subject:Object — The object which is tested
|
Boolean — true if the serializer can handle the subject
|
serializeContent | () | method |
override protected function serializeContent(context:GraphMLWriteContext, subject:Object, writer:IXmlWriter):void
This implementation serializes the wrapped style into a <y:Wrapped>
element and calls serializeStyle()
.
Write the content of the graphml element that corresponds to the serialization of subject
.
Parameters
context:GraphMLWriteContext — The current write context.
| |
subject:Object — The current object to be serialized.
| |
writer:IXmlWriter — The xml writer.
|
serializeStyle | () | method |
protected function serializeStyle(context:GraphMLWriteContext, subject:Object, writer:IXmlWriter):void
Serializes the properties of the style.
When this method is called, the element of the style is the current element.
This implementation does nothing. If the style to serialize has no own properties to serialize, it is not necessary to override this method.
Parameters
context:GraphMLWriteContext — The write context.
| |
subject:Object — The style to serialize.
| |
writer:IXmlWriter — The writer to write to.
|