| Package | com.yworks.io.graphml.realizer |
| Class | public class SimpleLabelRealizerSerializer |
| Inheritance | SimpleLabelRealizerSerializer Object |
| Implements | ILabelSerializer |
| Property | Defined By | ||
|---|---|---|---|
| instance : SimpleLabelRealizerSerializer [static] [read-only]
The shared instance of this serializer. | SimpleLabelRealizerSerializer | ||
| Method | Defined By | ||
|---|---|---|---|
canRead(element:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context. | SimpleLabelRealizerSerializer | ||
Returns false. | SimpleLabelRealizerSerializer | ||
Create a style instance that can represent the label layout information of the given xml element. | SimpleLabelRealizerSerializer | ||
getElementName(item:Object):String
Returns the name of the element that will be written by this serializer given the provided item. | SimpleLabelRealizerSerializer | ||
getElementNames():Array
Returns the names of all XML elements that can be parsed or written by this serializer. | SimpleLabelRealizerSerializer | ||
getNamespace():Namespace
Returns the namespace of the element this serilaizer writes. | SimpleLabelRealizerSerializer | ||
getStyleClass():Class
Returns the style class that can be serialized or deserialized by this instance. | SimpleLabelRealizerSerializer | ||
Parses a serialized yFiles Java node realizer into the given style. | SimpleLabelRealizerSerializer | ||
does nothing. | SimpleLabelRealizerSerializer | ||
Write the attributes of the label xml element
| SimpleLabelRealizerSerializer | ||
| Method | Defined By | ||
|---|---|---|---|
getTextContent(element:XML):String
Fetch the text content from the label element. | SimpleLabelRealizerSerializer | ||
parseEdgeLabel(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, labelElement:XML):ILabelModelParameter
Parse a <y:EdgeLabel> element. | SimpleLabelRealizerSerializer | ||
parseEdgeLabelModel(context:GraphMLParseContext, label:ILabel, labelElement:XML):ILabelModelParameter
Parse a xml element for an EdgeLabelModel. | SimpleLabelRealizerSerializer | ||
parseLabelBackground(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, element:XML):void
Parse a xml element representing the label's background. | SimpleLabelRealizerSerializer | ||
parseNodeLabel(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, labelElement:XML):ILabelModelParameter
Parse a <y:NodeLabel> element. | SimpleLabelRealizerSerializer | ||
parseTextFormat(labelElement:XML):UITextFormat
Parse the text format information in a GraphML label element into an UITextFormat object. | SimpleLabelRealizerSerializer | ||
| instance | property |
instance:SimpleLabelRealizerSerializer [read-only] The shared instance of this serializer.
public static function get instance():SimpleLabelRealizerSerializer| canRead | () | method |
public function canRead(element:XML, context:GraphMLParseContext):BooleanWhether this instance can deserialize the given xml element in the given context.
Parameters
element:XML — The xml element
| |
context:GraphMLParseContext — The parse context
|
Boolean — true if this instance can deserialize the style of the given xml element.
|
| canWrite | () | method |
public function canWrite(label:ILabel, context:GraphMLWriteContext):Boolean
Returns false. Writing labels takes place in specific node/edge realizerserializers.
Parameters
label:ILabel | |
context:GraphMLWriteContext |
Boolean |
| createStyleInstance | () | method |
public function createStyleInstance(element:XML, context:GraphMLParseContext):ILabelStyleCreate 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.
|
ILabelStyle — An instance of ILabelStyle that represents the label layout information of the given xml element.
|
| getElementName | () | method |
public function getElementName(item:Object):StringReturns 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 |
public function getElementNames():ArrayReturns 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.
|
| getNamespace | () | method |
public function getNamespace():NamespaceReturns the namespace of the element this serilaizer writes.
ReturnsNamespace — the namespace of the elements
|
| getStyleClass | () | method |
public function getStyleClass():ClassReturns the style class that can be serialized or deserialized by this instance.
ReturnsClass — The class that can be serialized by this instance.
|
| getTextContent | () | method |
protected function getTextContent(element:XML):StringFetch the text content from the label element.
Parameters
element:XML — The label element.
|
String — The label text.
|
| parse | () | method |
public function parse(label:ILabel, style:ILabelStyle, element:XML, context:GraphMLParseContext):voidParses 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
|
| parseEdgeLabel | () | method |
protected function parseEdgeLabel(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, labelElement:XML):ILabelModelParameterParse a <y:EdgeLabel> element.
Parameters
context:GraphMLParseContext — The current parse context.
| |
label:ILabel — The label item
| |
style:ILabelStyle — The label style
| |
labelElement:XML — The label element to be parsed.
|
ILabelModelParameter — An ILabelModelParameter instance for the given label.
|
| parseEdgeLabelModel | () | method |
protected function parseEdgeLabelModel(context:GraphMLParseContext, label:ILabel, labelElement:XML):ILabelModelParameterParse a xml element for an EdgeLabelModel.
If the parse context has the property "mapJavaLabelModels" set to true
the label models center_slider, side_slider, six_pos, three_center, two_pos and centered
will be mapped to SliderEdgeLabelModel, all other label models will be mapped
to FreeEdgeLabelModel. If the property is set to false or not set,
all label models will be mapped to FreeEdgeLabelModel.
The property will be set automatically by the JavaCompatGraphMLIOHandler,
according to its mapJavaLabelModels property.
Parameters
context:GraphMLParseContext — The current parse context.
| |
label:ILabel — The label item
| |
labelElement:XML — The label element to be parsed.
|
ILabelModelParameter — An ILabelModelParameter instance for the given label.
|
| parseLabelBackground | () | method |
protected function parseLabelBackground(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, element:XML):voidParse a xml element representing the label's background.
Parameters
context:GraphMLParseContext — The current parse context.
| |
label:ILabel — The label item
| |
style:ILabelStyle — The label style to write the background to
| |
element:XML — The element to be parsed.
|
| parseNodeLabel | () | method |
protected function parseNodeLabel(context:GraphMLParseContext, label:ILabel, style:ILabelStyle, labelElement:XML):ILabelModelParameterParse a <y:NodeLabel> element.
Parameters
context:GraphMLParseContext — The current parse context.
| |
label:ILabel — The label item
| |
style:ILabelStyle — The label style
| |
labelElement:XML — The label element to be parsed.
|
ILabelModelParameter — An ILabelModelParameter instance for the given label.
|
| parseTextFormat | () | method |
protected function parseTextFormat(labelElement:XML):UITextFormat
Parse the text format information in a GraphML label element into an UITextFormat object.
Parameters
labelElement:XML — A GraphML label element
|
UITextFormat — An UITextFormat object that was configured using the text format information in the label element.
|
| write | () | method |
public function write(label:ILabel, writer:IXmlWriter, context:GraphMLWriteContext):voiddoes nothing. Writing labels takes place in specific node/edge realizerserializers.
Parameters
label:ILabel | |
writer:IXmlWriter | |
context:GraphMLWriteContext |
| writeAttributes | () | method |
public function writeAttributes(style:ILabelStyle, writer:IXmlWriter, context:GraphMLWriteContext):voidWrite 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.
|