context: function(date) {  qx.ui.layout.BoxLayout.call(this);  this.setOrientation("vertical");  // Create the navigation bar  var navBar = new qx.ui.layout.BoxLayout;  navBar.set({ width:null, height:"auto", spacing:1 });  var lastYearBt = new qx.ui.toolbar.Button(null, "widget/datechooser/lastYear.png");  var lastMonthBt = new qx.ui.toolbar.Button(null, "widget/datechooser/lastMonth.png");  var monthYearLabel = new qx.ui.basic.Label;  var nextMonthBt = new qx.ui.toolbar.Button(null, "widget/datechooser/nextMonth.png");  var nextYearBt = new qx.ui.toolbar.Button(null, "widget/datechooser/nextYear.png");  lastYearBt.set({ show:'icon', toolTip:new qx.ui.popup.ToolTip(this.tr("Last year")), spacing:0 });  lastMonthBt.set({ show:'icon', toolTip:new qx.ui.popup.ToolTip(this.tr("Last month")) });  nextMonthBt.set({ show:'icon', toolTip:new qx.ui.popup.ToolTip(this.tr("Next month")) });  nextYearBt.set({ show:'icon', toolTip:new qx.ui.popup.ToolTip(this.tr("Next year")) });  lastYearBt.setAppearance("datechooser-toolbar-button");  lastMonthBt.setAppearance("datechooser-toolbar-button");  nextMonthBt.setAppearance("datechooser-toolbar-button");  nextYearBt.setAppearance("datechooser-toolbar-button");  lastYearBt.addEventListener("click", this._onNavButtonClicked, this);  lastMonthBt.addEventListener("click", this._onNavButtonClicked, this);  nextMonthBt.addEventListener("click", this._onNavButtonClicked, this);  nextYearBt.addEventListener("click", this._onNavButtonClicked, this);  this._lastYearBt = lastYearBt;  this._lastMonthBt = lastMonthBt;  this._nextMonthBt = nextMonthBt;  this._nextYearBt = nextYearBt;  monthYearLabel.setAppearance("datechooser-monthyear");  monthYearLabel.set({ width:"1*" });  navBar.add(lastYearBt, lastMonthBt, monthYearLabel, nextMonthBt, nextYearBt);  this._monthYearLabel = monthYearLabel;  navBar.setHtmlAttribute("id", "navBar");  // Calculate the cell width and height  var testLabel = new qx.ui.basic.Label;  var testParent = new qx.ui.layout.CanvasLayout;  testParent.add(testLabel);  testLabel.setHtml("Xx");  testLabel.set({ paddingLeft : 5, paddingRight : 5 });  testLabel.setAppearance("datechooser-weekday");  var cellWidth = testLabel.getBoxWidth();  var cellHeight = testLabel.getBoxHeight();  testLabel.dispose();  testParent.dispose();  // Create the date pane  var datePane = new qx.ui.layout.GridLayout;  datePane.setAppearance("datechooser-datepane");  datePane.set({ width:"100%", height:"auto" });  datePane.setColumnCount(8);  datePane.setRowCount(7);  for (var i = 0; i < datePane.getColumnCount(); i++) {    datePane.setColumnWidth(i, cellWidth);  }  for (var i = 0; i < datePane.getRowCount(); i++) {    datePane.setRowHeight(i, cellHeight);  }  // Create the weekdays  // Add an empty label as spacer for the week numbers  var label = new qx.ui.basic.Label;  label.setAppearance("datechooser-week");  label.set({ width:"100%", height:"100%" });  label.addState("header");  datePane.add(label, 0, 0);  this._weekdayLabelArr = [];  for (var i = 0; i < 7; i++) {    var label = new qx.ui.basic.Label;    label.setAppearance("datechooser-weekday");    label.set({ width:"100%", height:"100%" });    datePane.add(label, i + 1, 0);    this._weekdayLabelArr.push(label);  }  // Add the days  this._dayLabelArr = [];  this._weekLabelArr = [];  for (var y = 0; y < 6; y++) {    // Add the week label    var label = new qx.ui.basic.Label;    label.setAppearance("datechooser-week");    label.set({ width:"100%", height:"100%" });    datePane.add(label, 0, y + 1);    this._weekLabelArr.push(label);    // Add the day labels    for (var x = 0; x < 7; x++) {      var label = new qx.ui.basic.Label;      label.setAppearance("datechooser-day");      label.set({ width:"100%", height:"100%" });      label.addEventListener("mousedown", this._onDayClicked, this);      label.addEventListener("dblclick", this._onDayDblClicked, this);      datePane.add(label, x + 1, y + 1);      this._dayLabelArr.push(label);    }  }  // Make focusable  this.setTabIndex(1);  this.addEventListener("keypress", this._onkeypress);  // Show the right date  var shownDate = (date != null) ? date : new Date();  this.showMonth(shownDate.getMonth(), shownDate.getFullYear());    // listen for locale changes  qx.locale.manager.Manager.getInstance().addEventListener("changeLocale", this._updateDatePane, this);  // Add the main widgets  this.add(navBar);  this.add(datePane);});
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/ad343543c36c591a38431574849066625b000531/DateChooser.js/clean/qooxdoo/frontend/framework/source/class/qx/ui/component/DateChooser.js