Packagecom.flextoolbox.managers
Interfacepublic interface IWireManager extends flash.events.IEventDispatcher
ImplementorsWireManager, WireSurface

An interface that defines a wire manager used by WireJacks.



Public Properties
 PropertyDefined by
  hasActiveConnectionRequest : Boolean
[read-only] Indicates whether the user is trying to make a wire connection.
IWireManager
  wireRenderer : IFactory
The class used to render wires.
IWireManager
Public Methods
 MethodDefined by
  
Called by a registered WireJack, this begins a connection request.
IWireManager
  
connect(startJack:WireJack, endJack:WireJack):Boolean
Connects two jacks.
IWireManager
  
deleteJack(jack:WireJack):void
Removes a jack's registration with this wire manager.
IWireManager
  
disconnect(startJack:WireJack, endJack:WireJack):void
Disconnects two connected jacks.
IWireManager
  
Called by a registered WireJack, this ends a connection request.
IWireManager
  
Registers a jack with this wire manager.
IWireManager
Events
 EventSummaryDefined by
   Dispatched when a registered WireJack wants to make a connection with another WireJack.IWireManager
   Dispatched when a connection is made between two WireJack instances.IWireManager
   Dispatched when a connection is deleted between two WireJack instances.IWireManager
   Dispatched when a registered WireJack wants to end a connection request.IWireManager
Property detail
hasActiveConnectionRequestproperty
hasActiveConnectionRequest:Boolean  [read-only]

Indicates whether the user is trying to make a wire connection.

Implementation
    public function get hasActiveConnectionRequest():Boolean
wireRendererproperty 
wireRenderer:IFactory  [read-write]

The class used to render wires. Must implement IWireRenderer.

Implementation
    public function get wireRenderer():IFactory
    public function set wireRenderer(value:IFactory):void

See also

Method detail
beginConnectionRequest()method
public function beginConnectionRequest(startJack:WireJack):void

Called by a registered WireJack, this begins a connection request. Generally, if a jack should be highlighted when the user is dragging a wire, the highlight is turned on during a connection request.

Parameters
startJack:WireJack — The jack that will be connected to another jack.
connect()method 
public function connect(startJack:WireJack, endJack:WireJack):Boolean

Connects two jacks.

Note: If one or both of the jacks are null, if one or both of the jacks aren't registered, or the jacks are equal, an ArgumentError will be thrown. Returns false only when the connection event is cancelled.

Parameters
startJack:WireJack — The first jack to connect.
 
endJack:WireJack — The second jack to connect.

Returns
Boolean — true if the jacks have been connected, false if not.
deleteJack()method 
public function deleteJack(jack:WireJack):void

Removes a jack's registration with this wire manager.

Parameters
jack:WireJack — The jack to remove.
disconnect()method 
public function disconnect(startJack:WireJack, endJack:WireJack):void

Disconnects two connected jacks.

Note: If one or both of the jacks are null, if one or both of the jacks aren't registered, or the jacks aren't connected, an ArgumentError will be thrown.

Parameters
startJack:WireJack — The first jack to connect.
 
endJack:WireJack — The second jack to connect.
endConnectionRequest()method 
public function endConnectionRequest(startJack:WireJack):void

Called by a registered WireJack, this ends a connection request. Generally, if other jacks are highlighted during a drag-and-drop operation, the highlight is turned off when a connection request ends.

Parameters
startJack:WireJack — The jack that started the connection request.
registerJack()method 
public function registerJack(jack:WireJack):void

Registers a jack with this wire manager.

Parameters
jack:WireJack — The jack to register.
Event detail
beginConnectionRequestevent 
Event object type: com.flextoolbox.events.WireManagerEvent

Dispatched when a registered WireJack wants to make a connection with another WireJack. Generally, compatible WireJack instances are expected to highlight themselves so that the user knows where a connection can be made.

createConnectionevent  
Event object type: com.flextoolbox.events.WireManagerEvent

Dispatched when a connection is made between two WireJack instances. May be cancelled.

deleteConnectionevent  
Event object type: com.flextoolbox.events.WireManagerEvent

Dispatched when a connection is deleted between two WireJack instances.

endConnectionRequestevent  
Event object type: com.flextoolbox.events.WireManagerEvent

Dispatched when a registered WireJack wants to end a connection request. Generally, compatible WireJack instances are expected to remove their highlight at this time.