]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/slc/web/components/View.js
08d13cdbd6367bf725b1212a3a853fe6fa75fa35
5 * This is the main application class of your custom application "sparta"
7 qx
.Class
.define("org.argeo.slc.web.components.View",
9 extend
: qx
.ui
.container
.Composite
,
11 construct : function(viewId
, viewTitle
){
13 this.setViewId(viewId
);
14 this.setViewTitle(viewTitle
);
15 var viewSelection
= new org
.argeo
.slc
.web
.components
.ViewSelection(viewId
);
16 this.setViewSelection(viewSelection
);
23 viewTitle
: {init
:""},
24 viewSelection
: { nullable
:false },
25 ownScrollable
: {init
: false}
29 *****************************************************************************
31 *****************************************************************************
36 createGui : function(){
37 this.setLayout(new qx
.ui
.layout
.VBox());
38 this.header
= new qx
.ui
.container
.Composite();
39 this.header
.setLayout(new qx
.ui
.layout
.HBox());
40 this.header
.set({appearance
:"app-header"});
41 this.header
.add(new qx
.ui
.basic
.Label(this.getViewTitle()));
42 this.add(this.header
);
43 this.setDecorator(new qx
.ui
.decoration
.Single(1,"solid","#000"));
46 setContent : function(content
, addScrollable
){
48 this.setOwnScrollable(true);
49 this.scrollable
= new qx
.ui
.container
.Scroll(content
);
50 this.add(this.scrollable
, {flex
: 1});
52 this.content
= content
;
53 this.add(this.content
, {flex
:1});
58 if(this.getOwnScrollable() && this.scrollable
){
59 this.remove(this.scrollable
);
60 }else if(this.content
){
61 this.remove(this.content
);