Dart DocumentationstagexlEvent

Event class

class Event {

 // DiplayObject events
 static const String ADDED = "added";
 static const String ADDED_TO_STAGE = "addedToStage";
 static const String ENTER_FRAME = "enterFrame";
 static const String EXIT_FRAME = "exitFrame";
 static const String REMOVED = "removed";
 static const String REMOVED_FROM_STAGE = "removedFromStage";
 static const String RESIZE = "resize";
 static const String RENDER = "render";

 // Common events
 static const String OKAY = "okay";
 static const String CANCEL = "cancel";
 static const String CHANGE = "change";
 static const String CONFIRM = "confirm";
 static const String SCROLL = "scroll";
 static const String OPEN = "open";
 static const String CLOSE = "close";
 static const String SELECT= "select";
 static const String COMPLETE = "complete";
 static const String PROGRESS = "progress";

 //-------------------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------------------

 String _type;
 bool _bubbles;
 int _eventPhase = EventPhase.AT_TARGET;
 EventDispatcher _target = null;
 EventDispatcher _currentTarget = null;
 bool _stopsPropagation = false;
 bool _stopsImmediatePropagation = false;

 Event(String type, [bool bubbles = false]) : _type = type, _bubbles = bubbles;

 //-------------------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------------------

 void stopPropagation() {
   _stopsPropagation = true;
 }

 void stopImmediatePropagation() {
   _stopsPropagation = true;
   _stopsImmediatePropagation = true;
 }

 bool get stopsPropagation => _stopsPropagation;
 bool get stopsImmediatePropagation => _stopsImmediatePropagation;

 String get type => _type;
 int get eventPhase => _eventPhase;
 bool get bubbles => _bubbles;
 bool get captures => true;

 EventDispatcher get target => _target;
 EventDispatcher get currentTarget => _currentTarget;
}

Subclasses

BroadcastEvent, KeyboardEvent, MouseEvent, TextEvent, TouchEvent

Static Properties

const String ADDED #

static const String ADDED = "added"

const String ADDED_TO_STAGE #

static const String ADDED_TO_STAGE = "addedToStage"

const String CANCEL #

static const String CANCEL = "cancel"

const String CHANGE #

static const String CHANGE = "change"

const String CLOSE #

static const String CLOSE = "close"

const String COMPLETE #

static const String COMPLETE = "complete"

const String CONFIRM #

static const String CONFIRM = "confirm"

const String ENTER_FRAME #

static const String ENTER_FRAME = "enterFrame"

const String EXIT_FRAME #

static const String EXIT_FRAME = "exitFrame"

const String OKAY #

static const String OKAY = "okay"

const String OPEN #

static const String OPEN = "open"

const String PROGRESS #

static const String PROGRESS = "progress"

const String REMOVED #

static const String REMOVED = "removed"

const String REMOVED_FROM_STAGE #

static const String REMOVED_FROM_STAGE = "removedFromStage"

const String RENDER #

static const String RENDER = "render"

const String RESIZE #

static const String RESIZE = "resize"

const String SCROLL #

static const String SCROLL = "scroll"

const String SELECT #

static const String SELECT= "select"

Constructors

new Event(String type, [bool bubbles = false]) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Event(String type, [bool bubbles = false]) : _type = type, _bubbles = bubbles;

Properties

final bool bubbles #

bool get bubbles => _bubbles;

final bool captures #

bool get captures => true;

final EventDispatcher currentTarget #

EventDispatcher get currentTarget => _currentTarget;

final int eventPhase #

int get eventPhase => _eventPhase;

final bool stopsImmediatePropagation #

bool get stopsImmediatePropagation => _stopsImmediatePropagation;

final bool stopsPropagation #

bool get stopsPropagation => _stopsPropagation;

final EventDispatcher target #

EventDispatcher get target => _target;

final String type #

String get type => _type;

Methods

void stopImmediatePropagation() #

void stopImmediatePropagation() {
 _stopsPropagation = true;
 _stopsImmediatePropagation = true;
}

void stopPropagation() #

void stopPropagation() {
 _stopsPropagation = true;
}