Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2011-02-02 14:29:36 +0000
committerIvan Furnadjiev2011-02-02 14:29:36 +0000
commit46538fe427e786cfab1861dedc0ad0b70f2cc6a5 (patch)
tree592e8d75a9137c63845f280cd1c3e99fc5bec3ed /bundles
parent00fd2c873a99802ed7a3af8ee1ce15adf34b45b3 (diff)
downloadorg.eclipse.rap-46538fe427e786cfab1861dedc0ad0b70f2cc6a5.tar.gz
org.eclipse.rap-46538fe427e786cfab1861dedc0ad0b70f2cc6a5.tar.xz
org.eclipse.rap-46538fe427e786cfab1861dedc0ad0b70f2cc6a5.zip
Fixed - bug 336057: CoolBar overlap its items
https://bugs.eclipse.org/bugs/show_bug.cgi?id=336057
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js6
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/resources/client.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js
index 919bc649c7..d9fa4c462e 100644
--- a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js
+++ b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 Innoopract Informationssysteme GmbH.
+ * Copyright (c) 2002, 2011 Innoopract Informationssysteme GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
+ * EclipseSource - ongoing development
******************************************************************************/
/**
* The parameter orientation must be one of "vertical" or "horizontal".
@@ -59,8 +60,7 @@ qx.Class.define( "org.eclipse.swt.widgets.CoolItem", {
setControl : function( control ) {
if( control != null ) {
// TODO [tb] : Control positioning is already handled by server
- control.setTop( 0 );
- control.setLeft( this.getLeft()
+ control.setLeft( this.getLeft()
+ org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET );
control.setDisplay( true );
}
diff --git a/bundles/org.eclipse.rap.rwt.q07/resources/client.js b/bundles/org.eclipse.rap.rwt.q07/resources/client.js
index 6cf2968bdb..cfe36a6014 100644
--- a/bundles/org.eclipse.rap.rwt.q07/resources/client.js
+++ b/bundles/org.eclipse.rap.rwt.q07/resources/client.js
@@ -200,7 +200,7 @@ qx.Class.define("org.eclipse.swt.widgets.List",{extend:org.eclipse.rwt.widgets.B
qx.Class.define("org.eclipse.swt.TabUtil",{statics:{createTabItem:function(g,f,a){var d=new qx.ui.pageview.tabview.Button();d.setTabIndex(null);d.setLabel($[138]);d.getLabelObject().setMode("html");d.setLabel("");d.setEnableElementFocus(false);d.addEventListener($[372],org.eclipse.swt.TabUtil._onTabItemChangeFocus);d.addEventListener($[28],org.eclipse.swt.TabUtil._onTabItemClick);var e=org.eclipse.swt.WidgetManager.getInstance();var b=e.findWidgetById(f);b.getBar().addAt(d,a);var c=new qx.ui.pageview.tabview.Page(d);b.getPane().add(c);e.add(d,g);e.add(c,g+"pg")},releaseTabItem:function(b){var c=org.eclipse.swt.WidgetManager.getInstance();var a=c.findWidgetById(b);a.removeEventListener($[372],org.eclipse.swt.TabUtil._onTabItemChangeFocus);a.removeEventListener($[28],org.eclipse.swt.TabUtil._onTabItemClick);c.dispose(b+"pg")},_onTabItemChangeFocus:function(a){if(a.getTarget().getFocused()){a.getTarget().getParent().getParent().focus()}},_onTabItemClick:function(a){var b=a.getTarget().getParent().getParent();if(!b.getFocused()){b.focus()}},onTabFolderKeyPress:function(a){var d=a.getTarget();if(d.classname==$[429]){var b=d.getBar().getManager();var c=b.getSelected();if(c!=null){switch(a.getKeyIdentifier()){case"Left":b.selectPrevious(c);org.eclipse.swt.TabUtil.markTabItemFocused(d,a.getTarget());a.stopPropagation();break;case $[53]:b.selectNext(c);org.eclipse.swt.TabUtil.markTabItemFocused(d,a.getTarget());a.stopPropagation();break}}}},onTabFolderChangeFocused:function(a){var c=a.getTarget();var b=c.getBar().getManager().getSelected();org.eclipse.swt.TabUtil.markTabItemFocused(c,b)},markTabItemFocused:function(d,c){var a=d.getBar().getManager().getItems();for(var b=0;b<a.length;b++){a[b].removeState($[120])}if(c!=null&&d.getFocused()){c.addState($[120])}},tabSelected:function(a){var b=a.getTarget();if(!org.eclipse.swt.EventUtil.getSuspended()&&b.getChecked()){var f=org.eclipse.swt.WidgetManager.getInstance();var d=f.findIdByWidget(b);var c=org.eclipse.swt.Request.getInstance();c.addParameter("org.eclipse.swt.events.widgetSelected.item",d);var e=f.findIdByWidget(b.getParent().getParent());org.eclipse.swt.EventUtil.doWidgetSelected(e,0,0,0,0)}}}});
qx.Class.define("org.eclipse.swt.widgets.DateTimeCalendar",{extend:qx.ui.layout.CanvasLayout,construct:function(c,b,a){arguments.callee.base.call(this);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this.setAppearance("datetime-calendar");this._hasSelectionListener=false;org.eclipse.swt.widgets.Calendar.MONTH_NAMES=b;org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES=a;this._calendar=new org.eclipse.swt.widgets.Calendar();this._calendar.addEventListener($[341],this._onChangeDate,this);this._calendar.setDate(new Date(74,5,6));this._calendar.setTabIndex(null);this.add(this._calendar);this.addEventListener($[40],this._onContextMenu,this);this.addEventListener($[12],this._onKeyPress,this);this.addEventListener($[49],this._onmousewheel,this);this.addEventListener($[73],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._updateSelectedDayState()},destruct:function(){this._calendar.removeEventListener($[341],this._onChangeDate,this);this.removeEventListener($[40],this._onContextMenu,this);this.removeEventListener($[12],this._onKeyPress,this);this.removeEventListener($[49],this._onmousewheel,this);this.removeEventListener($[73],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this._disposeObjects("_calendar")},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[54]){this._calendar.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[54]){this._calendar.removeState(a)}},_onChangeDate:function(){var a=this._calendar.getDate();this._sendChanges(a.getDate(),a.getMonth(),a.getFullYear())},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onKeyPress:function(a){this._calendar._onkeypress(a)},_onmousewheel:function(a){a.preventDefault();a.stopPropagation()},_onFocusIn:function(a){this._updateSelectedDayState()},_onFocusOut:function(a){this._updateSelectedDayState()},_updateSelectedDayState:function(){for(var a=0;a<6*7;a++){if(this.getFocused()){this._calendar._dayLabelArr[a].removeState($[84])}else{this._calendar._dayLabelArr[a].addState($[84])}}},_sendChanges:function(a,d,b){if(!org.eclipse.swt.EventUtil.getSuspended()){var f=org.eclipse.swt.WidgetManager.getInstance();var c=org.eclipse.swt.Request.getInstance();var e=f.findIdByWidget(this);c.addParameter(e+".day",a);c.addParameter(e+".month",d);c.addParameter(e+".year",b);if(this._hasSelectionListener){c.addEvent($[65],e);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();c.send()}}},setMonth:function(b){var a=this._calendar.getDate();a.setMonth(b);this._calendar.setDate(a)},setDay:function(b){var a=this._calendar.getDate();a.setDate(b);this._calendar.setDate(a)},setYear:function(b){var a=this._calendar.getDate();a.setYear(b);this._calendar.setDate(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},setFont:function(){}}});
qx.Class.define("org.eclipse.swt.widgets.Calendar",{extend:qx.ui.layout.BoxLayout,construct:function(c){arguments.callee.base.call(this);this.setOrientation($[44]);var b=new qx.ui.layout.BoxLayout;b.setAppearance("calendar-navBar");b.set({height:"auto",spacing:1});var f=new qx.ui.form.Button;var a=new qx.ui.form.Button;var m=new qx.ui.basic.Label;var g=new qx.ui.form.Button;var d=new qx.ui.form.Button;var l=org.eclipse.swt.WidgetManager.getInstance();l.setToolTip(f,"Previous year");l.setToolTip(a,"Previous month");l.setToolTip(g,"Next month");l.setToolTip(d,"Next year");f.set({show:"icon",spacing:0,tabIndex:null});f.setUserData($[205],true);a.set({show:"icon",tabIndex:null});a.setUserData($[205],true);g.set({show:"icon",tabIndex:null});g.setUserData($[205],true);d.set({show:"icon",tabIndex:null});d.setUserData($[205],true);f.setAppearance("calendar-toolbar-previous-year-button");a.setAppearance("calendar-toolbar-previous-month-button");g.setAppearance("calendar-toolbar-next-month-button");d.setAppearance("calendar-toolbar-next-year-button");f.addEventListener($[28],this._onNavButtonClicked,this);a.addEventListener($[28],this._onNavButtonClicked,this);g.addEventListener($[28],this._onNavButtonClicked,this);d.addEventListener($[28],this._onNavButtonClicked,this);this._lastYearBt=f;this._lastMonthBt=a;this._nextMonthBt=g;this._nextYearBt=d;m.setAppearance("calendar-monthyear");m.set({width:"1*"});b.add(f,a,m,g,d);this._monthYearLabel=m;b.setHtmlProperty("id","navBar");var o=new qx.ui.layout.CanvasLayout;o.setAppearance("calendar-datepane");o.set({width:org.eclipse.swt.widgets.Calendar.CELL_WIDTH*8,height:org.eclipse.swt.widgets.Calendar.CELL_HEIGHT*7});var k=new qx.ui.basic.Label;k.setAppearance($[523]);k.set({width:org.eclipse.swt.widgets.Calendar.CELL_WIDTH,height:org.eclipse.swt.widgets.Calendar.CELL_HEIGHT,left:0});k.addState("header");o.add(k);this._weekdayLabelArr=[];for(var e=1;e<8;e++){var k=new qx.ui.basic.Label;k.setAppearance("calendar-weekday");k.setSelectable(false);k.setCursor($[36]);k.set({width:org.eclipse.swt.widgets.Calendar.CELL_WIDTH,height:org.eclipse.swt.widgets.Calendar.CELL_HEIGHT,left:e*org.eclipse.swt.widgets.Calendar.CELL_WIDTH});o.add(k);this._weekdayLabelArr.push(k)}this._dayLabelArr=[];this._weekLabelArr=[];for(var h=0;h<6;h++){var k=new qx.ui.basic.Label;k.setAppearance($[523]);k.setSelectable(false);k.setCursor($[36]);k.set({width:org.eclipse.swt.widgets.Calendar.CELL_WIDTH,height:org.eclipse.swt.widgets.Calendar.CELL_HEIGHT,left:0,top:(h+1)*org.eclipse.swt.widgets.Calendar.CELL_HEIGHT});o.add(k);this._weekLabelArr.push(k);for(var j=1;j<8;j++){var k=new qx.ui.basic.Label;k.setAppearance($[189]);k.setSelectable(false);k.setCursor($[36]);k.set({width:org.eclipse.swt.widgets.Calendar.CELL_WIDTH,height:org.eclipse.swt.widgets.Calendar.CELL_HEIGHT,left:j*org.eclipse.swt.widgets.Calendar.CELL_WIDTH,top:(h+1)*org.eclipse.swt.widgets.Calendar.CELL_HEIGHT});k.addEventListener($[2],this._onDayClicked,this);k.addEventListener($[61],this._onDayDblClicked,this);k.addEventListener($[10],this._onDayMouseOver,this);k.addEventListener($[15],this._onDayMouseOut,this);k.setUserData($[189],true);o.add(k);this._dayLabelArr.push(k)}}var n=(c!=null)?c:new Date();this.showMonth(n.getMonth(),n.getFullYear());this.add(b);this.add(o);this.initWidth();this.initHeight()},events:{select:$[78]},statics:{CELL_WIDTH:24,CELL_HEIGHT:16,MONTH_NAMES:[],WEEKDAY_NAMES:[]},properties:{width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},shownMonth:{check:$[22],init:null,nullable:true,event:"changeShownMonth"},shownYear:{check:$[22],init:null,nullable:true,event:"changeShownYear"},date:{check:"Date",init:null,nullable:true,apply:"_applyDate",event:$[341],transform:"_checkDate"}},members:{addState:function(b){arguments.callee.base.call(this,b);if(b.substr(0,8)==$[54]){this._monthYearLabel.addState(b);for(var a=0;a<7;a++){this._weekdayLabelArr[a].addState(b)}for(var a=0;a<6*7;a++){this._dayLabelArr[a].addState(b)}for(var a=0;a<6;a++){this._weekLabelArr[a].addState(b)}}},removeState:function(b){arguments.callee.base.call(this,b);if(b.substr(0,8)==$[54]){this._monthYearLabel.removeState(b);for(var a=0;a<7;a++){this._weekdayLabelArr[a].removeState(b)}for(var a=0;a<6*7;a++){this._dayLabelArr[a].removeState(b)}for(var a=0;a<6;a++){this._weekLabelArr[a].removeState(b)}}},_checkDate:function(a){return(a==null)?null:new Date(a.getTime())},_applyDate:function(f,a){if((f!=null)&&(this.getShownMonth()!=f.getMonth()||this.getShownYear()!=f.getFullYear())){this.showMonth(f.getMonth(),f.getFullYear())}else{var e=(f==null)?-1:f.getDate();for(var c=0;c<6*7;c++){var d=this._dayLabelArr[c];if(d.hasState($[340])){if(d.hasState($[29])){d.removeState($[29])}}else{var b=parseInt(d.getText());if(b==e){d.addState($[29])}else{if(d.hasState($[29])){d.removeState($[29])}}}}}},_onNavButtonClicked:function(a){var b=this.getShownYear();var c=this.getShownMonth();switch(a.getTarget()){case this._lastYearBt:b--;break;case this._lastMonthBt:c--;if(c<0){c=11;b--}break;case this._nextMonthBt:c++;if(c>=12){c=0;b++}break;case this._nextYearBt:b++;break}this.showMonth(c,b)},_onDayClicked:function(a){if(a.isLeftButtonPressed()){var b=a.getTarget().dateTime;this.setDate(new Date(b))}},_onDayDblClicked:function(){this.createDispatchDataEvent("select",this.getDate())},_onDayMouseOver:function(a){a.getTarget().addState("over")},_onDayMouseOut:function(a){a.getTarget().removeState("over")},_onkeypress:function(a){var e=null;var b=null;var d=null;if(a.getModifiers()==0){switch(a.getKeyIdentifier()){case"Left":e=-1;a.preventDefault();a.stopPropagation();break;case $[53]:e=1;a.preventDefault();a.stopPropagation();break;case"Up":e=-7;a.preventDefault();a.stopPropagation();break;case"Down":e=7;a.preventDefault();a.stopPropagation();break;case $[58]:b=-1;a.preventDefault();a.stopPropagation();break;case $[55]:b=1;a.preventDefault();a.stopPropagation();break;case $[113]:if(this.getDate()!=null){this.setDate(null);a.preventDefault();a.stopPropagation();return true}a.preventDefault();a.stopPropagation();break;case"Home":case"End":a.preventDefault();a.stopPropagation();break;case $[69]:case $[89]:if(this.getDate()!=null){this.createDispatchDataEvent("select",this.getDate())}a.preventDefault();a.stopPropagation();return}}else{if(a.isShiftPressed()){switch(a.getKeyIdentifier()){case $[58]:d=-1;a.preventDefault();a.stopPropagation();break;case $[55]:d=1;a.preventDefault();a.stopPropagation();break}}}if(e!=null||b!=null||d!=null){var c=this.getDate();if(c!=null){c=new Date(c.getTime())}if(c==null){c=new Date()}else{if(e!=null){c.setDate(c.getDate()+e)}if(b!=null){c.setMonth(c.getMonth()+b)}if(d!=null){c.setFullYear(c.getFullYear()+d)}}this.setDate(c)}},showMonth:function(b,a){if((b!=null&&b!=this.getShownMonth())||(a!=null&&a!=this.getShownYear())){if(b!=null){this.setShownMonth(b)}if(a!=null){this.setShownYear(a)}this._updateDatePane()}},_updateDatePane:function(){var t=new Date();var d=t.getFullYear();var j=t.getMonth();var z=t.getDate();var a=this.getDate();var r=(a==null)?-1:a.getFullYear();var b=(a==null)?-1:a.getMonth();var w=(a==null)?-1:a.getDate();var e=this.getShownMonth();var q=this.getShownYear();var x=this.__getWeekStart();var u=new Date(this.getShownYear(),this.getShownMonth(),1);var f=this.getShownYear();var v=org.eclipse.swt.widgets.Calendar.MONTH_NAMES[this.getShownMonth()];this._monthYearLabel.setText(v+" "+f);var k=u.getDay();var g=(1+7-k)%7;for(var o=0;o<7;o++){var n=(o+x)%7;var m=this._weekdayLabelArr[o];u.setDate(g+n);var s=org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES[u.getDay()+1];m.setText(s);if(this.__isWeekend(n)){m.addState("weekend")}else{m.removeState("weekend")}}u=new Date(q,e,1);var p=(7+k-x)%7;u.setDate(u.getDate()-p);for(var l=0;l<6;l++){this._weekLabelArr[l].setText(""+this.__getWeekInYear(u));for(var o=0;o<7;o++){var m=this._dayLabelArr[l*7+o];var f=u.getFullYear();var v=u.getMonth();var h=u.getDate();var c=(r==f&&b==v&&w==h);if(c){m.addState($[29])}else{m.removeState($[29])}if(v!=e){m.addState($[340])}else{m.removeState($[340])}var y=(f==d&&v==j&&h==z);if(y){m.addState("today")}else{m.removeState("today")}m.setText(""+h);m.dateTime=u.getTime();u.setDate(u.getDate()+1)}}},__thursdayOfSameWeek:function(a){return new Date(a.getTime()+(3-((a.getDay()+6)%7))*86400000)},__getWeekInYear:function(a){var d=this.__thursdayOfSameWeek(a);var b=d.getFullYear();var c=this.__thursdayOfSameWeek(new Date(b,0,4));return Math.floor(1.5+(d.getTime()-c.getTime())/86400000/7)},__getWeekStart:function(){var a={MV:5,AE:6,AF:6,BH:6,DJ:6,DZ:6,EG:6,ER:6,ET:6,IQ:6,IR:6,JO:6,KE:6,KW:6,LB:6,LY:6,MA:6,OM:6,QA:6,SA:6,SD:6,SO:6,TN:6,YE:6,AS:0,AU:0,AZ:0,BW:0,CA:0,CN:0,FO:0,GE:0,GL:0,GU:0,HK:0,IE:0,IL:0,IS:0,JM:0,JP:0,KG:0,KR:0,LA:0,MH:0,MN:0,MO:0,MP:0,MT:0,NZ:0,PH:0,PK:0,SG:0,TH:0,TT:0,TW:0,UM:0,US:0,UZ:0,VI:0,ZA:0,ZW:0,MW:0,NG:0,TJ:0};var b=this.__getTerritory();return a[b]!=null?a[b]:1},__getWeekendStart:function(){var a={EG:5,IL:5,SY:5,IN:0,AE:4,BH:4,DZ:4,IQ:4,JO:4,KW:4,LB:4,LY:4,MA:4,OM:4,QA:4,SA:4,SD:4,TN:4,YE:4};var b=this.__getTerritory();return a[b]!=null?a[b]:6},__getWeekendEnd:function(){var a={AE:5,BH:5,DZ:5,IQ:5,JO:5,KW:5,LB:5,LY:5,MA:5,OM:5,QA:5,SA:5,SD:5,TN:5,YE:5,AF:5,IR:5,EG:6,IL:6,SY:6};var b=this.__getTerritory();return a[b]!=null?a[b]:0},__isWeekend:function(b){var c=this.__getWeekendStart();var a=this.__getWeekendEnd();if(a>c){return((b>=c)&&(b<=a))}else{return((b>=c)||(b<=a))}},__getTerritory:function(){var a=org.eclipse.rwt.Client.getTerritory()||org.eclipse.rwt.Client.getLanguage();return a.toUpperCase()}},destruct:function(){this._disposeObjects("_lastYearBt","_lastMonthBt","_nextMonthBt","_nextYearBt","_monthYearLabel");this._disposeObjectDeep("_weekdayLabelArr",1);this._disposeObjectDeep("_dayLabelArr",1);this._disposeObjectDeep("_weekLabelArr",1)}});
-qx.Class.define("org.eclipse.swt.widgets.CoolItem",{extend:qx.ui.layout.CanvasLayout,construct:function(a){arguments.callee.base.call(this);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this.setAppearance("coolitem");this._orientation=a;this._handle=new qx.ui.basic.Terminator();this._handle.addState(a);this._handle.setAppearance("coolitem-handle");this._handle.addEventListener($[2],this._onHandleMouseDown,this);this._handle.addEventListener($[48],this._onHandleMouseMove,this);this._handle.addEventListener($[17],this._onHandleMouseUp,this);this.add(this._handle);this._bufferedZIndex=null;this._bufferedControlZIndex=null;this._control=null},destruct:function(){if(this._handle!=null){this._handle.removeEventListener($[2],this._onHandleMouseDown,this);this._handle.removeEventListener($[48],this._onHandleMouseMove,this);this._handle.removeEventListener($[17],this._onHandleMouseUp,this);this._handle.dispose()}},statics:{DRAG_CURSOR:$[231],CONTROL_OFFSET:6},members:{setLocked:function(a){this._handle.setDisplay(!a)},setControl:function(a){if(a!=null){a.setTop(0);a.setLeft(this.getLeft()+org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET);a.setDisplay(true)}if(this._control!=null){this._control.setDisplay(false)}this._control=a},updateHandleBounds:function(){if(this._orientation==$[44]){this._handle.setWidth(this.getWidth())}else{this._handle.setHeight(this.getHeight())}},_onHandleMouseDown:function(a){this._handle.setCapture(true);this.getTopLevelWidget().setGlobalCursor(org.eclipse.swt.widgets.CoolItem.DRAG_CURSOR);this._offsetX=a.getPageX()-this.getLeft();this._offsetY=a.getPageY()-this.getTop();this._bufferedZIndex=this.getZIndex();this.setZIndex(10000000-1);if(this._control!=null){this._bufferedControlZIndex=this._control.getZIndex();this._control.setZIndex(10000000)}this.setBackgroundColor(this._findBackground())},_applyLeft:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c+org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET;this._control.setLeft(b)}},_applyWidth:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c-org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET;this._control.setWidth(b)}},_onHandleMouseMove:function(a){if(this._handle.getCapture()){this.setLeft(a.getPageX()-this._offsetX)}},_onHandleMouseUp:function(a){this._handle.setCapture(false);this.setZIndex(this._bufferedZIndex);if(this._control!=null){this._control.setZIndex(this._bufferedControlZIndex)}this.resetBackgroundColor();this.getTopLevelWidget().setGlobalCursor(null);if(!org.eclipse.swt.EventUtil.getSuspended()){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(this);var b=org.eclipse.swt.Request.getInstance();b.addEvent("org.eclipse.swt.events.widgetMoved",c);b.addParameter(c+$[293],this.getLeft());b.addParameter(c+$[294],this.getTop());b.send()}},_findBackground:function(){var b=true;var a=null;var c=this.getParent();while(b&&c!=null&&a==null){if(c.getBackgroundColor){a=c.getBackgroundColor()}if(c.getParent){c=c.getParent()}else{b=false}}return a}}});
+qx.Class.define("org.eclipse.swt.widgets.CoolItem",{extend:qx.ui.layout.CanvasLayout,construct:function(a){arguments.callee.base.call(this);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this.setAppearance("coolitem");this._orientation=a;this._handle=new qx.ui.basic.Terminator();this._handle.addState(a);this._handle.setAppearance("coolitem-handle");this._handle.addEventListener($[2],this._onHandleMouseDown,this);this._handle.addEventListener($[48],this._onHandleMouseMove,this);this._handle.addEventListener($[17],this._onHandleMouseUp,this);this.add(this._handle);this._bufferedZIndex=null;this._bufferedControlZIndex=null;this._control=null},destruct:function(){if(this._handle!=null){this._handle.removeEventListener($[2],this._onHandleMouseDown,this);this._handle.removeEventListener($[48],this._onHandleMouseMove,this);this._handle.removeEventListener($[17],this._onHandleMouseUp,this);this._handle.dispose()}},statics:{DRAG_CURSOR:$[231],CONTROL_OFFSET:6},members:{setLocked:function(a){this._handle.setDisplay(!a)},setControl:function(a){if(a!=null){a.setLeft(this.getLeft()+org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET);a.setDisplay(true)}if(this._control!=null){this._control.setDisplay(false)}this._control=a},updateHandleBounds:function(){if(this._orientation==$[44]){this._handle.setWidth(this.getWidth())}else{this._handle.setHeight(this.getHeight())}},_onHandleMouseDown:function(a){this._handle.setCapture(true);this.getTopLevelWidget().setGlobalCursor(org.eclipse.swt.widgets.CoolItem.DRAG_CURSOR);this._offsetX=a.getPageX()-this.getLeft();this._offsetY=a.getPageY()-this.getTop();this._bufferedZIndex=this.getZIndex();this.setZIndex(10000000-1);if(this._control!=null){this._bufferedControlZIndex=this._control.getZIndex();this._control.setZIndex(10000000)}this.setBackgroundColor(this._findBackground())},_applyLeft:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c+org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET;this._control.setLeft(b)}},_applyWidth:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c-org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET;this._control.setWidth(b)}},_onHandleMouseMove:function(a){if(this._handle.getCapture()){this.setLeft(a.getPageX()-this._offsetX)}},_onHandleMouseUp:function(a){this._handle.setCapture(false);this.setZIndex(this._bufferedZIndex);if(this._control!=null){this._control.setZIndex(this._bufferedControlZIndex)}this.resetBackgroundColor();this.getTopLevelWidget().setGlobalCursor(null);if(!org.eclipse.swt.EventUtil.getSuspended()){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(this);var b=org.eclipse.swt.Request.getInstance();b.addEvent("org.eclipse.swt.events.widgetMoved",c);b.addParameter(c+$[293],this.getLeft());b.addParameter(c+$[294],this.getTop());b.send()}},_findBackground:function(){var b=true;var a=null;var c=this.getParent();while(b&&c!=null&&a==null){if(c.getBackgroundColor){a=c.getBackgroundColor()}if(c.getParent){c=c.getParent()}else{b=false}}return a}}});
qx.Class.define($[552],{extend:org.eclipse.rwt.widgets.BasicButton,construct:function(a){arguments.callee.base.call(this,a);switch(a){case"push":case"toggle":this.setAppearance("push-button");break;case"check":this.setAppearance("check-box");break;case"radio":this.setAppearance("radio-button")}this.initTabIndex();this.addEventListener($[73],this._onFocus);this.addEventListener("blur",this._onBlur)},properties:{tabIndex:{refine:true,init:1}},members:{_afterRenderLayout:function(a){if(this.hasState($[120])){this._showFocusIndicator()}},_showFocusIndicator:function(){var b=org.eclipse.rwt.FocusIndicator.getInstance();var a=this.getCellNode(2)!=null?this.getCellNode(2):this.getCellNode(1);b.show(this,"Button-FocusIndicator",a)},_onFocus:function(a){this._showFocusIndicator()},_onBlur:function(b){var a=org.eclipse.rwt.FocusIndicator.getInstance();a.hide(this)}}});
qx.Class.define("org.eclipse.swt.widgets.DateTimeTime",{extend:qx.ui.layout.CanvasLayout,construct:function(a){arguments.callee.base.call(this);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this.setAppearance("datetime-time");this._short=qx.lang.String.contains(a,"short");this._medium=qx.lang.String.contains(a,"medium");this._long=qx.lang.String.contains(a,"long");this._hasSelectionListener=false;this._readyToSendChanges=true;this.addEventListener($[92],this._rwt_onChangeFont,this);this.addEventListener($[12],this._onKeyPress,this);this.addEventListener($[64],this._onKeyUp,this);this.addEventListener($[49],this._onMouseWheel,this);this.addEventListener($[40],this._onContextMenu,this);this.addEventListener($[73],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._focusedTextField=null;this._hoursTextField=new qx.ui.basic.Label("00");this._hoursTextField.setAppearance($[181]);this._hoursTextField.setUserData($[156],2);this._hoursTextField.addEventListener($[2],this._onMouseDown,this);this.add(this._hoursTextField);this._separator3=new qx.ui.basic.Label(":");this._separator3.setAppearance($[230]);this._separator3.addEventListener($[40],this._onContextMenu,this);this.add(this._separator3);this._minutesTextField=new qx.ui.basic.Label("00");this._minutesTextField.setAppearance($[181]);this._minutesTextField.setUserData($[156],2);this._minutesTextField.addEventListener($[2],this._onMouseDown,this);this.add(this._minutesTextField);this._separator4=new qx.ui.basic.Label(":");this._separator4.setAppearance($[230]);if(this._medium||this._long){this.add(this._separator4)}this._secondsTextField=new qx.ui.basic.Label("00");this._secondsTextField.setAppearance($[181]);this._secondsTextField.setUserData($[156],2);this._secondsTextField.addEventListener($[2],this._onMouseDown,this);if(this._medium||this._long){this.add(this._secondsTextField)}this._spinner=new qx.ui.form.Spinner();this._spinner.set({wrap:true,border:null,backgroundColor:null});this._spinner.setMin(0);this._spinner.setMax(23);this._spinner.setValue(0);this._spinner.addEventListener($[76],this._onSpinnerChange,this);this._spinner._textfield.setTabIndex(null);this._spinner._textfield.setFocused=function(){};this._spinner._textfield.setVisibility(false);this._spinner._upbutton.setAppearance($[456]);this._spinner._downbutton.setAppearance($[495]);this._spinner.removeEventListener($[12],this._spinner._onkeypress,this._spinner);this._spinner.removeEventListener($[26],this._spinner._onkeydown,this._spinner);this._spinner.removeEventListener($[64],this._spinner._onkeyup,this._spinner);this._spinner.removeEventListener($[49],this._spinner._onmousewheel,this._spinner);this.add(this._spinner);this._focusedTextField=this._hoursTextField},destruct:function(){this.removeEventListener($[92],this._rwt_onChangeFont,this);this.removeEventListener($[12],this._onKeyPress,this);this.removeEventListener($[64],this._onKeyUp,this);this.removeEventListener($[49],this._onMouseWheel,this);this.removeEventListener($[40],this._onContextMenu,this);this.removeEventListener($[73],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this._hoursTextField.removeEventListener($[2],this._onMouseDown,this);this._minutesTextField.removeEventListener($[2],this._onMouseDown,this);this._secondsTextField.removeEventListener($[2],this._onMouseDown,this);this._spinner.removeEventListener($[76],this._onSpinnerChange,this);this._disposeObjects("_hoursTextField","_minutesTextField","_secondsTextField",$[433],"_spinner","_separator3","_separator4")},statics:{HOURS_TEXTFIELD:8,MINUTES_TEXTFIELD:9,SECONDS_TEXTFIELD:10,HOURS_MINUTES_SEPARATOR:11,MINUTES_SECONDS_SEPARATOR:12,SPINNER:7,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[54]){this._hoursTextField.addState(a);this._minutesTextField.addState(a);this._secondsTextField.addState(a);this._spinner.addState(a);this._separator3.addState(a);this._separator4.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[54]){this._hoursTextField.removeState(a);this._minutesTextField.removeState(a);this._secondsTextField.removeState(a);this._spinner.removeState(a);this._separator3.removeState(a);this._separator4.removeState(a)}},_rwt_onChangeFont:function(a){var b=a.getValue();this._hoursTextField.setFont(b);this._minutesTextField.setFont(b);this._secondsTextField.setFont(b)},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onFocusIn:function(a){this._focusedTextField.addState($[29])},_onFocusOut:function(a){this._focusedTextField.removeState($[29])},_onMouseDown:function(a){this._setFocusedTextField(a.getTarget())},_setFocusedTextField:function(a){var b;this._focusedTextField.removeState($[29]);this._focusedTextField=null;if(a===this._hoursTextField){this._spinner.setMin(0);this._spinner.setMax(23);b=this._removeLeadingZero(this._hoursTextField.getText());this._spinner.setValue(parseInt(b,10))}else{if(a===this._minutesTextField){this._spinner.setMin(0);this._spinner.setMax(59);b=this._removeLeadingZero(this._minutesTextField.getText());this._spinner.setValue(parseInt(b,10))}else{if(a===this._secondsTextField){this._spinner.setMin(0);this._spinner.setMax(59);b=this._removeLeadingZero(this._secondsTextField.getText());this._spinner.setValue(parseInt(b,10))}}}this._focusedTextField=a;this._focusedTextField.addState($[29])},_onSpinnerChange:function(a){if(this._focusedTextField!=null){var b=this._focusedTextField.getText();var c=this._addLeadingZero(this._spinner.getValue());this._focusedTextField.setText(c);if(b!=c&&this._readyToSendChanges){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}}},_onKeyPress:function(a){var c=a.getKeyIdentifier();if(org.eclipse.swt.widgets.DateTimeTime._isNoModifierPressed(a)){switch(c){case"Left":if(this._focusedTextField===this._hoursTextField){if(this._short){this._setFocusedTextField(this._minutesTextField)}else{this._setFocusedTextField(this._secondsTextField)}}else{if(this._focusedTextField===this._minutesTextField){this._setFocusedTextField(this._hoursTextField)}else{if(this._focusedTextField===this._secondsTextField){this._setFocusedTextField(this._minutesTextField)}}}a.preventDefault();a.stopPropagation();break;case $[53]:if(this._focusedTextField===this._hoursTextField){this._setFocusedTextField(this._minutesTextField)}else{if(this._focusedTextField===this._minutesTextField){if(this._short){this._setFocusedTextField(this._hoursTextField)}else{this._setFocusedTextField(this._secondsTextField)}}else{if(this._focusedTextField===this._secondsTextField){this._setFocusedTextField(this._hoursTextField)}}}a.preventDefault();a.stopPropagation();break;case"Up":var b=this._spinner.getValue();if(b==this._spinner.getMax()){this._spinner.setValue(this._spinner.getMin())}else{this._spinner.setValue(b+1)}a.preventDefault();a.stopPropagation();break;case"Down":var b=this._spinner.getValue();if(b==this._spinner.getMin()){this._spinner.setValue(this._spinner.getMax())}else{this._spinner.setValue(b-1)}a.preventDefault();a.stopPropagation();break;case $[58]:case $[55]:case"Home":case"End":a.preventDefault();a.stopPropagation();break}}},_onKeyUp:function(a){var b=a.getKeyIdentifier();var e=this._focusedTextField.getText();e=this._removeLeadingZero(e);if(org.eclipse.swt.widgets.DateTimeTime._isNoModifierPressed(a)){switch(b){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":var d=this._focusedTextField.getUserData($[156]);var f=b;if(e.length<d){f=e+b}var c=parseInt(f,10);if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}else{f=b;c=parseInt(f,10);if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}}a.preventDefault();a.stopPropagation();break;case"Home":var f=this._spinner.getMin();this._spinner.setValue(f);a.preventDefault();a.stopPropagation();break;case"End":var f=this._spinner.getMax();this._spinner.setValue(f);a.preventDefault();a.stopPropagation();break}}},_onMouseWheel:function(a){if(this.getFocused()){a.preventDefault();a.stopPropagation();this._spinner._onmousewheel(a)}},_addLeadingZero:function(a){return a<10?"0"+a:""+a},_removeLeadingZero:function(c){var a=c;if(c.length==2){var b=c.substring(0,1);if(b=="0"){a=c.substring(1)}}return a},_sendChanges:function(){if(!org.eclipse.swt.EventUtil.getSuspended()){var c=org.eclipse.swt.WidgetManager.getInstance();var a=org.eclipse.swt.Request.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+".hours",this._removeLeadingZero(this._hoursTextField.getText()));a.addParameter(b+".minutes",this._removeLeadingZero(this._minutesTextField.getText()));a.addParameter(b+".seconds",this._removeLeadingZero(this._secondsTextField.getText()));if(this._hasSelectionListener){a.addEvent($[65],b);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();a.send()}this._readyToSendChanges=true}},setHours:function(a){this._hoursTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._hoursTextField){this._spinner.setValue(a)}},setMinutes:function(a){this._minutesTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._minutesTextField){this._spinner.setValue(a)}},setSeconds:function(a){this._secondsTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._secondsTextField){this._spinner.setValue(a)}},setHasSelectionListener:function(a){this._hasSelectionListener=a},setBounds:function(e,b,f,c,a){var d;switch(e){case org.eclipse.swt.widgets.DateTimeTime.HOURS_TEXTFIELD:d=this._hoursTextField;break;case org.eclipse.swt.widgets.DateTimeTime.MINUTES_TEXTFIELD:d=this._minutesTextField;break;case org.eclipse.swt.widgets.DateTimeTime.SECONDS_TEXTFIELD:d=this._secondsTextField;break;case org.eclipse.swt.widgets.DateTimeTime.HOURS_MINUTES_SEPARATOR:d=this._separator3;break;case org.eclipse.swt.widgets.DateTimeTime.MINUTES_SECONDS_SEPARATOR:d=this._separator4;break;case org.eclipse.swt.widgets.DateTimeTime.SPINNER:d=this._spinner;break}d.set({left:b,top:f,width:c,height:a})}}});
qx.Class.define("org.eclipse.swt.widgets.Slider",{extend:org.eclipse.swt.widgets.AbstractSlider,construct:function(a){arguments.callee.base.call(this,qx.lang.String.contains(a,$[52]));this._hasSelectionListener=false;this._requestScheduled=false;this.addEventListener($[40],this._onContextMenu,this);this.addEventListener($[12],this._onKeyPress,this)},statics:{SEND_DELAY:50,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{_configureAppearance:function(){this.setAppearance("slider");this._thumb.setAppearance("slider-thumb");this._minButton.setAppearance("slider-min-button");this._maxButton.setAppearance("slider-max-button")},setSelection:function(a){this._setSelection(a)},setMinimum:function(a){this._setMinimum(a)},setMaximum:function(a){this._setMaximum(a)},setIncrement:function(a){this._setIncrement(a)},setPageIncrement:function(a){this._setPageIncrement(a)},setThumb:function(a){this._setThumb(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},_setSelection:function(a){arguments.callee.base.call(this,a);this._scheduleSendChanges()},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onKeyPress:function(a){var c=a.getKeyIdentifier();var b;if(org.eclipse.swt.widgets.Slider._isNoModifierPressed(a)){switch(c){case"Left":b=this._selection-this._increment;a.preventDefault();a.stopPropagation();break;case"Down":if(this._horizontal){b=this._selection-this._increment}else{b=this._selection+this._increment}a.preventDefault();a.stopPropagation();break;case $[53]:b=this._selection+this._increment;a.preventDefault();a.stopPropagation();break;case"Up":if(this._horizontal){b=this._selection+this._increment}else{b=this._selection-this._increment}a.preventDefault();a.stopPropagation();break;case"Home":b=this._minimum;a.preventDefault();a.stopPropagation();break;case"End":b=this._maximum;a.preventDefault();a.stopPropagation();break;case $[55]:if(this._horizontal){b=this._selection-this._pageIncrement}else{b=this._selection+this._pageIncrement}a.preventDefault();a.stopPropagation();break;case $[58]:if(this._horizontal){b=this._selection+this._pageIncrement}else{b=this._selection-this._pageIncrement}a.preventDefault();a.stopPropagation();break}if(b!=undefined){if(b<this._minimum){b=this._minimum}if(b>this._maximum){b=this._maximum}this.setSelection(b);if(this._readyToSendChanges){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,org.eclipse.swt.widgets.Slider.SEND_DELAY)}}}},_onMouseWheel:function(a){if(this.getFocused()){arguments.callee.base.call(this,a);if(this._readyToSendChanges){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}}},_scheduleSendChanges:function(){if(!org.eclipse.swt.EventUtil.getSuspended()){if(!this._requestScheduled){this._requestScheduled=true;qx.client.Timer.once(this._sendChanges,this,org.eclipse.swt.widgets.Slider.SEND_DELAY)}}},_sendChanges:function(){var c=org.eclipse.swt.WidgetManager.getInstance();var a=org.eclipse.swt.Request.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+$[142],this._selection);if(this._hasSelectionListener){a.addEvent($[65],b);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();a.send()}this._requestScheduled=false}}});

Back to the top