Package | com.yworks.support |
Class | public class SizeTypeConverter |
Inheritance | SizeTypeConverter Object |
Implements | ITypeConverter |
com.yworks.canvas.geom.Size
values into String
s and back.
The String
format is composed of the width
and height
value separated by a comma,
e.g. '102,126' would represent a Size
with a width of 102 and a height of 126.
Method | Defined 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. | SizeTypeConverter | ||
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. | SizeTypeConverter | ||
convertFrom(object:Object, context:ILookup = null):Object
Converts the given object back to an instance of the default Class type
of this implementation. | SizeTypeConverter | ||
Converts the given object in an instance of the given class type and return this instance. | SizeTypeConverter |
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:Object — Object which shall be converted back.
| |
context:ILookup (default = null ) — The context of the conversion.
|
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:Object — Object which shall be converted.
| |
type:Class — Class type to which the given object shall be converted.
| |
context:ILookup (default = null ) — The context of the conversion.
|
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.
|
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:Object — Object to convert.
| |
type:Class — Class type to convert to.
| |
context:ILookup (default = null ) — The context of the conversion.
|
Object — The converted object.
|