-
Notifications
You must be signed in to change notification settings - Fork 3
/
Sample.js
48 lines (48 loc) · 1.05 KB
/
Sample.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
load("gainda.js");
var app = Gaint.application("New App",['base','graphics','controls','fxml','web','media','swing','swt']);
app.init();
app.tile({
name:'landing',
make:function(){
var pane = new StackPane();
pane.title = "Landing";
return new Scene(pane,500,500);
}
});
app.tile({
name:'home',
make:function(){
var pane = new StackPane();
pane.title = "Home";
return new Scene(pane,500,500);
}
});
var main = app.view({
tile:'landing',
name:'loginView',
make:function(){
var application = this.application;
var button = new Button();
button.text = 'Yeah! Clik Me';
button.onAction = function() {
application.getView("homeView").render();
print("from login view working !!!")
}
return button;
}
});
var home = app.view({
tile:'home',
name:'homeView',
make:function(){
var application = this.application;
var button = new Button();
button.text = 'Home Button';
button.onAction = function() {
application.getView("loginView").render();
print("from home view working !!!")
}
return button;
}
});
main.render();