Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: experimental/conways_life/events/event.js

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2011 (c) The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Life events. These are goog.events.Event objects with
7 * an added ID property, that identifies which UI element triggered the event
8 * in the first place.
9 */
10
11 goog.provide('uikit.events.Event');
12
13 goog.require('goog.events.Event');
14
15 /**
16 * Constructor for the Event class. This provides a default ID ('gs_event')
17 * if |opt_eventId| is null or undefined.
18 * @param {string} type The type of this event.
19 * @param {?Object} opt_target The target that triggered this event.
20 * @param {string} opt_eventId The id for this event. If null or undefined,
21 * the new event instance gets the default id 'gs_event'.
22 * @constructor
23 * @extends {goog.events.Event}
24 */
25 uikit.events.Event = function(type, opt_target, opt_eventId) {
26 goog.events.Event.call(this, type, opt_target);
27
28 /**
29 * The event id. Initialized to be |opt_eventId| or the default 'gs_event'.
30 * @type {string}
31 * @private
32 */
33 this.eventId_ = opt_eventId || uikit.events.Event.DEFAULT_EVENT_ID;
34 };
35 goog.inherits(uikit.events.Event, goog.events.Event);
36
37 /**
38 * Override of disposeInternal() to dispose of retained objects.
39 * @override
40 */
41 uikit.events.Event.prototype.disposeInternal = function() {
42 uikit.events.Event.superClass_.disposeInternal.call(this);
43 this.eventId_ = null;
44 };
45
46 /**
47 * Accessor for the |eventId_| property.
48 * @return {string} The id of this event instance, guaranteed not to be null.
49 */
50 uikit.events.Event.prototype.eventId = function() {
51 return this.eventId_;
52 };
53
54 /**
55 * Mutator for the |eventId_| property.
56 * @param {string} eventId The new event id. If null or undefined, this method
57 * has no effect and silently returns.
58 */
59 uikit.events.Event.prototype.setEventId = function(eventId) {
60 if (!eventId)
61 return;
62 this.eventId_ = eventId;
63 };
64
65 /**
66 * The default event id. This is the id for events created using the default
67 * constructor parameter.
68 * @type {string}
69 */
70 uikit.events.Event.DEFAULT_EVENT_ID = 'gs_event';
OLDNEW
« no previous file with comments | « experimental/conways_life/events/dragger.js ('k') | experimental/conways_life/events/event_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698