Packagecom.senocular.display.transform
Classpublic class RegistrationManager
InheritanceRegistrationManager Inheritance Object

Manages registration points used by TransformTool instances when working with target objects. Every TransformTool instance requires a RegistrationManager instance to manage registration points, though multiple Transform Tools can use the same registration managers.



Public Properties
 PropertyDefined By
  defaultUV : Point
Default registration point location based on UV coordinates (percent relative to target).
RegistrationManager
  defaultXY : Point
Default registration point location based on x and y locations.
RegistrationManager
  enabled : Boolean
Determines whether or not registration points are saved for target object instances.
RegistrationManager
Protected Properties
 PropertyDefined By
  map : Dictionary
Lookup for registration points.
RegistrationManager
Public Methods
 MethodDefined By
  
Constructor for creating new RegistrationManager instances.
RegistrationManager
  
clear(target:DisplayObject = null):void
Clears registration points from the manager.
RegistrationManager
  
contains(target:DisplayObject):Boolean
Determines if a registration point exists for a target object.
RegistrationManager
  
getRegistration(target:DisplayObject):Point
Returns the registration point associated with a target object.
RegistrationManager
  
setRegistration(target:DisplayObject, point:Point):void
Sets the registration point for an object.
RegistrationManager
Property Detail
defaultUVproperty
defaultUV:Point

Default registration point location based on UV coordinates (percent relative to target). This position has precedence over defaultXY. If both are defined defaultUV will be used.


Implementation
    public function get defaultUV():Point
    public function set defaultUV(value:Point):void
defaultXYproperty 
defaultXY:Point

Default registration point location based on x and y locations. If this is defined and defaultUV is not, this location will be used for the default registration point.


Implementation
    public function get defaultXY():Point
    public function set defaultXY(value:Point):void
enabledproperty 
enabled:Boolean

Determines whether or not registration points are saved for target object instances. When disabled (false) any saved registration points are removed through a clear() action. Default registration positions will still be respected when enabled is false.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
mapproperty 
protected var map:Dictionary

Lookup for registration points. Each registration point is a Point object using the target object to which it is associated as the key.

Constructor Detail
RegistrationManager()Constructor
public function RegistrationManager()

Constructor for creating new RegistrationManager instances.

Method Detail
clear()method
public function clear(target:DisplayObject = null):void

Clears registration points from the manager. If a target is specified, only the registration point for that target object is cleared. Otherwise all registration points are cleared.

Parameters

target:DisplayObject (default = null) — A specific object in which a registration point should be cleared.

contains()method 
public function contains(target:DisplayObject):Boolean

Determines if a registration point exists for a target object.

Parameters

target:DisplayObject — The target object to use to look up the existence of a registration point.

Returns
Boolean — True if a registration point has been saved for the target object, false if not.
getRegistration()method 
public function getRegistration(target:DisplayObject):Point

Returns the registration point associated with a target object.

Parameters

target:DisplayObject — The object for which to find a registration point.

Returns
Point — The saved registration point for the target. If the target is null, or there is no defaults and a registration point has not been saved for the target, null is returned. If no registration point has been defined but defaults have been defined, a default is returned. Otherwise the saved registration point for the target object is returned.
setRegistration()method 
public function setRegistration(target:DisplayObject, point:Point):void

Sets the registration point for an object. This will only work if enabled is true.

Parameters

target:DisplayObject — The target object for which to set a registration point.
 
point:Point — The point to define as the registration point for the target object. Registration points are defined in a target object's local coordinate space.