Packagenet.systemeD.potlatch2.controller
Classpublic class DrawWay
InheritanceDrawWay Inheritance SelectedWay Inheritance ControllerState



Public Properties
 PropertyDefined by
 InheritedfirstSelected : Entity
ControllerState
 Inheritedlayer : MapPaint
ControllerState
 Inheritedmap : Map
Retrieves the map associated with the current EditController
ControllerState
 InheritedselectCount : uint
ControllerState
 InheritedselectedNodes : Array
ControllerState
 InheritedselectedWay : Way
ControllerState
 InheritedselectedWays : Array
ControllerState
 Inheritedselection : Array
ControllerState
Protected Properties
 PropertyDefined by
 Inheritedcontroller : EditController
ControllerState
 InheritedinitWay : Way
The selected way itself.
SelectedWay
 InheritedpreviousState : ControllerState
ControllerState
 Inherited_selection : Array
ControllerState
Public Methods
 MethodDefined by
  
DrawWay(way:Way, editEnd:Boolean, leaveNodeSelected:Boolean)
DrawWay
 Inherited
addToSelection(items:Array):void
ControllerState
  
createAndAddNode(event:MouseEvent, performAction:Function):Node
DrawWay
 Inherited
Perform deletion of currently selected way.
SelectedWay
  
enterState():void
DrawWay
  
exitState(newState:ControllerState):void
DrawWay
 Inherited
[static] Gets the way that the selected node is part of, if that makes sense.
ControllerState
 Inherited
hasAdjoiningWays():Boolean
ControllerState
 Inherited
hasSelectedAreas():Boolean
ControllerState
 Inherited
ControllerState
 Inherited
Determine whether or not any nodes are selected, and if so whether any of them belong to areas.
ControllerState
 Inherited
hasSelectedWays():Boolean
ControllerState
 Inherited
isSelectionState():Boolean
ControllerState
  
processKeyboardEvent(event:KeyboardEvent):ControllerState
DrawWay
  
processMouseEvent(event:MouseEvent, entity:Entity):ControllerState
DrawWay
 Inherited
removeFromSelection(items:Array):void
ControllerState
 Inherited
setController(controller:EditController):void
ControllerState
 Inherited
setPreviousState(previousState:ControllerState):void
ControllerState
 Inherited
toggleSelection(item:Entity):Boolean
ControllerState
  
toString():String
DrawWay
Protected Methods
 MethodDefined by
  
appendNode(node:Node, performAction:Function):void
DrawWay
  
backspaceNode(performAction:Function):ControllerState
DrawWay
 Inherited
Tidy up UI as we transition to a new state without the current selection.
SelectedWay
  
followWay():void
Extends the current way by "following" an existing way, after the user has already selected two nodes in a row.
DrawWay
 Inherited
getMapPaint(d:DisplayObject):MapPaint
Find the MapPaint object that this DisplayObject belongs to.
ControllerState
 Inherited
getNodeIndex(way:Way, node:Node):uint
ControllerState
  
DrawWay
 Inherited
repeatTags(object:Entity):void
Create a "repeat tags" action on the current entity, if possible.
ControllerState
  
resetElastic(node:Node):void
DrawWay
 Inherited
revertHandler(event:CloseEvent):void
ControllerState
 Inherited
Revert all selected items to previously saved state, via a dialog box.
ControllerState
 Inherited
setSourceTag():void
Create an action to add "source= tag to current entity based on background imagery.
ControllerState
 Inherited
sharedKeyboardEvents(event:KeyboardEvent):ControllerState
Default behaviour for the current state that should be called if state-specific action has been taken care of or ruled out.
ControllerState
 Inherited
sharedMouseEvents(event:MouseEvent, entity:Entity):ControllerState
Default behaviour for the current state that should be called if state-specific action has been taken care of or ruled out.
ControllerState
  
DrawWay
Constructor detail
DrawWay()constructor
public function DrawWay(way:Way, editEnd:Boolean, leaveNodeSelected:Boolean)Parameters
way:Way
 
editEnd:Boolean
 
leaveNodeSelected:Boolean
Method detail
appendNode()method
protected function appendNode(node:Node, performAction:Function):voidParameters
node:Node
 
performAction:Function
backspaceNode()method 
protected function backspaceNode(performAction:Function):ControllerStateParameters
performAction:Function

Returns
ControllerState
createAndAddNode()method 
public function createAndAddNode(event:MouseEvent, performAction:Function):NodeParameters
event:MouseEvent
 
performAction:Function

Returns
Node
enterState()method 
public override function enterState():void
exitState()method 
public override function exitState(newState:ControllerState):voidParameters
newState:ControllerState
followWay()method 
protected function followWay():void

Extends the current way by "following" an existing way, after the user has already selected two nodes in a row. If drawing way has at least two nodes, and both belong to another way, and those ways are the same, then find the next node, add that node, update screen and scroll the new node into shot if necessary. TODO: add a bit of feedback (FloatingAlert?) when following can't be carried out for some reason.

keyExitDrawing()method 
protected function keyExitDrawing():ControllerState

Returns
ControllerState
processKeyboardEvent()method 
public override function processKeyboardEvent(event:KeyboardEvent):ControllerStateParameters
event:KeyboardEvent

Returns
ControllerState
processMouseEvent()method 
public override function processMouseEvent(event:MouseEvent, entity:Entity):ControllerStateParameters
event:MouseEvent
 
entity:Entity

Returns
ControllerState
resetElastic()method 
protected function resetElastic(node:Node):voidParameters
node:Node
stopDrawing()method 
protected function stopDrawing():ControllerState

Returns
ControllerState
toString()method 
public override function toString():String

Returns
String