Class Index | File Index

Classes


Class HandleManager


Defined in: handles.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HandleManager will act like a Singleton (even not defined as one) You will attach a Figure to it and he will be in charge with the figure manipulation
Field Summary
Field Attributes Field Name and Description
<static>  
HandleManager.connectorHandles
An {Array} with connector handles
<static>  
HandleManager.figure
The shape (figure or connector) that the HandleManager will manage
<static>  
HandleManager.handles
An {Array} with current handles
<static>  
HandleManager.handleSelectedIndex
Currently selected handle
<static>  
HandleManager.selectRect
Selection rectangle (the rectangle upon the Handles will stay in case of a Figure/Group)
Method Summary
Method Attributes Method Name and Description
<static>  
HandleManager.clear()
Clear HandleManager
<static>  
HandleManager.figureSet(shape)
Use this method to set a new shape (Figure or Connetor) to this manager.
<static>  
HandleManager.handleGet(x, y)
Returns the handle from a certain coordinates
<static>  
HandleManager.handleGetAll()
Returns all handles for a shape (figure or connector).
<static>  
HandleManager.handleGetSelected()
Get selected handle or null if no handler selected
<static>  
HandleManager.handleSelectXY(x, y)
Select the handle from a certain coodinates
<static>  
HandleManager.paint(context)
Paint the Handles, actually the HandleManager will delegate each paint to the proper Handle to paint
Class Detail
HandleManager()
HandleManager will act like a Singleton (even not defined as one) You will attach a Figure to it and he will be in charge with the figure manipulation
Field Detail
<static> HandleManager.connectorHandles
An {Array} with connector handles

<static> HandleManager.figure
The shape (figure or connector) that the HandleManager will manage

<static> HandleManager.handles
An {Array} with current handles

<static> HandleManager.handleSelectedIndex
Currently selected handle

<static> HandleManager.selectRect
Selection rectangle (the rectangle upon the Handles will stay in case of a Figure/Group)
Method Detail
<static> HandleManager.clear()
Clear HandleManager

<static> HandleManager.figureSet(shape)
Use this method to set a new shape (Figure or Connetor) to this manager. Every time a new figure is set, old handles will dissapear (got erased by new figure's handles)
Parameters:
shape

<static> HandleManager.handleGet(x, y)
Returns the handle from a certain coordinates
Parameters:
{Number} x
- the value on Ox
{Number} y
- the value on Oy *

<static> HandleManager.handleGetAll()
Returns all handles for a shape (figure or connector). It does not mean that the HandleManager keeps records of all Handles for a Figure but more likely they are computed on-the-fly
Returns:
an {Array} of {Handle} that you can further use to manage the figure

<static> HandleManager.handleGetSelected()
Get selected handle or null if no handler selected

<static> HandleManager.handleSelectXY(x, y)
Select the handle from a certain coodinates
Parameters:
{Number} x
- the value on Ox
{Number} y
- the value on Oy

<static> HandleManager.paint(context)
Paint the Handles, actually the HandleManager will delegate each paint to the proper Handle to paint
Parameters:
{Context} context
- the 2D context

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 09 2011 12:47:26 GMT+0300 (EEST)