Packagecom.yworks.support
Classpublic class YPointTypeConverter
InheritanceYPointTypeConverter Inheritance Object
Implements ITypeConverter

This class can convert YPoint values into Strings and back. The String format is composed of the x and y value separated by a comma, e.g. '-1.02,12.67' would represent a YPoint with a x value of -1.02 and a y value of 12.67.



Public Methods
 MethodDefined By
  
canConvertFrom(object:Object, context:ILookup = null):Boolean
Returns, if the given object can be converted back to an instance of the default Class type of this implementation.
YPointTypeConverter
  
canConvertTo(object:Object, type:Class, context:ILookup = null):Boolean
Returns, if the given object can be converted in an instance of the given class type.
YPointTypeConverter
  
convertFrom(object:Object, context:ILookup = null):Object
Converts the given object back to an instance of the default Class type of this implementation.
YPointTypeConverter
  
convertTo(object:Object, type:Class, context:ILookup = null):Object
Converts the given object in an instance of the given class type and return this instance.
YPointTypeConverter
Method Detail
canConvertFrom()method
public function canConvertFrom(object:Object, context:ILookup = null):Boolean

Returns, if the given object can be converted back to an instance of the default Class type of this implementation.

Parameters

object:ObjectObject which shall be converted back.
 
context:ILookup (default = null) — The context of the conversion.

Returns
Boolean
canConvertTo()method 
public function canConvertTo(object:Object, type:Class, context:ILookup = null):Boolean

Returns, if the given object can be converted in an instance of the given class type.

Parameters

object:ObjectObject which shall be converted.
 
type:ClassClass type to which the given object shall be converted.
 
context:ILookup (default = null) — The context of the conversion.

Returns
Boolean
convertFrom()method 
public function convertFrom(object:Object, context:ILookup = null):Object

Converts the given object back to an instance of the default Class type of this implementation.

Parameters

object:Object — The Object to convert back.
 
context:ILookup (default = null) — The context of the conversion.

Returns
Object — The back converted object.
convertTo()method 
public function convertTo(object:Object, type:Class, context:ILookup = null):Object

Converts the given object in an instance of the given class type and return this instance.

Parameters

object:ObjectObject to convert.
 
type:ClassClass type to convert to.
 
context:ILookup (default = null) — The context of the conversion.

Returns
Object — The converted object.