Packagenet.systemeD.potlatch2.controller
Classpublic class SelectedWay
InheritanceSelectedWay Inheritance ControllerState
SubclassesDrawWay, SelectedParallelWay

Behaviour that takes place while a way is selected includes: adding a node to the way, straightening/reshaping the way, dragging it.



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
  initWay : Way
The selected way itself.
SelectedWay
 InheritedpreviousState : ControllerState
ControllerState
 Inherited_selection : Array
ControllerState
Public Methods
 MethodDefined by
  
SelectedWay(way:Way, layer:MapPaint = null, point:Point = null, ways:Array = null, index:int = 0)
SelectedWay
 Inherited
addToSelection(items:Array):void
ControllerState
  
Perform deletion of currently selected way.
SelectedWay
  
enterState():void
Officially enter this state by marking the previously nominated way as selected.
SelectedWay
  
exitState(newState:ControllerState):void
Officially leave the state, remembering the current way's tags for future repeats.
SelectedWay
 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
Behaviour includes: parallel way, repeat tags, reverse direction, simplify, cycle way selection, delete
SelectedWay
  
processMouseEvent(event:MouseEvent, entity:Entity):ControllerState
Behaviour includes: start drawing a new way, insert a node within this way, select an additional way
SelectedWay
 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
SelectedWay
Protected Methods
 MethodDefined by
  
Tidy up UI as we transition to a new state without the current selection.
SelectedWay
 Inherited
getMapPaint(d:DisplayObject):MapPaint
Find the MapPaint object that this DisplayObject belongs to.
ControllerState
 Inherited
getNodeIndex(way:Way, node:Node):uint
ControllerState
 Inherited
repeatTags(object:Entity):void
Create a "repeat tags" action on the current entity, if possible.
ControllerState
 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
Property detail
initWayproperty
protected var initWay:Way

The selected way itself.

Constructor detail
SelectedWay()constructor
public function SelectedWay(way:Way, layer:MapPaint = null, point:Point = null, ways:Array = null, index:int = 0)

Parameters
way:Way — The way that is now selected.
 
layer:MapPaint (default = null) — The location that was clicked.
 
point:Point (default = null) — An ordered list of ways sharing a node, to make "way cycling" work.
 
ways:Array (default = null)
 
index:int (default = 0)
Method detail
clearSelection()method
protected function clearSelection(newState:ControllerState):void

Tidy up UI as we transition to a new state without the current selection.

Parameters
newState:ControllerState
deleteWay()method 
public function deleteWay():ControllerState

Perform deletion of currently selected way.

Returns
ControllerState
enterState()method 
public override function enterState():void

Officially enter this state by marking the previously nominated way as selected.

exitState()method 
public override function exitState(newState:ControllerState):void

Officially leave the state, remembering the current way's tags for future repeats.

Parameters
newState:ControllerState
processKeyboardEvent()method 
public override function processKeyboardEvent(event:KeyboardEvent):ControllerState

Behaviour includes: parallel way, repeat tags, reverse direction, simplify, cycle way selection, delete

Parameters
event:KeyboardEvent

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

Behaviour includes: start drawing a new way, insert a node within this way, select an additional way

Parameters
event:MouseEvent
 
entity:Entity

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

Returns
String — "SelectedWay"