refactor EditController to make it stateful, and add addWayNodes functionality with...
[potlatch2.git] / net / systemeD / potlatch2 / controller / ControllerState.as
1 package net.systemeD.potlatch2.controller {
2         import flash.events.*;
3     import net.systemeD.halcyon.connection.*;
4     import net.systemeD.potlatch2.EditController;
5
6     public class ControllerState {
7
8         protected var controller:EditController;
9         protected var previousState:ControllerState;
10
11         public function ControllerState() {}
12  
13         public function setController(controller:EditController):void {
14             this.controller = controller;
15         }
16
17         public function setPreviousState(previousState:ControllerState):void {
18             if ( this.previousState == null )
19                 this.previousState = previousState;
20         }
21    
22         public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
23             return this;
24         }
25         
26         public function enterState():void {}
27         public function exitState():void {}
28
29     }
30 }