diff options
Diffstat (limited to 'js/stage/binding-view.reel/binding-view.js')
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js new file mode 100755 index 00000000..a0ca0c4f --- /dev/null +++ b/js/stage/binding-view.reel/binding-view.js | |||
@@ -0,0 +1,101 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | /** | ||
8 | @requires montage/core/core | ||
9 | @requires montage/ui/component | ||
10 | */ | ||
11 | var Montage = require("montage/core/core").Montage, | ||
12 | Component = require("montage/ui/component").Component; | ||
13 | |||
14 | exports.BindingView = Montage.create(Component, { | ||
15 | //private Properties | ||
16 | _selectedElement: { | ||
17 | value: null | ||
18 | }, | ||
19 | _bindables: { | ||
20 | value: [] | ||
21 | }, | ||
22 | _nonVisualComponents: { | ||
23 | value:[] | ||
24 | }, | ||
25 | |||
26 | //Public Objects | ||
27 | hudRepeater: { value: null }, | ||
28 | |||
29 | |||
30 | //Public Properties | ||
31 | selectedElement: { | ||
32 | get: function() { | ||
33 | return this._selectedElement; | ||
34 | }, | ||
35 | set: function(val) { | ||
36 | this._selectedElement = val; | ||
37 | this.needsDraw = true; | ||
38 | } | ||
39 | }, | ||
40 | bindables: { | ||
41 | get: function() { | ||
42 | return this._bindables; | ||
43 | }, | ||
44 | set: function(val) { | ||
45 | this._bindables = val; | ||
46 | } | ||
47 | }, | ||
48 | nonVisualComponents: { | ||
49 | get: function() { | ||
50 | return this._nonVisualComponents; | ||
51 | }, | ||
52 | set: function(val) { | ||
53 | this._nonVisualComponents = val; | ||
54 | } | ||
55 | }, | ||
56 | |||
57 | //Methods | ||
58 | |||
59 | //Montage Draw Cycle | ||
60 | prepareForDraw: { | ||
61 | value: function() { | ||
62 | |||
63 | } | ||
64 | }, | ||
65 | |||
66 | draw: { | ||
67 | value: function() { | ||
68 | if(this.selectedElement !== null) { | ||
69 | this.bindables = [ | ||
70 | { | ||
71 | "title": "Input1", | ||
72 | "properties": [ | ||
73 | {"title":"Value"}, | ||
74 | {"title": "Width"} | ||
75 | ], | ||
76 | "x": 20, | ||
77 | "y": 20 | ||
78 | }, | ||
79 | { | ||
80 | "title": "Checkbox1", | ||
81 | "properties": [ | ||
82 | {"title":"Group"}, | ||
83 | {"title": "Value"} | ||
84 | ], | ||
85 | "x": 120, | ||
86 | "y": 120 | ||
87 | } | ||
88 | ]; | ||
89 | } else { | ||
90 | this.bindables = []; | ||
91 | } | ||
92 | } | ||
93 | }, | ||
94 | |||
95 | didDraw: { | ||
96 | value: function() { | ||
97 | |||
98 | } | ||
99 | } | ||
100 | |||
101 | }); \ No newline at end of file | ||