PageRenderTime 14ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/com/google/maps/extras/arcgislink/NetworkService.as

http://gmaps-utility-library-flash.googlecode.com/
ActionScript | 38 lines | 24 code | 7 blank | 7 comment | 0 complexity | b257cf2b0f5d8f1075609630bac8ba46 MD5 | raw file
 1/*
 2 * ArcGIS for Google Maps Flash API
 3 *
 4 * License http://www.apache.org/licenses/LICENSE-2.0
 5 */ /**
 6 * @author nianwei at gmail dot com
 7 */
 8package com.google.maps.extras.arcgislink {
 9  import flash.events.*;
10
11  public class NetworkService implements IEventDispatcher {
12    public function NetworkService() {
13      dispatcher_=new EventDispatcher(this);
14    }
15    private var dispatcher_:EventDispatcher;
16
17    public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void {
18
19      dispatcher_.addEventListener(type, listener, useCapture, priority);
20    }
21
22    public function dispatchEvent(evt:Event):Boolean {
23      return dispatcher_.dispatchEvent(evt);
24    }
25
26    public function hasEventListener(type:String):Boolean {
27      return dispatcher_.hasEventListener(type);
28    }
29
30    public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void {
31      dispatcher_.removeEventListener(type, listener, useCapture);
32    }
33
34    public function willTrigger(type:String):Boolean {
35      return dispatcher_.willTrigger(type);
36    }
37  }
38}