Packagecom.yworks.io.graphml.realizer
Interfacepublic interface ILabelSerializer extends IRealizerSerializer
Implementors SimpleLabelRealizerSerializer

Interface for reading and/or writing label graphics information written/to be parsed by yFiles Java



Public Methods
 MethodDefined By
  
canRead(element:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context.
ILabelSerializer
  
canWrite(label:ILabel, context:GraphMLWriteContext):Boolean
Whether this instance can serialize the style of the given label in the given context.
ILabelSerializer
  
Create a style instance that can represent the label layout information of the given xml element.
ILabelSerializer
 Inherited
getElementName(item:Object):String
Returns the name of the element that will be written by this serializer given the provided item.
IRealizerSerializer
 Inherited
Returns the names of all XML elements that can be parsed or written by this serializer.
IRealizerSerializer
 Inherited
getNamespace():Namespace
Returns the namespace of the element this serilaizer writes.
IRealizerSerializer
 Inherited
Returns the style class that can be serialized or deserialized by this instance.
IRealizerSerializer
  
parse(label:ILabel, style:ILabelStyle, element:XML, context:GraphMLParseContext):void
Parses a serialized yFiles Java node realizer into the given style.
ILabelSerializer
  
write(label:ILabel, writer:IXmlWriter, context:GraphMLWriteContext):void
Write the given label style in a format that can be parsed by yFiles Java.
ILabelSerializer
  
Write the attributes of the label xml element
ILabelSerializer
Method Detail
canRead()method
public function canRead(element:XML, context:GraphMLParseContext):Boolean

Whether this instance can deserialize the given xml element in the given context.

Parameters

element:XML — The xml element
 
context:GraphMLParseContext — The parse context

Returns
Booleantrue if this instance can deserialize the style of the given xml element.
canWrite()method 
public function canWrite(label:ILabel, context:GraphMLWriteContext):Boolean

Whether this instance can serialize the style of the given label in the given context.

Parameters

label:ILabel — The label.
 
context:GraphMLWriteContext — The write context.

Returns
Booleantrue if this instance can serialize the style of the given label.
createStyleInstance()method 
public function createStyleInstance(element:XML, context:GraphMLParseContext):ILabelStyle

Create a style instance that can represent the label layout information of the given xml element.

Parameters

element:XML — The XML element.
 
context:GraphMLParseContext — The parse context.

Returns
ILabelStyle — An instance of ILabelStyle that represents the label layout information of the given xml element.
parse()method 
public function parse(label:ILabel, style:ILabelStyle, element:XML, context:GraphMLParseContext):void

Parses a serialized yFiles Java node realizer into the given style.

Parameters

label:ILabel — A label instance whose style is to be configured.
 
style:ILabelStyle — A label style that is used to display the appearance of the yFiles Java label.
 
element:XML — the graphml node element
 
context:GraphMLParseContext — the current parsing context

write()method 
public function write(label:ILabel, writer:IXmlWriter, context:GraphMLWriteContext):void

Write the given label style in a format that can be parsed by yFiles Java.

Parameters

label:ILabel — A label 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.

writeAttributes()method 
public function writeAttributes(style:ILabelStyle, writer:IXmlWriter, context:GraphMLWriteContext):void

Write the attributes of the label xml element

Parameters

style:ILabelStyle — A label 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.