Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2011-01-28 16:37:52 +0000
committerIvan Furnadjiev2011-01-28 16:37:52 +0000
commitdf489ab4568480c1c1e71f8d2c1fdda7d7bf2869 (patch)
tree30dd796640cd6300c43eedf8ad209bb2dec2fdb3 /bundles
parent3e42eafec21e964084dfd20f9ae70345d2ba1c4a (diff)
downloadorg.eclipse.rap-df489ab4568480c1c1e71f8d2c1fdda7d7bf2869.tar.gz
org.eclipse.rap-df489ab4568480c1c1e71f8d2c1fdda7d7bf2869.tar.xz
org.eclipse.rap-df489ab4568480c1c1e71f8d2c1fdda7d7bf2869.zip
Fix cell tooltips for column-less Table/TreeViewer.
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js4
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js2
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/resources/client.js4
3 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js
index 06067c95ab..799d144f35 100644
--- a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js
+++ b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js
@@ -1694,8 +1694,8 @@ qx.Class.define( "org.eclipse.rwt.widgets.Tree", {
if( this._hoverItem ) {
var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
var itemId = widgetManager.findIdByWidget( this._hoverItem );
- var columnIndex = -1;
var columns = this.getColumns();
+ var columnIndex = columns.length == 0 ? 0 : -1;
var element = this._clientArea.getElement();
var leftOffset = qx.bom.element.Location.getLeft( element );
for( var i = 0; columnIndex == -1 && i < columns.length; i++ ) {
@@ -1703,7 +1703,7 @@ qx.Class.define( "org.eclipse.rwt.widgets.Tree", {
if( pageX >= pageLeft && pageX < pageLeft + this._itemWidth[ i ] ) {
columnIndex = i;
}
- }
+ }
this._cellToolTip.setCell( itemId, columnIndex );
}
}
diff --git a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js
index 6107bf56ce..b627c980df 100644
--- a/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js
+++ b/bundles/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js
@@ -1752,8 +1752,8 @@ qx.Class.define( "org.eclipse.swt.widgets.Table", {
if( itemIndex != -1 ) {
var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
var itemId = widgetManager.findIdByWidget( this._items[ itemIndex ] );
- var columnIndex = -1;
var columns = this.getColumns();
+ var columnIndex = columns.length == 0 ? 0 : -1;
var element = this._clientArea.getElement();
var leftOffset = qx.bom.element.Location.getLeft( element );
for( var i = 0; columnIndex == -1 && i < columns.length; i++ ) {
diff --git a/bundles/org.eclipse.rap.rwt.q07/resources/client.js b/bundles/org.eclipse.rap.rwt.q07/resources/client.js
index 52761715e9..00202f180d 100644
--- a/bundles/org.eclipse.rap.rwt.q07/resources/client.js
+++ b/bundles/org.eclipse.rap.rwt.q07/resources/client.js
@@ -174,10 +174,10 @@ qx.Class.define("org.eclipse.rwt.TableDNDFeedback",{extend:qx.core.Object,constr
qx.Class.define("org.eclipse.rwt.DNDSupport",{type:$[30],extend:qx.core.Object,construct:function(){arguments.callee.base.call(this);this._dragSources={};this._dropTargets={};this._dropTargetEventQueue={};this._requestScheduled=false;this._currentDragSource=null;this._currentDropTarget=null;this._currentTargetWidget=null;this._currentMousePosition={x:0,y:0};this._actionOverwrite=null;this._dataTypeOverwrite=null;this._dropFeedbackRenderer=null;this._dropFeedbackFlags=0;this._dragFeedbackWidget=null;this._blockDrag=false},members:{registerDragSource:function(b,a){b.addEventListener($[75],this._dragStartHandler,this);b.addEventListener($[291],this._dragEndHandler,this);var c=b.toHashCode();this._dragSources[c]={dataTypes:[],actions:this._operationsToActions(a)}},setDragSourceTransferTypes:function(b,a){var c=b.toHashCode();this._dragSources[c]["dataTypes"]=a},deregisterDragSource:function(a){a.removeEventListener($[75],this._dragStartHandler,this);a.removeEventListener($[291],this._dragEndHandler,this);var b=a.toHashCode();delete this._dragSources[b]},isDragSource:function(a){var b=a.toHashCode();return typeof this._dragSources[b]!=$[8]},_dragStartHandler:function(a){var m=org.eclipse.swt.WidgetManager.getInstance();var g=a.getCurrentTarget();var c=m.findControl(a.getTarget());if(c==g&&!this._blockDrag){var d=g.toHashCode();var j=this._dragSources[d].dataTypes;if(j.length>0){for(var e=0;e<j.length;e++){a.addData(j[e],true)}this._actionOverwrite=null;this._currentDragSource=g;var b=qx.event.handler.DragAndDropHandler.getInstance();b.clearActions();var k=qx.ui.core.ClientDocument.getInstance();k.addEventListener($[10],this._onMouseOver,this);k.addEventListener($[26],this._onKeyEvent,this);k.addEventListener($[65],this._onKeyEvent,this);this.setCurrentTargetWidget(a.getOriginalTarget());var l=org.eclipse.swt.WidgetUtil;l._fakeMouseEvent(this._currentTargetWidget,$[15]);var h=b.__dragCache.sourceWidget;var f=this._getFeedbackWidget(c,h);b.setFeedbackWidget(f,10,20);a.startDrag();a.stopPropagation()}this._sendDragSourceEvent(g,"dragStart",a.getMouseEvent())}},_dragEndHandler:function(b){var c=b.getCurrentTarget();var d=b.getMouseEvent();this._blockDrag=true;if(!this._requestScheduled){var a=org.eclipse.swt.Request.getInstance();a.addEventListener("send",this._onSend,this)}this._sendDragSourceEvent(c,$[529],d);this._cleanUp()},_sendDragSourceEvent:function(c,e,g){var h=org.eclipse.swt.Request.getInstance();var j=org.eclipse.swt.WidgetManager.getInstance();var a=j.findIdByWidget(c);var i=0;var f=0;if(g instanceof qx.event.type.MouseEvent){i=g.getPageX();f=g.getPageY()}var d=$[515]+e;h.addEvent(d,a);h.addParameter(d+".x",i);h.addParameter(d+".y",f);var b=org.eclipse.swt.EventUtil.eventTimestamp();h.addParameter(d+".time",b);h.send()},registerDropTarget:function(b,a){b.addEventListener($[156],this._dragOverHandler,this);b.addEventListener($[265],this._dragMoveHandler,this);b.addEventListener($[308],this._dragOutHandler,this);b.addEventListener($[225],this._dragDropHandler,this);var c=b.toHashCode();this._dropTargets[c]={actions:this._operationsToActions(a)};b.setSupportsDropMethod(qx.lang.Function.returnTrue)},setDropTargetTransferTypes:function(b,a){b.setDropDataTypes(a)},deregisterDropTarget:function(a){a.setDropDataTypes([]);a.removeEventListener($[156],this._dragOverHandler,this);a.removeEventListener($[265],this._dragMoveHandler,this);a.removeEventListener($[308],this._dragOutHandler,this);a.removeEventListener($[225],this._dragDropHandler,this);var b=a.toHashCode();delete this._dropTargets[b];a.setSupportsDropMethod(null)},_dragOverHandler:function(a){var d=a.getCurrentTarget();var c=d.toHashCode();var e=a.getMouseEvent();this._currentDropTarget=d;var b=this._computeCurrentAction(e,d);this._setAction(b,null);this._sendDropTargetEvent(d,$[350],e,b);a.stopPropagation()},_dragMoveHandler:function(a){var c=a.getCurrentTarget();var d=a.getMouseEvent();this._currentMousePosition.x=d.getPageX();this._currentMousePosition.y=d.getPageY();var b=this._computeCurrentAction(d,c);this._setAction(b,d);this._sendDropTargetEvent(c,"dragOver",d,b);a.stopPropagation()},_dragOutHandler:function(b){var c=b.getCurrentTarget();var d=b.getMouseEvent();var a=qx.event.handler.DragAndDropHandler.getInstance();a.clearActions();this.setFeedback(c,null,0);this._currentDropTarget=null;this._actionOverwrite=null;this._dataTypeOverwrite=null;if(this._isDropTargetEventScheduled($[350])){this._cancelDropTargetEvent($[350]);this._cancelDropTargetEvent("dragOver")}else{this._sendDropTargetEvent(c,"dragLeave",d,"none")}b.stopPropagation()},_dragDropHandler:function(a){var c=a.getCurrentTarget();var d=a.getMouseEvent();var b=this._computeCurrentAction(d,c);this._sendDropTargetEvent(c,"dropAccept",d,b);a.stopPropagation()},_sendDropTargetEvent:function(h,j,n,g){var p=org.eclipse.swt.WidgetManager.getInstance();var c=p.findIdByWidget(h);var q=this._getCurrentItemTarget();var m=q!=null?p.findIdByWidget(q):null;var o=0;var l=0;if(n instanceof qx.event.type.MouseEvent){o=n.getPageX();l=n.getPageY()}else{o=this._currentMousePosition.x;l=this._currentMousePosition.y}var a=p.findIdByWidget(this._currentDragSource);var e=org.eclipse.swt.EventUtil.eventTimestamp();var f=g==$[102]?"link":g;var i=$[515]+j;var b={};b.id=c;b.eventName=i;var d={};d[i+".x"]=o;d[i+".y"]=l;d[i+".item"]=m;d[i+".operation"]=f;d[i+".feedback"]=this._dropFeedbackFlags;d[i+".dataType"]=this._dataTypeOverwrite;d[i+".source"]=a;d[i+".time"]=e;b.param=d;this._dropTargetEventQueue[j]=b;if(!this._requestScheduled){var k=org.eclipse.swt.Request.getInstance();k.addEventListener("send",this._onSend,this);this._requestScheduled=true;qx.client.Timer.once(k.send,k,200)}},_isDropTargetEventScheduled:function(a){return typeof this._dropTargetEventQueue[a]!=$[8]},_cancelDropTargetEvent:function(a){delete this._dropTargetEventQueue[a]},_setPropertyRetroactively:function(g,f,e){var d=org.eclipse.swt.WidgetManager.getInstance();for(var b in this._dropTargetEventQueue){var c=this._dropTargetEventQueue[b];if(c.id==d.findIdByWidget(g)){var a=c.eventName;c.param[a+"."+f]=e}}},_attachTropTargetEvents:function(){var e=org.eclipse.swt.Request.getInstance();var b=this._dropTargetEventQueue;for(var c in b){var d=b[c];e.addEvent(d.eventName,d.id);for(var a in d.param){e.addParameter(a,d.param[a])}}this._dropTargetEventQueue={}},_getCurrentItemTarget:function(){var b=null;var e=this._getCurrentFeedbackTarget();if(e instanceof org.eclipse.swt.widgets.TableRow){var d=this._currentDropTarget;var c=e.getItemIndex();b=d._items[c]}if(e instanceof org.eclipse.rwt.widgets.TreeRow){var a=this._currentDropTarget;b=a._findItemByRow(e)}else{b=e}return b},_setAction:function(d,a){var b=qx.event.handler.DragAndDropHandler.getInstance();var c=b.getCurrentAction();if(c!=d){b.clearActions();b.setAction(d);if(a!=null){this._sendDropTargetEvent(this._currentDropTarget,"dragOperationChanged",a,d)}}},_operationsToActions:function(b){var a={};for(var c=0;c<b.length;c++){var d=b[c]=="link"?$[102]:b[c];a[d]=d!=null}return a},_computeCurrentAction:function(f,g){var j;if(this._actionOverwrite!=null){j=this._actionOverwrite}else{j="move";var b=f.isShiftPressed();var a=f.isCtrlPressed();var d=f.isAltPressed();if(a&&!b&&!d){j="copy"}else{if(d&&!b&&!a){j=$[102]}else{if(!d&&b&&a){j=$[102]}}}var i=g.toHashCode();var e=this._dropTargets[i].actions;var h=this._currentDragSource.toHashCode();var c=this._dragSources[h].actions;if(!c[j]||!e[j]){j="none"}}return j},_createFeedback:function(a){if(this._dropFeedbackRenderer==null){if(a instanceof org.eclipse.rwt.widgets.Tree){this._dropFeedbackRenderer=new org.eclipse.rwt.TreeDNDFeedback(a)}else{if(a instanceof org.eclipse.swt.widgets.Table){this._dropFeedbackRenderer=new org.eclipse.rwt.TableDNDFeedback(a)}}}},_renderFeedback:function(){if(this._dropFeedbackRenderer!=null){var a=this._getCurrentFeedbackTarget();this._dropFeedbackRenderer.renderFeedback(a)}},_getCurrentFeedbackTarget:function(){var a=null;var b=this._currentTargetWidget;if(b instanceof org.eclipse.swt.widgets.TableRow||b instanceof org.eclipse.rwt.widgets.TreeRow){a=b}return a},_getFeedbackWidget:function(c,b){var a=b;var d=false;if(this._dragFeedbackWidget==null){this._dragFeedbackWidget=new org.eclipse.rwt.widgets.MultiCellWidget([$[37],$[89]]);this._dragFeedbackWidget.setOpacity(0.7);this._dragFeedbackWidget.setEnabled(false);this._dragFeedbackWidget.setPadding(2)}while(!d&&a!=c){if(a instanceof org.eclipse.rwt.widgets.TreeRow){d=true;this._configureTreeRowFeedback(a)}else{if(a instanceof org.eclipse.swt.widgets.TableRow){d=true;this.configureTableRowFeedback(a)}}if(!d){a=a.getParent()}}return d?this._dragFeedbackWidget:null},_configureTreeRowFeedback:function(h){var f=this._dragFeedbackWidget;var a=this._currentDragSource;var e=a._findItemByRow(h);if(e!=null){var g=e.getImage(a._treeColumn);if(g!=null){f.setCellContent(0,g);var c=a.getItemImageWidth(e,a._treeColumn);f.setCellDimension(0,c,a.getItemHeight())}var b=e.getCellBackground(a._treeColumn);var d=e.getCellForeground(a._treeColumn);f.setBackgroundColor(b);f.setTextColor(d);f.setCellContent(1,e.getText(a._treeColumn));f.setFont(a.getFont())}},configureTableRowFeedback:function(c){var d=this._dragFeedbackWidget;if(c.getElement().childNodes.length>0){var b=c.getElement();var a=b.childNodes[0];d.setCellContent(1,a.innerHTML);d.setFont(c.getFont());if(a.style.backgroundColor!=""){d.setBackgroundColor(a.style.backgroundColor)}else{d.setBackgroundColor(b.style.backgroundColor)}if(a.style.color!=""){d.setTextColor(a.style.color)}else{d.setTextColor(b.style.color)}}},_resetFeedbackWidget:function(){if(this._dragFeedbackWidget!=null){this._dragFeedbackWidget.setParent(null);this._dragFeedbackWidget.setFont(null);this._dragFeedbackWidget.setCellContent(0,null);this._dragFeedbackWidget.setCellDimension(0,null,null);this._dragFeedbackWidget.setCellContent(1,null);this._dragFeedbackWidget.setBackgroundColor(null)}},_onSend:function(b){this._attachTropTargetEvents();this._requestScheduled=false;this._blockDrag=false;var a=org.eclipse.swt.Request.getInstance();a.removeEventListener("send",this._onSend,this)},_onMouseOver:function(b){var c=b.getTarget();if(this._dropFeedbackRenderer!=null){var a=b.getDomTarget();if(!this._dropFeedbackRenderer.isFeedbackNode(a)){this.setCurrentTargetWidget(c)}}else{this.setCurrentTargetWidget(c)}},setCurrentTargetWidget:function(a){this._currentTargetWidget=a;this._renderFeedback()},_onKeyEvent:function(b){if(b.getType()==$[65]&&b.getKeyIdentifier()=="Alt"){this._sendDragSourceEvent(this._currentDragSource,$[529],b);this.cancel()}else{if(this._currentDropTarget!=null){var a=qx.event.handler.DragAndDropHandler.getInstance();var c=this._computeCurrentAction(b,this._currentDropTarget);this._setAction(c,b);a._renderCursor()}}},_cleanUp:function(){var b=org.eclipse.swt.WidgetUtil;b._fakeMouseEvent(this._currentTargetWidget,$[10]);this.setCurrentTargetWidget(null);if(this._currentDropTarget!=null){this.setFeedback(this._currentDropTarget,null,0);this._currentDropTarget=null}var a=qx.event.handler.DragAndDropHandler.getInstance();a.setFeedbackWidget(null);this._resetFeedbackWidget();this._currentDragSource=null;this._dataTypeOverwrite=null;this._currentMousePosition.x=0;this._currentMousePosition.y=0;var c=qx.ui.core.ClientDocument.getInstance();c.removeEventListener($[10],this._onMouseOver,this);c.removeEventListener($[26],this._onKeyEvent,this);c.removeEventListener($[65],this._onKeyEvent,this)},cancel:function(){if(this._currentDragSource!=null){var a=qx.event.handler.DragAndDropHandler.getInstance();a.globalCancelDrag();this._cleanUp()}},setOperationOverwrite:function(d,a){if(d==this._currentDropTarget){var c=a=="link"?$[102]:a;var b=qx.event.handler.DragAndDropHandler.getInstance();this._actionOverwrite=c;this._setAction(c,null);b._renderCursor()}this._setPropertyRetroactively(d,"operation",a)},setFeedback:function(e,b,a){if(e==this._currentDropTarget){if(b!=null){this._createFeedback(e);if(this._dropFeedbackRenderer!=null){var d={};for(var c=0;c<b.length;c++){d[b[c]]=true}this._dropFeedbackRenderer.setFeedback(d);this._renderFeedback()}}else{if(this._dropFeedbackRenderer!=null){this._dropFeedbackRenderer.dispose();this._dropFeedbackRenderer=null}}this._dropFeedbackFlags=a}},setDataType:function(b,a){if(b==this._currentDropTarget){this._dataTypeOverwrite=a}this._setPropertyRetroactively(b,"dataType",a)}}});
qx.Class.define("org.eclipse.swt.widgets.TableRow",{extend:qx.ui.embed.HtmlEmbed,construct:function(){arguments.callee.base.call(this);this.setAppearance("table-row");this.setSelectable(false);this._itemIndex=-1;this._variant=null;this.addEventListener($[10],this._onMouseOver,this);this.addEventListener($[15],this._onMouseOut,this);var a={};a.over=true;var d=new org.eclipse.swt.theme.ThemeValues(a);var b=d.getCssColor($[301],$[6]);var c=d.getCssColor($[301],$[5]);this._hasHoverColorsDefined=b!=$[8]||c!=$[8];d.dispose()},destruct:function(){this.removeEventListener($[10],this._onMouseOver,this);this.removeEventListener($[15],this._onMouseOut,this)},events:{changeOverState:$[358]},members:{setLinesVisible:function(a){if(a){this.addState($[157])}else{this.removeState($[157])}},setItemIndex:function(a){if(a!=this._itemIndex){this._itemIndex=a;if(a%2==0){this.addState("even")}else{this.removeState("even")}if(a==-1){this.removeState("over")}}},getItemIndex:function(){return this._itemIndex},setVariant:function(a){if(this._variant!=null&&this._variant!=a){this.removeState(this._variant)}if(a!=null&&a!=this._variant){this.addState(a)}this._variant=a},addState:function(a){var b=this.hasState("over");arguments.callee.base.call(this,a);if(a==="over"&&!b){this.createDispatchChangeEvent($[302],true,false)}},removeState:function(a){var b=this.hasState("over");arguments.callee.base.call(this,a);if(a==="over"&&b){this.createDispatchChangeEvent($[302],false,true)}},hasHoverColorsDefined:function(){return this._hasHoverColorsDefined},_onMouseOver:function(a){if(this._itemIndex!=-1){this.addState("over")}},_onMouseOut:function(a){this.removeState("over")},_applyStateStyleFocus:qx.core.Variant.select($[0],{mshtml:function(a){},gecko:function(a){if(a.itemFocused){this.setStyleProperty("MozOutline",$[322])}else{this.removeStyleProperty("MozOutline")}},"default":function(a){if(a.itemFocused){this.setStyleProperty($[117],$[322])}else{this.removeStyleProperty($[117])}}})}});
qx.Class.define("org.eclipse.swt.theme.ThemeValues",{extend:qx.core.Object,construct:function(a){if(a===undefined){this.warn("no states given")}this._states=a;this._store=org.eclipse.swt.theme.ThemeStore.getInstance()},statics:{NONE_IMAGE:null,NONE_IMAGE_SIZED:[null,0,0]},members:{hasValue:function(e,d){var a=false;var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();for(var f in b){if(typeof b[f][c]!=$[8]){a=true}}return a},getCssBorder:function(g,f){var e=this._store.getCssValue(g,this._states,f);var d=this._store.getThemeValues();var b=d.borders[e];e=this._store.getCssValue(g,this._states,$[398]);var a=d.boxdims[e];if(a!=null&&(a[0]>0||a[1]>0||a[2]>0||a[3]>0)&&b instanceof qx.ui.core.Border){var h=b.getWidthTop();var c=b.getColorTop();b=new org.eclipse.rwt.RoundedBorder(h);b.setRadii(a);b.setColor(c)}return b},getCssColor:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.colors[c];return a},getCssFont:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.fonts[c];return a},getCssDimension:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.dimensions[c];return a},getCssBoxDimensions:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.boxdims[c];return a},getCssBoolean:function(c,b){var a=this._store.getCssValue(c,this._states,b);return a},getCssFloat:function(c,b){var a=this._store.getCssValue(c,this._states,b);return parseFloat(a)},getCssIdentifier:function(c,b){var a=this._store.getCssValue(c,this._states,b);return a},getCssImage:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.images[c];if(a!=null){a=$[326]+a[0]}else{a=org.eclipse.swt.theme.ThemeValues.NONE_IMAGE}return a},getCssSizedImage:function(d,c){var b=this._store.getCssValue(d,this._states,c);var e=this._store.getThemeValues().images[b];var a;if(e!=null){a=[$[326]+e[0],e[1],e[2]]}else{a=org.eclipse.swt.theme.ThemeValues.NONE_IMAGE_SIZED}return a},getCssGradient:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.gradients[c];return a},getCssCursor:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.cursors[c];if(c===a){a="rwt-resources/themes/cursors/"+a}return a},getCssAnimation:function(e,d){var c=this._store.getCssValue(e,this._states,d);var b=this._store.getThemeValues();var a=b.animations[c];return a}}});
-qx.Class.define("org.eclipse.rwt.widgets.Tree",{extend:qx.ui.layout.CanvasLayout,construct:function(){arguments.callee.base.call(this);this._rootItem=new org.eclipse.rwt.widgets.TreeItem();this._rootItem.setExpanded(true);this._hasCheckBoxes=false;this._hasFullSelection=false;this._isVirtual=false;this._hasMultiSelection=false;this._topItem=null;this._leadItem=null;this._topItemIndex=0;this._selection=[];this._focusItem=null;this._hoverItem=null;this._hoverElement=null;this._renderQueue={};this._resizeLine=null;this._linesVisible=false;this._selectionTimestamp=null;this._delayedSelection=false;this._headerHeight=0;this._itemHeight=16;this._checkBoxLeft=null;this._checkBoxWidth=null;this._hasSelectionListeners=false;this._selectionPadding=null;this._alignment=[];this._itemLeft=[];this._itemWidth=[];this._itemImageLeft=[];this._itemImageWidth=[];this._itemTextLeft=[];this._itemTextWidth=[];this._indentionWidth=16;this._columnCount=0;this._treeColumn=0;this._mergeEventsTimer=new qx.client.Timer(50);this._sendRequestTimer=null;this._vertGridBorder=null;this._horzGridBorder=null;this._clientArea=new qx.ui.layout.VerticalBoxLayout();this._columnArea=new qx.ui.layout.CanvasLayout();this._dummyColumn=new qx.ui.basic.Atom();this._horzScrollBar=new org.eclipse.rwt.widgets.ScrollBar(true);this._vertScrollBar=new org.eclipse.rwt.widgets.ScrollBar(false);this._hasScrollBarsSelectionListener=false;this._rows=this._clientArea.getChildren();this._vertGridLines=[];this.add(this._columnArea);this.add(this._clientArea);this.add(this._horzScrollBar);this.add(this._vertScrollBar);this._cellToolTip=null;this.setCursor($[35]);this.setOverflow($[14]);this.setAppearance("tree");this._configureAreas();this._configureScrollBars();this._registerListeners()},destruct:function(){this._rootItem.removeEventListener("update",this._onItemUpdate,this);this._rootItem.dispose();this._rootItem=null;if(this._sendRequestTimer!=null){this._sendRequestTimer.dispose();this._sendRequestTimer=null}this._mergeEventsTimer.dispose();this._mergeEventsTimer=null;this._dummyColumn=null;this._clientArea=null;this._columnArea=null;this._horzScrollBar=null;this._vertScrollBar=null;this._rows=null;this._topItem=null;this._leadItem=null;this._focusItem=null;this._hoverItem=null;this._hoverElement=null;this._resizeLine=null;if(this._cellToolTip){this._cellToolTip.destroy();this._cellToolTip=null}},members:{_registerListeners:function(){this._rootItem.addEventListener("update",this._onItemUpdate,this);this.addEventListener($[279],this._scheduleUpdate,this);this.addEventListener($[94],this._scheduleUpdate,this);this.addEventListener($[2],this._onMouseDown,this);this.addEventListener($[16],this._onMouseUp,this);this.addEventListener($[10],this._onMouseOver,this);this.addEventListener($[15],this._onMouseOut,this);this.addEventListener($[328],this._onElementChange,this);this.addEventListener("elementOut",this._onElementChange,this);this.addEventListener($[12],this._onKeyPress,this);this._clientArea.addEventListener($[49],this._onClientAreaMouseWheel,this);this._mergeEventsTimer.addEventListener($[59],this._updateTopItemIndex,this);this._horzScrollBar.addEventListener($[78],this._onHorzScrollBarChangeValue,this);this._vertScrollBar.addEventListener($[78],this._onVertScrollBarChangeValue,this)},_configureScrollBars:function(){var a=function(d){d.stopPropagation()};var b=this._vertScrollBar.getPreferredBoxWidth();var c=this._horzScrollBar.getPreferredBoxHeight();this._horzScrollBar.setZIndex(100000000);this._horzScrollBar.setVisibility(false);this._horzScrollBar.setLeft(0);this._horzScrollBar.setMergeEvents(false);this._horzScrollBar.setHeight(c);this._horzScrollBar.addEventListener($[75],a);this._vertScrollBar.setZIndex(100000000);this._vertScrollBar.setVisibility(false);this._vertScrollBar.setWidth(b);this._vertScrollBar.setIncrement(16);this._vertScrollBar.setMergeEvents(false);this._vertScrollBar.addEventListener($[75],a)},_configureAreas:function(){this._clientArea.setOverflow($[14]);this._clientArea.addEventListener($[24],this._onClientAreaAppear,this);this._columnArea.setOverflow($[14]);this._columnArea.addEventListener($[24],this._onColumnAreaAppear,this);this._columnArea.setTop(0);this._columnArea.setLeft(0);this._columnArea.setDisplay(false);var a=function(b){b.stopPropagation()};this._columnArea.addEventListener($[75],a);this._dummyColumn.setAppearance($[560]);this._dummyColumn.setHeight("100%");this._dummyColumn.setLabel("&nbsp;");this._dummyColumn.addState("dummy");this._columnArea.add(this._dummyColumn)},_createSendRequestTimer:function(){if(this._sendRequestTimer===null){var b=new qx.client.Timer(400);var a=org.eclipse.swt.Request.getInstance();b.addEventListener($[59],a.send,a);a.addEventListener("send",b.stop,b);this._sendRequestTimer=b}},setCheckBoxMetrics:function(b,a){this._checkBoxLeft=b;this._checkBoxWidth=a},setHasCheckBoxes:function(a){this._hasCheckBoxes=a},setHasFullSelection:function(a){this._hasFullSelection=a},setHasMultiSelection:function(a){this._hasMultiSelection=a},setHasNoScroll:function(a){if(a){this._clientArea.removeEventListener($[49],this._onClientAreaMouseWheel,this)}},setIndentionWidth:function(a){this._indentionWidth=a},setSelectionPadding:function(b,a){this._selectionPadding=[b,a]},setIsVirtual:function(a){this._isVirtual=a;if(a){this._createSendRequestTimer()}},setHeaderVisible:function(a){this._columnArea.setDisplay(a);this._layoutX();this._layoutY();this._scheduleUpdate(true)},setHeaderHeight:function(a){this._headerHeight=a;this._layoutX();this._layoutY();this._scheduleUpdate(true)},setItemHeight:function(a){this._itemHeight=a;this._vertScrollBar.setIncrement(a);for(var b=0;b<this._rows.length;b++){this._rows[b].setHeight(a)}this._scheduleUpdate(true,true)},setColumnCount:function(a){this._columnCount=a;this._scheduleUpdate();this._updateScrollWidth();this._renderGridVertical()},setItemMetrics:function(e,f,d,b,c,a,g){this._itemLeft[e]=f;this._itemWidth[e]=d;this._itemImageLeft[e]=b;this._itemImageWidth[e]=c;this._itemTextLeft[e]=a;this._itemTextWidth[e]=g;this._scheduleUpdate();this._renderGridVertical();this._updateScrollWidth()},setTreeColumn:function(a){this._treeColumn=a},setTopItemIndex:function(a){this._updateScrollHeight();this._vertScrollBar.setValue(a*this._itemHeight)},setScrollLeft:function(a){this._horzScrollBar.setValue(a)},selectItem:function(a){this._selectItem(a,false);this._scheduleItemUpdate(a)},deselectItem:function(a){this._deselectItem(a,false);this._scheduleItemUpdate(a)},setFocusItem:function(a){this._focusItem=a},setScrollBarsVisible:function(b,a){if(!b){this._horzScrollBar.setValue(0)}this._horzScrollBar.setVisibility(b);if(!a){this._vertScrollBar.setValue(0)}this._vertScrollBar.setVisibility(a);this._layoutX();this._layoutY()},setHasSelectionListeners:function(a){this._hasSelectionListeners=a},setAlignment:function(a,b){this._alignment[a]=b;this._scheduleUpdate()},setLinesVisible:function(b){this._linesVisible=b;if(b){this.addState($[157])}else{this.removeState($[157])}for(var a=0;a<this._rows.length;a++){this._rows[a].updateGridlinesState(b)}this._scheduleUpdate();this._renderGridHorizontal();this._renderGridVertical()},hasNoColumns:function(){return this._columnCount===0},getSelectionPadding:function(){return this._selectionPadding},getItemHeight:function(){return this._itemHeight},getItemLeft:function(c,b,d){var a=this._itemLeft[b];if(d&&this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemWidth:function(c,b,d){var a=this._itemWidth[b];if(d&&this.isTreeColumn(b)){a-=this.getIndentionOffset(1)}return a},getItemImageLeft:function(c,b){var a=this._itemImageLeft[b];if(this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemImageWidth:function(c,b){var a=this._itemImageWidth[b];if(this.isTreeColumn(b)){var d=this.getItemImageLeft(c,b);a=this._correctWidth(a,d,c,b)}return a},getItemTextLeft:function(c,b){var a=this._itemTextLeft[b];if(this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemTextWidth:function(c,b){var a=this._itemTextWidth[b];if(this.isTreeColumn(b)){var d=this.getItemTextLeft(c,b);a=this._correctWidth(a,d,c,b)}return a},getIndentionOffset:function(a){return this._indentionWidth*a},getHasCheckBoxes:function(){return this._hasCheckBoxes},getHasFullSelection:function(){return this._hasFullSelection},getHasMultiSelection:function(){return this._hasMultiSelection},getIsVirtual:function(){return this._isVirtual},getCheckBoxLeft:function(a){return this._correctOffset(this._checkBoxLeft,a)},getCheckBoxWidth:function(b){var a=this._checkBoxWidth;var c=this.getCheckBoxLeft(b);return this._correctWidth(a,c,b,0)},getColumnCount:function(){return Math.max(1,this._columnCount)},getColumns:function(){return this._columnArea.getChildren().slice(1)},getRootItem:function(){return this._rootItem},isTreeColumn:function(a){return a===this._treeColumn},getTreeColumnWidth:function(){return this._itemWidth[this._treeColumn]},isFocusItem:function(a){return this._focusItem===a},isHoverItem:function(a){return this._hoverItem===a},isHoverElement:function(a){return a!==null&&this._hoverElement===a},isItemSelected:function(a){return this._selection.indexOf(a)!=-1},getAlignment:function(a){return this._alignment[a]?this._alignment[a]:"left"},getStatesCopy:function(){if(!this.__states){this.__states={}}var b={};for(var a in this.__states){b[a]=true}return b},_addColumn:function(a){a.setHeight("100%");a.addEventListener($[57],this._updateScrollWidth,this);this._hookColumnMove(a);this._columnArea.add(a)},_hookColumnMove:function(a){a.addEventListener($[145],this._updateScrollWidth,this)},_unhookColumnMove:function(a){a.removeEventListener($[145],this._updateScrollWidth,this)},_removeColumn:function(a){this._unhookColumnMove(a);a.removeEventListener($[57],this._updateScrollWidth,this);this._columnArea.remove(a);this._updateScrollWidth();this._updateRows()},_onColumnChangeSize:function(a){this._updateScrollWidth()},_showResizeLine:function(b){if(this._resizeLine===null){this._resizeLine=new qx.ui.basic.Terminator();this._resizeLine.setAppearance($[410]);this.add(this._resizeLine);qx.ui.core.Widget.flushGlobalQueues()}var d=this._clientArea.getTop();this._resizeLine._renderRuntimeTop(d);var c=b-2-this._horzScrollBar.getValue();this._resizeLine._renderRuntimeLeft(c);var a=this._clientArea.getHeight();this._resizeLine._renderRuntimeHeight(a);this._resizeLine.removeStyleProperty($[147])},_hideResizeLine:function(){this._resizeLine.setStyleProperty($[147],$[14])},_onItemUpdate:function(b){var a=b.getTarget();if(b.getData()===$[309]){if(this._isChildOf(this._focusItem,a)){this.setFocusItem(a)}}if(b.getData()==="remove"){var c=b.getRelatedTarget();this._deselectItem(c,false);if(this._topItem===c){this._topItem=null}if(this._leadItem===c){this._leadItem=null}if(this._focusItem===c){this._focusItem=null}if(this._hoverItem===c){this._hoverItem=null}}this._sendItemChange(a,b);this._renderItemChange(a,b)},_onVertScrollBarChangeValue:function(){if(this._vertScrollBar._internalValueChange){this._mergeEventsTimer.start()}else{this._updateTopItemIndex()}},_updateTopItemIndex:function(){this._mergeEventsTimer.stop();var a=this._vertScrollBar.getValue();var b=this._topItemIndex;this._topItemIndex=Math.ceil(a/this._itemHeight);this._updateTopItem(b);if(this._inServerResponse()){this._updateRowsEvenState();this._scheduleUpdate()}else{this._sendTopItemIndexChange();this._scrollContentVertical(b)}},_updateRowsEvenState:function(){for(var a=0;a<this._rows.length;a++){this._rows[a].updateEvenState(this._topItemIndex+a)}},_onHorzScrollBarChangeValue:function(){if(this._clientArea.isSeeable()){this._clientArea.setScrollLeft(this._horzScrollBar.getValue())}if(this._columnArea.isSeeable()){this._columnArea.setScrollLeft(this._horzScrollBar.getValue())}this._renderGridVertical();this._sendScrollLeftChange()},_onMouseDown:function(a){this._delayedSelection=false;var b=a.getOriginalTarget();if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowMouseDown(b,a)}},_onMouseUp:function(a){if(this._delayedSelection){this._onMouseDown(a)}},_onRowMouseDown:function(d,c){var b=this._findItemByRow(d);if(b!=null){if(d.isExpandSymbolTarget(c)&&b.hasChildren()){var a=!b.isExpanded();if(!a){this._deselectVisibleChildren(b)}b.setExpanded(a)}else{if(d.isCheckBoxTarget(c)){b.setChecked(!b.isChecked());this._sendItemCheckedChange(b)}else{if(d.isSelectionClick(c)){this._onSelectionClick(c,b)}}}}},_onSelectionClick:function(b,a){var c=this._isDoubleClicked(b,a);if(c){this._sendSelectionEvent(a,true,null)}else{if(this._hasMultiSelection){if(!this._delayMultiSelect(b,a)){this._multiSelectItem(b,a)}}else{this._singleSelectItem(a)}}},_delayMultiSelect:function(b,a){if(this._isDragSource()&&this.isItemSelected(a)&&b.getType()===$[2]){this._delayedSelection=true}return this._delayedSelection},_onMouseOver:function(a){var b=a.getOriginalTarget();if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowOver(b)}},_onMouseOut:function(a){var b=a.getOriginalTarget();this._delayedSelection=false;if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowOver(null)}},_onElementChange:function(c){var e=c.getType()===$[328];this._hoverElement=e?c.getDomTarget():null;var d=c.getTarget();var a=d===c.getRelatedTarget();if(a&&d instanceof org.eclipse.rwt.widgets.TreeRow){var b=d.isCheckBoxTarget(c)||d.isExpandSymbolTarget(c);if(this._hoverItem!==null&&b){d.renderItem(this._hoverItem)}}},_onRowOver:function(b){var a=this._hoverItem;this._hoverItem=this._findItemByRow(b);this._renderItem(a);if(b!=null){b.renderItem(this._hoverItem)}},_onClientAreaMouseWheel:function(a){a.preventDefault();a.stopPropagation();var b=a.getWheelDelta()*this._itemHeight*2;this._vertScrollBar.setValue(this._vertScrollBar.getValue()-b)},_onKeyPress:function(a){if(this._focusItem!=null){switch(a.getKeyIdentifier()){case $[70]:this._handleKeyEnter(a);break;case $[91]:this._handleKeySpace(a);break;case"Up":this._handleKeyUp(a);break;case"Down":this._handleKeyDown(a);break;case $[58]:this._handleKeyPageUp(a);break;case $[55]:this._handleKeyPageDown(a);break;case"Home":this._handleKeyHome(a);break;case"End":this._handleKeyEnd(a);break;case"Left":this._handleKeyLeft(a);break;case $[53]:this._handleKeyRight(a);break}}},_onClientAreaAppear:function(){this._clientArea.setScrollLeft(this._horzScrollBar.getValue())},_onColumnAreaAppear:function(){this._columnArea.setScrollLeft(this._horzScrollBar.getValue())},_handleKeyEnter:function(a){this._sendSelectionEvent(this._focusItem,true,null)},_handleKeySpace:function(b){var a=this._findIndexByItem(this._focusItem);this._handleKeyboardSelect(b,this._focusItem,a)},_handleKeyUp:function(c){var b=this._getPreviousItem(this._focusItem);if(b!=null){var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a)}},_handleKeyDown:function(c){var b=this._getNextItem(this._focusItem);if(b!=null){var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a)}},_handleKeyPageUp:function(d){var f=this._findIndexByItem(this._focusItem);var e=this._rows.length-2;var a=Math.max(0,f-e);var c=this._findItemByIndex(a);var b=this._findIndexByItem(c);this._handleKeyboardSelect(d,c,b)},_handleKeyPageDown:function(e){var g=this._findIndexByItem(this._focusItem);var f=this._rows.length-2;var a=this.getRootItem().getVisibleChildrenCount()-1;var b=Math.min(a,g+f);var d=this._findItemByIndex(b,this._topItem,this._topItemIndex);var c=this._findIndexByItem(d);this._handleKeyboardSelect(e,d,c)},_handleKeyHome:function(b){var a=this.getRootItem().getChild(0);this._handleKeyboardSelect(b,a,0)},_handleKeyEnd:function(c){var b=this.getRootItem().getLastChild();var a=this.getRootItem().getVisibleChildrenCount()-1;this._handleKeyboardSelect(c,b,a)},_handleKeyLeft:function(c){if(this._focusItem.isExpanded()){this._focusItem.setExpanded(false)}else{if(!this._focusItem.getParent().isRootItem()){var b=this._focusItem.getParent();var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyRight:function(c){if(this._focusItem.hasChildren()){if(!this._focusItem.isExpanded()){this._focusItem.setExpanded(true)}else{var b=this._focusItem.getChild(0);var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyboardSelect:function(d,c,b,a){this._scrollIntoView(b);if(this._hasMultiSelection&&!a){this._multiSelectItem(d,c)}else{this._singleSelectItem(c)}},_renderItemChange:function(b,a){if(b.isDisplayable()){switch(a.getData()){case $[260]:case $[309]:this._scheduleUpdate(false,true);break;case"add":case"remove":if(b.isExpanded()){this._scheduleUpdate(false,true)}else{this._scheduleItemUpdate(b)}break;default:if(this._inServerResponse()){this._scheduleItemUpdate(b)}else{this._renderItem(b)}break}}},_scheduleItemUpdate:function(a){this._renderQueue[a.toHashCode()]=true;this.addToQueue($[351])},_scheduleUpdate:function(a,b){if(a===true){this._updateRowCount()}if(b===true){this.addToQueue($[523])}this._renderQueue.allItems=true;this.addToQueue($[351])},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a[$[523]]){this._updateScrollHeight()}if(a[$[351]]){if(this._renderQueue.allItems){this._updateAllRows()}else{this._updateQueuedItems()}this._renderQueue={}}},_updateRowCount:function(){var a=this._clientArea.getHeight();var c=Math.ceil(a/this._itemHeight);var b=this._getRowWidth();while(this._rows.length<c){var d=new org.eclipse.rwt.widgets.TreeRow(this);d.setHeight(this._itemHeight);d.setWidth(b);d.updateGridlinesState(this._linesVisible);this._clientArea.add(d)}while(this._rows.length>c){this._rows[this._rows.length-1].destroy()}this._renderGridHorizontal();this._updateRowsEvenState()},_updateAllRows:function(){var a=(new Date()).getTime();this._updateRows(0,this._rows.length);this._vertScrollBar.autoEnableMerge((new Date()).getTime()-a)},_updateQueuedItems:function(){var a=this._getTopItem();var b=0;while(a!=null&&b<this._rows.length){if(this._renderQueue[a.toHashCode()]){this._rows[b].renderItem(a)}a=this._getNextItem(a);b++}},_updateRows:function(f,e){var b=this._getTopItem();var d=f+e;var c=0;while(b!=null&&c<this._rows.length){if(c>=f&&c<=d){this._rows[c].renderItem(b)}b=this._getNextItem(b);c++}for(var a=c;a<this._rows.length;a++){this._rows[a].renderItem(null)}},_renderItem:function(a){if(this._isCreated&&a!=null){var b=this._findRowByItem(a);if(b!=null){b.renderItem(a)}}},_getTopItem:function(){if(this._topItem===null){this._updateTopItem()}return this._topItem},_updateScrollHeight:function(){var b=this.getRootItem().getVisibleChildrenCount();var a=b*this._itemHeight;if(this._vertScrollBar.getMaximum()!=a){if(!this._vertScrollBar.getDisposed()){this._vertScrollBar.setMaximum(a)}this._topItem=null}},_updateTopItem:function(a){if(typeof a==$[81]){this._topItem=this._findItemByIndex(this._topItemIndex,this._topItem,a)}else{this._topItem=this._findItemByIndex(this._topItemIndex)}},_updateScrollWidth:function(){var c=this._getItemWidth();var a=this._getRowWidth();for(var b=0;b<this._rows.length;b++){this._rows[b].setWidth(a)}if(!this._horzScrollBar.getDisposed()){this._horzScrollBar.setMaximum(c)}if(this._columnArea.getVisibility()){this._renderDummyColumn()}},_renderDummyColumn:function(){var b=this._getDummyColumnLeft();var a=this._columnArea.getWidth();var c=Math.max(0,a-b);if(this._vertScrollBar.getVisibility()){c=Math.max(c,this._vertScrollBar.getWidth())}this._dummyColumn.setLeft(b);this._dummyColumn.setWidth(c)},_getDummyColumnLeft:function(){var c=this._columnArea.getChildren();var a=0;for(var b=0;b<c.length;b++){if(c[b]!==this._dummyColumn){var d=c[b].getLeft()+c[b].getWidth();a=Math.max(a,d)}}return a},_scrollIntoView:function(a){if(a<this._topItemIndex){this.setTopItemIndex(a)}else{if(a>(this._topItemIndex+this._rows.length-2)){this.setTopItemIndex(a-this._rows.length+2)}}},_scrollContentVertical:function(a){var f=this._topItemIndex-a;var e=f>0;f=Math.abs(f);if(f>=this._rows.length){this._updateRowsEvenState();this._updateAllRows()}else{var d=this._rows.length-f;var c=e?d:0;var b=e?f:d;this._switchRows(b);this._updateRowsEvenState();this._updateRows(c,f)}},_switchRows:function(c){var a=this._rows.slice(c);this._rows=a.concat(this._rows.slice(0,c));this._clientArea._children=this._rows;this._clientArea._invalidateVisibleChildren();var e=this._clientArea.getLayoutImpl();var d={locationY:true};for(var b=0;b<this._rows.length;b++){e.layoutChild(this._rows[b],d)}},setHasScrollBarsSelectionListener:function(a){this._hasScrollBarsSelectionListener=a;if(a){this._createSendRequestTimer()}},_sendSelectionChange:function(c){if(!this._inServerResponse()){var b=org.eclipse.swt.Request.getInstance();var d=org.eclipse.swt.WidgetManager.getInstance();var e=d.findIdByWidget(this);var a=this._getSelectionIndices();b.addParameter(e+$[144],a);this._sendSelectionEvent(c,false,null)}},_sendItemCheckedChange:function(b){if(!this._inServerResponse()){var a=org.eclipse.swt.Request.getInstance();var c=org.eclipse.swt.WidgetManager.getInstance();var d=c.findIdByWidget(b);a.addParameter(d+".checked",b.isChecked());this._sendSelectionEvent(b,false,"check")}},_sendTopItemIndexChange:function(){var a=org.eclipse.swt.Request.getInstance();var b=org.eclipse.swt.WidgetManager.getInstance();var c=b.findIdByWidget(this);a.addParameter(c+".topItemIndex",this._topItemIndex);if(this._isVirtual||this._hasScrollBarsSelectionListener){this._sendRequestTimer.start()}},_sendScrollLeftChange:function(){var a=org.eclipse.swt.Request.getInstance();var b=org.eclipse.swt.WidgetManager.getInstance();var c=b.findIdByWidget(this);a.addParameter(c+".scrollLeft",this._horzScrollBar.getValue());if(this._isVirtual||this._hasScrollBarsSelectionListener){this._sendRequestTimer.start()}},_sendItemChange:function(b,a){if(!this._inServerResponse()){switch(a.getData()){case $[260]:this._sendItemEvent(b,"org.eclipse.swt.events.treeExpanded");break;case $[309]:this._sendItemEvent(b,"org.eclipse.swt.events.treeCollapsed");break;default:}}},_sendItemEvent:function(c,a){var d=org.eclipse.swt.WidgetManager.getInstance();var e=d.findIdByWidget(c);var b=org.eclipse.swt.Request.getInstance();b.addEvent(a,e);b.send()},_sendSelectionEvent:function(e,c,b){if(this._hasSelectionListeners){var d=org.eclipse.swt.Request.getInstance();var f=org.eclipse.swt.WidgetManager.getInstance();var h=f.findIdByWidget(this);var a="org.eclipse.swt.events.widget";a+=c?"DefaultSelected":"Selected";var g=f.findIdByWidget(e);d.addEvent(a,h);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();d.addParameter(a+".item",g);if(b!=null){d.addParameter(a+".detail",b)}d.send()}},_isDoubleClicked:function(e,d){var a=false;var b=e.getType()===$[2];var g=e.getButton()==="left";if(g&&b&&this.isFocusItem(d)&&this._selectionTimestamp!=null){var c=new Date();var f=org.eclipse.swt.EventUtil.DOUBLE_CLICK_TIME;if(c.getTime()-this._selectionTimestamp.getTime()<f){a=true}}if(b&&g&&!a){this._selectionTimestamp=new Date()}else{this._selectionTimestamp=null}return a},_getSelectionIndices:function(){var c=org.eclipse.swt.WidgetManager.getInstance();var a=[];for(var b=0;b<this._selection.length;b++){a.push(c.findIdByWidget(this._selection[b]))}return a.join()},_singleSelectItem:function(a){this._deselectAll();this._leadItem=null;this._selectItem(a,true);this._sendSelectionChange(a);this.setFocusItem(a)},_multiSelectItem:function(b,a){if(b instanceof qx.event.type.MouseEvent&&b.isRightButtonPressed()){if(!this.isItemSelected(a)){this._singleSelectItem(a)}}else{if(b.isCtrlPressed()){if(b instanceof qx.event.type.KeyEvent&&a!=this._focusItem){this.setFocusItem(a)}else{this._ctrlSelectItem(a)}}else{if(b.isShiftPressed()){if(this._focusItem!=null){this._shiftSelectItem(a)}else{this._singleSelectItem(a)}}else{this._singleSelectItem(a)}}}},_ctrlSelectItem:function(a){if(!this.isItemSelected(a)){this._selectItem(a,true)}else{this._deselectItem(a,true)}this._sendSelectionChange(a);this.setFocusItem(a)},_shiftSelectItem:function(c){this._deselectAll();var b=this._leadItem!=null?this._leadItem:this._focusItem;this._leadItem=b;var e=c;var f=this._findIndexByItem(b);var d=this._findIndexByItem(e);if(f>d){var a=b;b=e;e=a}this._selectItem(b,true);while(b!==e){b=this._getNextItem(b);this._selectItem(b,true)}this._sendSelectionChange(c);this.setFocusItem(c)},_selectItem:function(b,a){if(!this.isItemSelected(b)){this._selection.push(b)}if(a){this._renderItem(b)}},_deselectItem:function(b,a){if(this.isItemSelected(b)){this._selection.splice(this._selection.indexOf(b),1)}if(a){this._renderItem(b)}},_deselectAll:function(){var a=this._selection;this._selection=[];for(var b=0;b<a.length;b++){this._renderItem(a[b])}},_deselectVisibleChildren:function(b){var a=this._getNextItem(b);var c=this._getNextItem(b,true);while(a!=c){this._deselectItem(a,false);a=this._getNextItem(a,false)}},_applyFocused:function(b,a){arguments.callee.base.call(this,b,a);this._scheduleUpdate()},_applyBackgroundColor:function(a){this._clientArea.setBackgroundColor(a)},_applyBackgroundImage:function(a){this._clientArea.setBackgroundImage(a)},_applyWidth:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX()},_applyHeight:function(b,a){arguments.callee.base.call(this,b,a);this._layoutY()},_applyBorder:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX();this._layoutY()},_renderGridVertical:function(){var b=0;if(this._linesVisible){for(var a=0;a<this._columnCount;a++){b=this._renderVerticalGridline(a,b)}}while(this._vertGridLines.length>b){this._vertGridLines.pop().destroy()}},_renderVerticalGridline:function(b,c){var e=c;var f=this._clientArea.getWidth();var d=this._itemLeft[b]+this._itemWidth[b]-1;d-=this._horzScrollBar.getValue();if(d>0&&d<f){var a=this._getVerticalGridline(c);a.setLeft(d);a.setTop(this._clientArea.getTop());a.setHeight(this._clientArea.getHeight());e++}return e},_getVerticalGridline:function(b){if(typeof this._vertGridLines[b]===$[8]){var a=new qx.ui.basic.Terminator();a.setZIndex(1);a.setWidth(0);a.setBorder(this._getVerticalGridBorder());this._vertGridLines[b]=a;this.add(a)}return this._vertGridLines[b]},_renderGridHorizontal:function(){var a=this._linesVisible?this._getHorizontalGridBorder():null;for(var b=0;b<this._rows.length;b++){this._rows[b].setBorder(a)}},_getHorizontalGridBorder:function(){if(this._horzGridBorder===null){this._horzGridBorder=this._getGridBorder({horizontal:true})}return this._horzGridBorder},_getVerticalGridBorder:function(){if(this._vertGridBorder===null){this._vertGridBorder=this._getGridBorder({vertical:true})}return this._vertGridBorder},_getGridBorder:function(d){var b=new qx.ui.core.Border(0);var a=new org.eclipse.swt.theme.ThemeValues(d);var c=a.getCssColor($[411],$[5]);a.dispose();c=c==$[8]?$[161]:c;b.setColor(c);if(d.horizontal){b.setWidthBottom(1)}else{if(d.vertical){b.setWidthRight(1)}}return b},_layoutX:function(){var a=this.getWidth()-this.getFrameWidth();if(this._columnArea.getDisplay()){this._columnArea.setWidth(a)}if(this._vertScrollBar.getVisibility()){a-=this._vertScrollBar.getWidth();this._vertScrollBar.setLeft(a)}this._horzScrollBar.setWidth(a);this._clientArea.setWidth(a);this._updateScrollWidth();this._renderGridVertical()},_layoutY:function(){var a=this.getHeight()-this.getFrameHeight();var b=0;if(this._columnArea.getDisplay()){b=this._headerHeight;a-=this._headerHeight;this._columnArea.setHeight(this._headerHeight)}if(this._horzScrollBar.getVisibility()){a-=this._horzScrollBar.getHeight();this._horzScrollBar.setTop(b+a)}a=Math.max(0,a);this._vertScrollBar.setHeight(a);this._vertScrollBar.setTop(b);this._clientArea.setTop(b);this._clientArea.setHeight(a);this._renderGridVertical();this._scheduleUpdate(true)},_getItemWidth:function(){var a=0;if(this._itemLeft.length>0){for(var b=0;b<this.getColumnCount();b++){a=Math.max(a,this._itemLeft[b]+this._itemWidth[b])}}return a},_getRowWidth:function(){var b=this._clientArea.getWidth();var a=Math.max(this._getItemWidth(),b);return a},_getNextItem:function(c,b){var a=null;if(!b&&c.hasChildren()&&c.isExpanded()){a=c.getChild(0)}else{if(c.hasNextSibling()){a=c.getNextSibling()}else{if(c.getLevel()>0){a=this._getNextItem(c.getParent(),true)}}}return a},_getPreviousItem:function(b){var a=null;if(b.hasPreviousSibling()){a=b.getPreviousSibling();while(a.hasChildren()&&a.isExpanded()){a=a.getLastChild()}}else{if(b.getLevel()>0){a=b.getParent()}}return a},_findItemByRow:function(b){var a=null;if(b!=null){var c=this._getTopItem();var d=0;while(c!=null&&a==null){if(this._rows[d]===b){a=c}c=this._getNextItem(c);d++}}return a},_findRowIndexByItem:function(b){var a=this._getTopItem();var c=0;while(a!=b&&a!=null&&c<this._rows.length){a=this._getNextItem(a);c++}return a!=null&&c<this._rows.length?c:null},_findRowByItem:function(b){var a=this._findRowIndexByItem(b);return a!=null?this._rows[a]:null},_findItemByIndex:function(e,d,f){var a;var c=d?d:this.getRootItem().getChild(0);var b=f?f:0;if(e>=b){a=this._findItemByIndexForwards(e,c,b)}else{a=this._findItemByIndexBackwards(e,c,b)}return a},_findItemByIndexForwards:function(b,a,f){var c=f;var d=a;while(c!=b&&d!=null){var e=c+d.getVisibleChildrenCount()+1;if(e<=b){c=e;d=this._getNextItem(d,true)}else{d=this._getNextItem(d,false);c++}}return d},_findItemByIndexBackwards:function(c,b,g){var d=g;var f=b;while(d!=c&&f!=null){if(f.hasPreviousSibling()){var e=f.getPreviousSibling();var a=d-(e.getVisibleChildrenCount()+1);if(a>=c){d=a;f=e}else{f=this._getPreviousItem(f);d--}}else{f=this._getPreviousItem(f);d--}}return f},_findIndexByItem:function(b){var f=this._getTopItem();var e=this._getTopItem();var d=this._topItemIndex;var c=this._topItemIndex;while(f!==b&&e!==b){if(f!=null){f=this._getNextItem(f);d++}if(e!=null){e=this._getPreviousItem(e);c--}if(e===null&&f===null){throw"Tree._findIndexByItem failed!"}}var a;if(f===b){a=d}else{a=c}return a},_isChildOf:function(d,b){var a=false;var c=d;while(c!=null&&!a){c=c.getParent();a=c===b}return a},_correctOffset:function(b,a){return b+this.getIndentionOffset(a.getLevel()+1)},_correctWidth:function(d,g,e,c){var a=d;var f=this._itemLeft[c]+this._itemWidth[c];var b=g+a;if(b>f){a=Math.max(0,f-g)}return a},_inServerResponse:function(){return org.eclipse.swt.EventUtil.getSuspended()},_isDragSource:function(){return this.hasEventListeners($[75])},setEnableCellToolTip:function(a){if(a){var c=org.eclipse.swt.WidgetManager.getInstance();var b=c.findIdByWidget(this);this._cellToolTip=new org.eclipse.swt.widgets.TableCellToolTip(b);this._clientArea.addEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(this._cellToolTip)}else{this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(null);this._cellToolTip.destroy();this._cellToolTip=null}},_onClientAreaMouseMove:function(k){if(this._cellToolTip!=null){var d=k.getPageX();var c=k.getPageY();if(this._hoverItem){var h=org.eclipse.swt.WidgetManager.getInstance();var j=h.findIdByWidget(this._hoverItem);var g=-1;var b=this.getColumns();var f=this._clientArea.getElement();var a=qx.bom.element.Location.getLeft(f);for(var e=0;g==-1&&e<b.length;e++){var l=a+this._itemLeft[e];if(d>=l&&d<l+this._itemWidth[e]){g=e}}this._cellToolTip.setCell(j,g)}}},setCellToolTipText:function(a){if(this._cellToolTip!=null){this._cellToolTip.setText(a)}}}});
+qx.Class.define("org.eclipse.rwt.widgets.Tree",{extend:qx.ui.layout.CanvasLayout,construct:function(){arguments.callee.base.call(this);this._rootItem=new org.eclipse.rwt.widgets.TreeItem();this._rootItem.setExpanded(true);this._hasCheckBoxes=false;this._hasFullSelection=false;this._isVirtual=false;this._hasMultiSelection=false;this._topItem=null;this._leadItem=null;this._topItemIndex=0;this._selection=[];this._focusItem=null;this._hoverItem=null;this._hoverElement=null;this._renderQueue={};this._resizeLine=null;this._linesVisible=false;this._selectionTimestamp=null;this._delayedSelection=false;this._headerHeight=0;this._itemHeight=16;this._checkBoxLeft=null;this._checkBoxWidth=null;this._hasSelectionListeners=false;this._selectionPadding=null;this._alignment=[];this._itemLeft=[];this._itemWidth=[];this._itemImageLeft=[];this._itemImageWidth=[];this._itemTextLeft=[];this._itemTextWidth=[];this._indentionWidth=16;this._columnCount=0;this._treeColumn=0;this._mergeEventsTimer=new qx.client.Timer(50);this._sendRequestTimer=null;this._vertGridBorder=null;this._horzGridBorder=null;this._clientArea=new qx.ui.layout.VerticalBoxLayout();this._columnArea=new qx.ui.layout.CanvasLayout();this._dummyColumn=new qx.ui.basic.Atom();this._horzScrollBar=new org.eclipse.rwt.widgets.ScrollBar(true);this._vertScrollBar=new org.eclipse.rwt.widgets.ScrollBar(false);this._hasScrollBarsSelectionListener=false;this._rows=this._clientArea.getChildren();this._vertGridLines=[];this.add(this._columnArea);this.add(this._clientArea);this.add(this._horzScrollBar);this.add(this._vertScrollBar);this._cellToolTip=null;this.setCursor($[35]);this.setOverflow($[14]);this.setAppearance("tree");this._configureAreas();this._configureScrollBars();this._registerListeners()},destruct:function(){this._rootItem.removeEventListener("update",this._onItemUpdate,this);this._rootItem.dispose();this._rootItem=null;if(this._sendRequestTimer!=null){this._sendRequestTimer.dispose();this._sendRequestTimer=null}this._mergeEventsTimer.dispose();this._mergeEventsTimer=null;this._dummyColumn=null;this._clientArea=null;this._columnArea=null;this._horzScrollBar=null;this._vertScrollBar=null;this._rows=null;this._topItem=null;this._leadItem=null;this._focusItem=null;this._hoverItem=null;this._hoverElement=null;this._resizeLine=null;if(this._cellToolTip){this._cellToolTip.destroy();this._cellToolTip=null}},members:{_registerListeners:function(){this._rootItem.addEventListener("update",this._onItemUpdate,this);this.addEventListener($[279],this._scheduleUpdate,this);this.addEventListener($[94],this._scheduleUpdate,this);this.addEventListener($[2],this._onMouseDown,this);this.addEventListener($[16],this._onMouseUp,this);this.addEventListener($[10],this._onMouseOver,this);this.addEventListener($[15],this._onMouseOut,this);this.addEventListener($[328],this._onElementChange,this);this.addEventListener("elementOut",this._onElementChange,this);this.addEventListener($[12],this._onKeyPress,this);this._clientArea.addEventListener($[49],this._onClientAreaMouseWheel,this);this._mergeEventsTimer.addEventListener($[59],this._updateTopItemIndex,this);this._horzScrollBar.addEventListener($[78],this._onHorzScrollBarChangeValue,this);this._vertScrollBar.addEventListener($[78],this._onVertScrollBarChangeValue,this)},_configureScrollBars:function(){var a=function(d){d.stopPropagation()};var b=this._vertScrollBar.getPreferredBoxWidth();var c=this._horzScrollBar.getPreferredBoxHeight();this._horzScrollBar.setZIndex(100000000);this._horzScrollBar.setVisibility(false);this._horzScrollBar.setLeft(0);this._horzScrollBar.setMergeEvents(false);this._horzScrollBar.setHeight(c);this._horzScrollBar.addEventListener($[75],a);this._vertScrollBar.setZIndex(100000000);this._vertScrollBar.setVisibility(false);this._vertScrollBar.setWidth(b);this._vertScrollBar.setIncrement(16);this._vertScrollBar.setMergeEvents(false);this._vertScrollBar.addEventListener($[75],a)},_configureAreas:function(){this._clientArea.setOverflow($[14]);this._clientArea.addEventListener($[24],this._onClientAreaAppear,this);this._columnArea.setOverflow($[14]);this._columnArea.addEventListener($[24],this._onColumnAreaAppear,this);this._columnArea.setTop(0);this._columnArea.setLeft(0);this._columnArea.setDisplay(false);var a=function(b){b.stopPropagation()};this._columnArea.addEventListener($[75],a);this._dummyColumn.setAppearance($[560]);this._dummyColumn.setHeight("100%");this._dummyColumn.setLabel("&nbsp;");this._dummyColumn.addState("dummy");this._columnArea.add(this._dummyColumn)},_createSendRequestTimer:function(){if(this._sendRequestTimer===null){var b=new qx.client.Timer(400);var a=org.eclipse.swt.Request.getInstance();b.addEventListener($[59],a.send,a);a.addEventListener("send",b.stop,b);this._sendRequestTimer=b}},setCheckBoxMetrics:function(b,a){this._checkBoxLeft=b;this._checkBoxWidth=a},setHasCheckBoxes:function(a){this._hasCheckBoxes=a},setHasFullSelection:function(a){this._hasFullSelection=a},setHasMultiSelection:function(a){this._hasMultiSelection=a},setHasNoScroll:function(a){if(a){this._clientArea.removeEventListener($[49],this._onClientAreaMouseWheel,this)}},setIndentionWidth:function(a){this._indentionWidth=a},setSelectionPadding:function(b,a){this._selectionPadding=[b,a]},setIsVirtual:function(a){this._isVirtual=a;if(a){this._createSendRequestTimer()}},setHeaderVisible:function(a){this._columnArea.setDisplay(a);this._layoutX();this._layoutY();this._scheduleUpdate(true)},setHeaderHeight:function(a){this._headerHeight=a;this._layoutX();this._layoutY();this._scheduleUpdate(true)},setItemHeight:function(a){this._itemHeight=a;this._vertScrollBar.setIncrement(a);for(var b=0;b<this._rows.length;b++){this._rows[b].setHeight(a)}this._scheduleUpdate(true,true)},setColumnCount:function(a){this._columnCount=a;this._scheduleUpdate();this._updateScrollWidth();this._renderGridVertical()},setItemMetrics:function(e,f,d,b,c,a,g){this._itemLeft[e]=f;this._itemWidth[e]=d;this._itemImageLeft[e]=b;this._itemImageWidth[e]=c;this._itemTextLeft[e]=a;this._itemTextWidth[e]=g;this._scheduleUpdate();this._renderGridVertical();this._updateScrollWidth()},setTreeColumn:function(a){this._treeColumn=a},setTopItemIndex:function(a){this._updateScrollHeight();this._vertScrollBar.setValue(a*this._itemHeight)},setScrollLeft:function(a){this._horzScrollBar.setValue(a)},selectItem:function(a){this._selectItem(a,false);this._scheduleItemUpdate(a)},deselectItem:function(a){this._deselectItem(a,false);this._scheduleItemUpdate(a)},setFocusItem:function(a){this._focusItem=a},setScrollBarsVisible:function(b,a){if(!b){this._horzScrollBar.setValue(0)}this._horzScrollBar.setVisibility(b);if(!a){this._vertScrollBar.setValue(0)}this._vertScrollBar.setVisibility(a);this._layoutX();this._layoutY()},setHasSelectionListeners:function(a){this._hasSelectionListeners=a},setAlignment:function(a,b){this._alignment[a]=b;this._scheduleUpdate()},setLinesVisible:function(b){this._linesVisible=b;if(b){this.addState($[157])}else{this.removeState($[157])}for(var a=0;a<this._rows.length;a++){this._rows[a].updateGridlinesState(b)}this._scheduleUpdate();this._renderGridHorizontal();this._renderGridVertical()},hasNoColumns:function(){return this._columnCount===0},getSelectionPadding:function(){return this._selectionPadding},getItemHeight:function(){return this._itemHeight},getItemLeft:function(c,b,d){var a=this._itemLeft[b];if(d&&this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemWidth:function(c,b,d){var a=this._itemWidth[b];if(d&&this.isTreeColumn(b)){a-=this.getIndentionOffset(1)}return a},getItemImageLeft:function(c,b){var a=this._itemImageLeft[b];if(this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemImageWidth:function(c,b){var a=this._itemImageWidth[b];if(this.isTreeColumn(b)){var d=this.getItemImageLeft(c,b);a=this._correctWidth(a,d,c,b)}return a},getItemTextLeft:function(c,b){var a=this._itemTextLeft[b];if(this.isTreeColumn(b)){a=this._correctOffset(a,c)}return a},getItemTextWidth:function(c,b){var a=this._itemTextWidth[b];if(this.isTreeColumn(b)){var d=this.getItemTextLeft(c,b);a=this._correctWidth(a,d,c,b)}return a},getIndentionOffset:function(a){return this._indentionWidth*a},getHasCheckBoxes:function(){return this._hasCheckBoxes},getHasFullSelection:function(){return this._hasFullSelection},getHasMultiSelection:function(){return this._hasMultiSelection},getIsVirtual:function(){return this._isVirtual},getCheckBoxLeft:function(a){return this._correctOffset(this._checkBoxLeft,a)},getCheckBoxWidth:function(b){var a=this._checkBoxWidth;var c=this.getCheckBoxLeft(b);return this._correctWidth(a,c,b,0)},getColumnCount:function(){return Math.max(1,this._columnCount)},getColumns:function(){return this._columnArea.getChildren().slice(1)},getRootItem:function(){return this._rootItem},isTreeColumn:function(a){return a===this._treeColumn},getTreeColumnWidth:function(){return this._itemWidth[this._treeColumn]},isFocusItem:function(a){return this._focusItem===a},isHoverItem:function(a){return this._hoverItem===a},isHoverElement:function(a){return a!==null&&this._hoverElement===a},isItemSelected:function(a){return this._selection.indexOf(a)!=-1},getAlignment:function(a){return this._alignment[a]?this._alignment[a]:"left"},getStatesCopy:function(){if(!this.__states){this.__states={}}var b={};for(var a in this.__states){b[a]=true}return b},_addColumn:function(a){a.setHeight("100%");a.addEventListener($[57],this._updateScrollWidth,this);this._hookColumnMove(a);this._columnArea.add(a)},_hookColumnMove:function(a){a.addEventListener($[145],this._updateScrollWidth,this)},_unhookColumnMove:function(a){a.removeEventListener($[145],this._updateScrollWidth,this)},_removeColumn:function(a){this._unhookColumnMove(a);a.removeEventListener($[57],this._updateScrollWidth,this);this._columnArea.remove(a);this._updateScrollWidth();this._updateRows()},_onColumnChangeSize:function(a){this._updateScrollWidth()},_showResizeLine:function(b){if(this._resizeLine===null){this._resizeLine=new qx.ui.basic.Terminator();this._resizeLine.setAppearance($[410]);this.add(this._resizeLine);qx.ui.core.Widget.flushGlobalQueues()}var d=this._clientArea.getTop();this._resizeLine._renderRuntimeTop(d);var c=b-2-this._horzScrollBar.getValue();this._resizeLine._renderRuntimeLeft(c);var a=this._clientArea.getHeight();this._resizeLine._renderRuntimeHeight(a);this._resizeLine.removeStyleProperty($[147])},_hideResizeLine:function(){this._resizeLine.setStyleProperty($[147],$[14])},_onItemUpdate:function(b){var a=b.getTarget();if(b.getData()===$[309]){if(this._isChildOf(this._focusItem,a)){this.setFocusItem(a)}}if(b.getData()==="remove"){var c=b.getRelatedTarget();this._deselectItem(c,false);if(this._topItem===c){this._topItem=null}if(this._leadItem===c){this._leadItem=null}if(this._focusItem===c){this._focusItem=null}if(this._hoverItem===c){this._hoverItem=null}}this._sendItemChange(a,b);this._renderItemChange(a,b)},_onVertScrollBarChangeValue:function(){if(this._vertScrollBar._internalValueChange){this._mergeEventsTimer.start()}else{this._updateTopItemIndex()}},_updateTopItemIndex:function(){this._mergeEventsTimer.stop();var a=this._vertScrollBar.getValue();var b=this._topItemIndex;this._topItemIndex=Math.ceil(a/this._itemHeight);this._updateTopItem(b);if(this._inServerResponse()){this._updateRowsEvenState();this._scheduleUpdate()}else{this._sendTopItemIndexChange();this._scrollContentVertical(b)}},_updateRowsEvenState:function(){for(var a=0;a<this._rows.length;a++){this._rows[a].updateEvenState(this._topItemIndex+a)}},_onHorzScrollBarChangeValue:function(){if(this._clientArea.isSeeable()){this._clientArea.setScrollLeft(this._horzScrollBar.getValue())}if(this._columnArea.isSeeable()){this._columnArea.setScrollLeft(this._horzScrollBar.getValue())}this._renderGridVertical();this._sendScrollLeftChange()},_onMouseDown:function(a){this._delayedSelection=false;var b=a.getOriginalTarget();if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowMouseDown(b,a)}},_onMouseUp:function(a){if(this._delayedSelection){this._onMouseDown(a)}},_onRowMouseDown:function(d,c){var b=this._findItemByRow(d);if(b!=null){if(d.isExpandSymbolTarget(c)&&b.hasChildren()){var a=!b.isExpanded();if(!a){this._deselectVisibleChildren(b)}b.setExpanded(a)}else{if(d.isCheckBoxTarget(c)){b.setChecked(!b.isChecked());this._sendItemCheckedChange(b)}else{if(d.isSelectionClick(c)){this._onSelectionClick(c,b)}}}}},_onSelectionClick:function(b,a){var c=this._isDoubleClicked(b,a);if(c){this._sendSelectionEvent(a,true,null)}else{if(this._hasMultiSelection){if(!this._delayMultiSelect(b,a)){this._multiSelectItem(b,a)}}else{this._singleSelectItem(a)}}},_delayMultiSelect:function(b,a){if(this._isDragSource()&&this.isItemSelected(a)&&b.getType()===$[2]){this._delayedSelection=true}return this._delayedSelection},_onMouseOver:function(a){var b=a.getOriginalTarget();if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowOver(b)}},_onMouseOut:function(a){var b=a.getOriginalTarget();this._delayedSelection=false;if(b instanceof org.eclipse.rwt.widgets.TreeRow){this._onRowOver(null)}},_onElementChange:function(c){var e=c.getType()===$[328];this._hoverElement=e?c.getDomTarget():null;var d=c.getTarget();var a=d===c.getRelatedTarget();if(a&&d instanceof org.eclipse.rwt.widgets.TreeRow){var b=d.isCheckBoxTarget(c)||d.isExpandSymbolTarget(c);if(this._hoverItem!==null&&b){d.renderItem(this._hoverItem)}}},_onRowOver:function(b){var a=this._hoverItem;this._hoverItem=this._findItemByRow(b);this._renderItem(a);if(b!=null){b.renderItem(this._hoverItem)}},_onClientAreaMouseWheel:function(a){a.preventDefault();a.stopPropagation();var b=a.getWheelDelta()*this._itemHeight*2;this._vertScrollBar.setValue(this._vertScrollBar.getValue()-b)},_onKeyPress:function(a){if(this._focusItem!=null){switch(a.getKeyIdentifier()){case $[70]:this._handleKeyEnter(a);break;case $[91]:this._handleKeySpace(a);break;case"Up":this._handleKeyUp(a);break;case"Down":this._handleKeyDown(a);break;case $[58]:this._handleKeyPageUp(a);break;case $[55]:this._handleKeyPageDown(a);break;case"Home":this._handleKeyHome(a);break;case"End":this._handleKeyEnd(a);break;case"Left":this._handleKeyLeft(a);break;case $[53]:this._handleKeyRight(a);break}}},_onClientAreaAppear:function(){this._clientArea.setScrollLeft(this._horzScrollBar.getValue())},_onColumnAreaAppear:function(){this._columnArea.setScrollLeft(this._horzScrollBar.getValue())},_handleKeyEnter:function(a){this._sendSelectionEvent(this._focusItem,true,null)},_handleKeySpace:function(b){var a=this._findIndexByItem(this._focusItem);this._handleKeyboardSelect(b,this._focusItem,a)},_handleKeyUp:function(c){var b=this._getPreviousItem(this._focusItem);if(b!=null){var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a)}},_handleKeyDown:function(c){var b=this._getNextItem(this._focusItem);if(b!=null){var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a)}},_handleKeyPageUp:function(d){var f=this._findIndexByItem(this._focusItem);var e=this._rows.length-2;var a=Math.max(0,f-e);var c=this._findItemByIndex(a);var b=this._findIndexByItem(c);this._handleKeyboardSelect(d,c,b)},_handleKeyPageDown:function(e){var g=this._findIndexByItem(this._focusItem);var f=this._rows.length-2;var a=this.getRootItem().getVisibleChildrenCount()-1;var b=Math.min(a,g+f);var d=this._findItemByIndex(b,this._topItem,this._topItemIndex);var c=this._findIndexByItem(d);this._handleKeyboardSelect(e,d,c)},_handleKeyHome:function(b){var a=this.getRootItem().getChild(0);this._handleKeyboardSelect(b,a,0)},_handleKeyEnd:function(c){var b=this.getRootItem().getLastChild();var a=this.getRootItem().getVisibleChildrenCount()-1;this._handleKeyboardSelect(c,b,a)},_handleKeyLeft:function(c){if(this._focusItem.isExpanded()){this._focusItem.setExpanded(false)}else{if(!this._focusItem.getParent().isRootItem()){var b=this._focusItem.getParent();var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyRight:function(c){if(this._focusItem.hasChildren()){if(!this._focusItem.isExpanded()){this._focusItem.setExpanded(true)}else{var b=this._focusItem.getChild(0);var a=this._findIndexByItem(b);this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyboardSelect:function(d,c,b,a){this._scrollIntoView(b);if(this._hasMultiSelection&&!a){this._multiSelectItem(d,c)}else{this._singleSelectItem(c)}},_renderItemChange:function(b,a){if(b.isDisplayable()){switch(a.getData()){case $[260]:case $[309]:this._scheduleUpdate(false,true);break;case"add":case"remove":if(b.isExpanded()){this._scheduleUpdate(false,true)}else{this._scheduleItemUpdate(b)}break;default:if(this._inServerResponse()){this._scheduleItemUpdate(b)}else{this._renderItem(b)}break}}},_scheduleItemUpdate:function(a){this._renderQueue[a.toHashCode()]=true;this.addToQueue($[351])},_scheduleUpdate:function(a,b){if(a===true){this._updateRowCount()}if(b===true){this.addToQueue($[523])}this._renderQueue.allItems=true;this.addToQueue($[351])},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a[$[523]]){this._updateScrollHeight()}if(a[$[351]]){if(this._renderQueue.allItems){this._updateAllRows()}else{this._updateQueuedItems()}this._renderQueue={}}},_updateRowCount:function(){var a=this._clientArea.getHeight();var c=Math.ceil(a/this._itemHeight);var b=this._getRowWidth();while(this._rows.length<c){var d=new org.eclipse.rwt.widgets.TreeRow(this);d.setHeight(this._itemHeight);d.setWidth(b);d.updateGridlinesState(this._linesVisible);this._clientArea.add(d)}while(this._rows.length>c){this._rows[this._rows.length-1].destroy()}this._renderGridHorizontal();this._updateRowsEvenState()},_updateAllRows:function(){var a=(new Date()).getTime();this._updateRows(0,this._rows.length);this._vertScrollBar.autoEnableMerge((new Date()).getTime()-a)},_updateQueuedItems:function(){var a=this._getTopItem();var b=0;while(a!=null&&b<this._rows.length){if(this._renderQueue[a.toHashCode()]){this._rows[b].renderItem(a)}a=this._getNextItem(a);b++}},_updateRows:function(f,e){var b=this._getTopItem();var d=f+e;var c=0;while(b!=null&&c<this._rows.length){if(c>=f&&c<=d){this._rows[c].renderItem(b)}b=this._getNextItem(b);c++}for(var a=c;a<this._rows.length;a++){this._rows[a].renderItem(null)}},_renderItem:function(a){if(this._isCreated&&a!=null){var b=this._findRowByItem(a);if(b!=null){b.renderItem(a)}}},_getTopItem:function(){if(this._topItem===null){this._updateTopItem()}return this._topItem},_updateScrollHeight:function(){var b=this.getRootItem().getVisibleChildrenCount();var a=b*this._itemHeight;if(this._vertScrollBar.getMaximum()!=a){if(!this._vertScrollBar.getDisposed()){this._vertScrollBar.setMaximum(a)}this._topItem=null}},_updateTopItem:function(a){if(typeof a==$[81]){this._topItem=this._findItemByIndex(this._topItemIndex,this._topItem,a)}else{this._topItem=this._findItemByIndex(this._topItemIndex)}},_updateScrollWidth:function(){var c=this._getItemWidth();var a=this._getRowWidth();for(var b=0;b<this._rows.length;b++){this._rows[b].setWidth(a)}if(!this._horzScrollBar.getDisposed()){this._horzScrollBar.setMaximum(c)}if(this._columnArea.getVisibility()){this._renderDummyColumn()}},_renderDummyColumn:function(){var b=this._getDummyColumnLeft();var a=this._columnArea.getWidth();var c=Math.max(0,a-b);if(this._vertScrollBar.getVisibility()){c=Math.max(c,this._vertScrollBar.getWidth())}this._dummyColumn.setLeft(b);this._dummyColumn.setWidth(c)},_getDummyColumnLeft:function(){var c=this._columnArea.getChildren();var a=0;for(var b=0;b<c.length;b++){if(c[b]!==this._dummyColumn){var d=c[b].getLeft()+c[b].getWidth();a=Math.max(a,d)}}return a},_scrollIntoView:function(a){if(a<this._topItemIndex){this.setTopItemIndex(a)}else{if(a>(this._topItemIndex+this._rows.length-2)){this.setTopItemIndex(a-this._rows.length+2)}}},_scrollContentVertical:function(a){var f=this._topItemIndex-a;var e=f>0;f=Math.abs(f);if(f>=this._rows.length){this._updateRowsEvenState();this._updateAllRows()}else{var d=this._rows.length-f;var c=e?d:0;var b=e?f:d;this._switchRows(b);this._updateRowsEvenState();this._updateRows(c,f)}},_switchRows:function(c){var a=this._rows.slice(c);this._rows=a.concat(this._rows.slice(0,c));this._clientArea._children=this._rows;this._clientArea._invalidateVisibleChildren();var e=this._clientArea.getLayoutImpl();var d={locationY:true};for(var b=0;b<this._rows.length;b++){e.layoutChild(this._rows[b],d)}},setHasScrollBarsSelectionListener:function(a){this._hasScrollBarsSelectionListener=a;if(a){this._createSendRequestTimer()}},_sendSelectionChange:function(c){if(!this._inServerResponse()){var b=org.eclipse.swt.Request.getInstance();var d=org.eclipse.swt.WidgetManager.getInstance();var e=d.findIdByWidget(this);var a=this._getSelectionIndices();b.addParameter(e+$[144],a);this._sendSelectionEvent(c,false,null)}},_sendItemCheckedChange:function(b){if(!this._inServerResponse()){var a=org.eclipse.swt.Request.getInstance();var c=org.eclipse.swt.WidgetManager.getInstance();var d=c.findIdByWidget(b);a.addParameter(d+".checked",b.isChecked());this._sendSelectionEvent(b,false,"check")}},_sendTopItemIndexChange:function(){var a=org.eclipse.swt.Request.getInstance();var b=org.eclipse.swt.WidgetManager.getInstance();var c=b.findIdByWidget(this);a.addParameter(c+".topItemIndex",this._topItemIndex);if(this._isVirtual||this._hasScrollBarsSelectionListener){this._sendRequestTimer.start()}},_sendScrollLeftChange:function(){var a=org.eclipse.swt.Request.getInstance();var b=org.eclipse.swt.WidgetManager.getInstance();var c=b.findIdByWidget(this);a.addParameter(c+".scrollLeft",this._horzScrollBar.getValue());if(this._isVirtual||this._hasScrollBarsSelectionListener){this._sendRequestTimer.start()}},_sendItemChange:function(b,a){if(!this._inServerResponse()){switch(a.getData()){case $[260]:this._sendItemEvent(b,"org.eclipse.swt.events.treeExpanded");break;case $[309]:this._sendItemEvent(b,"org.eclipse.swt.events.treeCollapsed");break;default:}}},_sendItemEvent:function(c,a){var d=org.eclipse.swt.WidgetManager.getInstance();var e=d.findIdByWidget(c);var b=org.eclipse.swt.Request.getInstance();b.addEvent(a,e);b.send()},_sendSelectionEvent:function(e,c,b){if(this._hasSelectionListeners){var d=org.eclipse.swt.Request.getInstance();var f=org.eclipse.swt.WidgetManager.getInstance();var h=f.findIdByWidget(this);var a="org.eclipse.swt.events.widget";a+=c?"DefaultSelected":"Selected";var g=f.findIdByWidget(e);d.addEvent(a,h);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();d.addParameter(a+".item",g);if(b!=null){d.addParameter(a+".detail",b)}d.send()}},_isDoubleClicked:function(e,d){var a=false;var b=e.getType()===$[2];var g=e.getButton()==="left";if(g&&b&&this.isFocusItem(d)&&this._selectionTimestamp!=null){var c=new Date();var f=org.eclipse.swt.EventUtil.DOUBLE_CLICK_TIME;if(c.getTime()-this._selectionTimestamp.getTime()<f){a=true}}if(b&&g&&!a){this._selectionTimestamp=new Date()}else{this._selectionTimestamp=null}return a},_getSelectionIndices:function(){var c=org.eclipse.swt.WidgetManager.getInstance();var a=[];for(var b=0;b<this._selection.length;b++){a.push(c.findIdByWidget(this._selection[b]))}return a.join()},_singleSelectItem:function(a){this._deselectAll();this._leadItem=null;this._selectItem(a,true);this._sendSelectionChange(a);this.setFocusItem(a)},_multiSelectItem:function(b,a){if(b instanceof qx.event.type.MouseEvent&&b.isRightButtonPressed()){if(!this.isItemSelected(a)){this._singleSelectItem(a)}}else{if(b.isCtrlPressed()){if(b instanceof qx.event.type.KeyEvent&&a!=this._focusItem){this.setFocusItem(a)}else{this._ctrlSelectItem(a)}}else{if(b.isShiftPressed()){if(this._focusItem!=null){this._shiftSelectItem(a)}else{this._singleSelectItem(a)}}else{this._singleSelectItem(a)}}}},_ctrlSelectItem:function(a){if(!this.isItemSelected(a)){this._selectItem(a,true)}else{this._deselectItem(a,true)}this._sendSelectionChange(a);this.setFocusItem(a)},_shiftSelectItem:function(c){this._deselectAll();var b=this._leadItem!=null?this._leadItem:this._focusItem;this._leadItem=b;var e=c;var f=this._findIndexByItem(b);var d=this._findIndexByItem(e);if(f>d){var a=b;b=e;e=a}this._selectItem(b,true);while(b!==e){b=this._getNextItem(b);this._selectItem(b,true)}this._sendSelectionChange(c);this.setFocusItem(c)},_selectItem:function(b,a){if(!this.isItemSelected(b)){this._selection.push(b)}if(a){this._renderItem(b)}},_deselectItem:function(b,a){if(this.isItemSelected(b)){this._selection.splice(this._selection.indexOf(b),1)}if(a){this._renderItem(b)}},_deselectAll:function(){var a=this._selection;this._selection=[];for(var b=0;b<a.length;b++){this._renderItem(a[b])}},_deselectVisibleChildren:function(b){var a=this._getNextItem(b);var c=this._getNextItem(b,true);while(a!=c){this._deselectItem(a,false);a=this._getNextItem(a,false)}},_applyFocused:function(b,a){arguments.callee.base.call(this,b,a);this._scheduleUpdate()},_applyBackgroundColor:function(a){this._clientArea.setBackgroundColor(a)},_applyBackgroundImage:function(a){this._clientArea.setBackgroundImage(a)},_applyWidth:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX()},_applyHeight:function(b,a){arguments.callee.base.call(this,b,a);this._layoutY()},_applyBorder:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX();this._layoutY()},_renderGridVertical:function(){var b=0;if(this._linesVisible){for(var a=0;a<this._columnCount;a++){b=this._renderVerticalGridline(a,b)}}while(this._vertGridLines.length>b){this._vertGridLines.pop().destroy()}},_renderVerticalGridline:function(b,c){var e=c;var f=this._clientArea.getWidth();var d=this._itemLeft[b]+this._itemWidth[b]-1;d-=this._horzScrollBar.getValue();if(d>0&&d<f){var a=this._getVerticalGridline(c);a.setLeft(d);a.setTop(this._clientArea.getTop());a.setHeight(this._clientArea.getHeight());e++}return e},_getVerticalGridline:function(b){if(typeof this._vertGridLines[b]===$[8]){var a=new qx.ui.basic.Terminator();a.setZIndex(1);a.setWidth(0);a.setBorder(this._getVerticalGridBorder());this._vertGridLines[b]=a;this.add(a)}return this._vertGridLines[b]},_renderGridHorizontal:function(){var a=this._linesVisible?this._getHorizontalGridBorder():null;for(var b=0;b<this._rows.length;b++){this._rows[b].setBorder(a)}},_getHorizontalGridBorder:function(){if(this._horzGridBorder===null){this._horzGridBorder=this._getGridBorder({horizontal:true})}return this._horzGridBorder},_getVerticalGridBorder:function(){if(this._vertGridBorder===null){this._vertGridBorder=this._getGridBorder({vertical:true})}return this._vertGridBorder},_getGridBorder:function(d){var b=new qx.ui.core.Border(0);var a=new org.eclipse.swt.theme.ThemeValues(d);var c=a.getCssColor($[411],$[5]);a.dispose();c=c==$[8]?$[161]:c;b.setColor(c);if(d.horizontal){b.setWidthBottom(1)}else{if(d.vertical){b.setWidthRight(1)}}return b},_layoutX:function(){var a=this.getWidth()-this.getFrameWidth();if(this._columnArea.getDisplay()){this._columnArea.setWidth(a)}if(this._vertScrollBar.getVisibility()){a-=this._vertScrollBar.getWidth();this._vertScrollBar.setLeft(a)}this._horzScrollBar.setWidth(a);this._clientArea.setWidth(a);this._updateScrollWidth();this._renderGridVertical()},_layoutY:function(){var a=this.getHeight()-this.getFrameHeight();var b=0;if(this._columnArea.getDisplay()){b=this._headerHeight;a-=this._headerHeight;this._columnArea.setHeight(this._headerHeight)}if(this._horzScrollBar.getVisibility()){a-=this._horzScrollBar.getHeight();this._horzScrollBar.setTop(b+a)}a=Math.max(0,a);this._vertScrollBar.setHeight(a);this._vertScrollBar.setTop(b);this._clientArea.setTop(b);this._clientArea.setHeight(a);this._renderGridVertical();this._scheduleUpdate(true)},_getItemWidth:function(){var a=0;if(this._itemLeft.length>0){for(var b=0;b<this.getColumnCount();b++){a=Math.max(a,this._itemLeft[b]+this._itemWidth[b])}}return a},_getRowWidth:function(){var b=this._clientArea.getWidth();var a=Math.max(this._getItemWidth(),b);return a},_getNextItem:function(c,b){var a=null;if(!b&&c.hasChildren()&&c.isExpanded()){a=c.getChild(0)}else{if(c.hasNextSibling()){a=c.getNextSibling()}else{if(c.getLevel()>0){a=this._getNextItem(c.getParent(),true)}}}return a},_getPreviousItem:function(b){var a=null;if(b.hasPreviousSibling()){a=b.getPreviousSibling();while(a.hasChildren()&&a.isExpanded()){a=a.getLastChild()}}else{if(b.getLevel()>0){a=b.getParent()}}return a},_findItemByRow:function(b){var a=null;if(b!=null){var c=this._getTopItem();var d=0;while(c!=null&&a==null){if(this._rows[d]===b){a=c}c=this._getNextItem(c);d++}}return a},_findRowIndexByItem:function(b){var a=this._getTopItem();var c=0;while(a!=b&&a!=null&&c<this._rows.length){a=this._getNextItem(a);c++}return a!=null&&c<this._rows.length?c:null},_findRowByItem:function(b){var a=this._findRowIndexByItem(b);return a!=null?this._rows[a]:null},_findItemByIndex:function(e,d,f){var a;var c=d?d:this.getRootItem().getChild(0);var b=f?f:0;if(e>=b){a=this._findItemByIndexForwards(e,c,b)}else{a=this._findItemByIndexBackwards(e,c,b)}return a},_findItemByIndexForwards:function(b,a,f){var c=f;var d=a;while(c!=b&&d!=null){var e=c+d.getVisibleChildrenCount()+1;if(e<=b){c=e;d=this._getNextItem(d,true)}else{d=this._getNextItem(d,false);c++}}return d},_findItemByIndexBackwards:function(c,b,g){var d=g;var f=b;while(d!=c&&f!=null){if(f.hasPreviousSibling()){var e=f.getPreviousSibling();var a=d-(e.getVisibleChildrenCount()+1);if(a>=c){d=a;f=e}else{f=this._getPreviousItem(f);d--}}else{f=this._getPreviousItem(f);d--}}return f},_findIndexByItem:function(b){var f=this._getTopItem();var e=this._getTopItem();var d=this._topItemIndex;var c=this._topItemIndex;while(f!==b&&e!==b){if(f!=null){f=this._getNextItem(f);d++}if(e!=null){e=this._getPreviousItem(e);c--}if(e===null&&f===null){throw"Tree._findIndexByItem failed!"}}var a;if(f===b){a=d}else{a=c}return a},_isChildOf:function(d,b){var a=false;var c=d;while(c!=null&&!a){c=c.getParent();a=c===b}return a},_correctOffset:function(b,a){return b+this.getIndentionOffset(a.getLevel()+1)},_correctWidth:function(d,g,e,c){var a=d;var f=this._itemLeft[c]+this._itemWidth[c];var b=g+a;if(b>f){a=Math.max(0,f-g)}return a},_inServerResponse:function(){return org.eclipse.swt.EventUtil.getSuspended()},_isDragSource:function(){return this.hasEventListeners($[75])},setEnableCellToolTip:function(a){if(a){var c=org.eclipse.swt.WidgetManager.getInstance();var b=c.findIdByWidget(this);this._cellToolTip=new org.eclipse.swt.widgets.TableCellToolTip(b);this._clientArea.addEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(this._cellToolTip)}else{this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(null);this._cellToolTip.destroy();this._cellToolTip=null}},_onClientAreaMouseMove:function(k){if(this._cellToolTip!=null){var d=k.getPageX();var c=k.getPageY();if(this._hoverItem){var h=org.eclipse.swt.WidgetManager.getInstance();var j=h.findIdByWidget(this._hoverItem);var b=this.getColumns();var g=b.length==0?0:-1;var f=this._clientArea.getElement();var a=qx.bom.element.Location.getLeft(f);for(var e=0;g==-1&&e<b.length;e++){var l=a+this._itemLeft[e];if(d>=l&&d<l+this._itemWidth[e]){g=e}}this._cellToolTip.setCell(j,g)}}},setCellToolTipText:function(a){if(this._cellToolTip!=null){this._cellToolTip.setText(a)}}}});
qx.Class.define("org.eclipse.rwt.widgets.TreeItem",{extend:qx.core.Target,construct:function(b,a){this._autoDispose=false;arguments.callee.base.call(this);this._parent=null;this._level=-1;if(b instanceof org.eclipse.rwt.widgets.TreeItem){this._parent=b}else{if(b instanceof org.eclipse.rwt.widgets.Tree){this._parent=b.getRootItem()}}this._children=[];this._visibleChildrenCount=0;this._expanded=false;this._texts=[];this._images=[];this._font=null;this._cellFonts=[];this._foreground=null;this._cellForegrounds=[];this._background=null;this._cellBackgrounds=[];this._checked=false;this._grayed=false;if(this._parent!=null){this._level=this._parent.getLevel()+1;this._parent._add(this,a)}this.addEventListener("update",this._onUpdate,this)},destruct:function(){if(this._parent!=null){this._parent._remove(this)}},events:{update:$[9]},members:{setTexts:function(a){this._texts=a;this._update()},getText:function(b){var a=this._texts[b];return typeof a===$[13]?a:""},setFont:function(a){this._font=a;this._update()},getCellFont:function(b){var a=this._cellFonts[b];return typeof a===$[13]&&a!=""?a:this._font},setCellFonts:function(a){this._cellFonts=a;this._update()},setForeground:function(a){this._foreground=a;this._update()},getCellForeground:function(b){var a=this._cellForegrounds[b];return typeof a===$[13]?a:this._foreground},setCellForegrounds:function(a){this._cellForegrounds=a;this._update()},setBackground:function(a){this._background=a;this._update()},getCellBackground:function(b){var a=this._cellBackgrounds[b];return typeof a===$[13]?a:null},getBackground:function(){return this._background},setCellBackgrounds:function(a){this._cellBackgrounds=a;this._update()},setImages:function(a){this._images=a;this._update()},getImage:function(b){var a=this._images[b];return typeof a===$[13]?a:null},getLevel:function(){return this._level},getParent:function(){return this._parent},getChildren:function(){return this._children},getVisibleChildrenCount:function(){if(this._visibleChildrenCount==null){this._computeVisibleChildrenCount()}return this._visibleChildrenCount},_add:function(b,a){if(typeof a==$[8]){this._children.push(b)}else{this._children.splice(a,0,b)}this._update("add",b)},_remove:function(c){var b=this._children;var a=b.indexOf(c);this._children.splice(a,1);this._update("remove",c)},hasChildren:function(){return this._children.length>0},getChild:function(a){return this._children[a]?this._children[a]:null},getLastChild:function(a){var b=this._children.length;return b>0?this._children[b-1]:null},setExpanded:function(a){if(this._expanded!=a){this._expanded=a;this._update(a?$[260]:$[309])}},isExpanded:function(){return this._expanded},hasPreviousSibling:function(){return this.getPreviousSibling()!=null},hasNextSibling:function(){return this.getNextSibling()!=null},getPreviousSibling:function(){var b=this._parent.getChildren();var a=b.indexOf(this)-1;return a>=0?b[a]:null},getNextSibling:function(){var b=this._parent.getChildren();var a=b.indexOf(this)+1;return a<b.length?b[a]:null},isRootItem:function(){return this._level<0},setChecked:function(a){this._checked=a;this._update()},isChecked:function(){return this._checked},setGrayed:function(a){this._grayed=a;this._update()},isGrayed:function(){return this._grayed},isDisplayable:function(){var a=false;if(this.isRootItem()||this._parent.isRootItem()){a=true}else{a=this._parent.isExpanded()&&this._parent.isDisplayable()}return a},getEnabled:function(){return true},_update:function(c,b){var a=new qx.event.type.DataEvent("update");a.setData(typeof c!=$[8]?c:null);a.setBubbles(true);a.setPropagationStopped(false);if(b){a.setRelatedTarget(b)}this.dispatchEvent(a,true)},_onUpdate:function(){this._visibleChildrenCount=null},_computeVisibleChildrenCount:function(){var a=0;if(this.isExpanded()||this.isRootItem()){a=this._children.length;for(var b=0;b<this._children.length;b++){a+=this.getChild(b).getVisibleChildrenCount()}}this._visibleChildrenCount=a},toString:function(){return"TreeItem "+this._texts.join()}}});
qx.Class.define("org.eclipse.rwt.TreeDNDFeedback",{extend:qx.core.Object,construct:function(a){arguments.callee.base.call(this);this._tree=a;this._feedback=null;this._currentRow=null;this._insertIndicator=null;this._expandTimer=null;this._scrollTimer=null},destruct:function(){this._renderFeedback(this._currentRow,false);if(this._expandTimer!=null){this._expandTimer.dispose();this._expandTimer=null}if(this._scrollTimer!=null){this._scrollTimer.dispose();this._scrollTimer=null}this._tree=null;this._feedback=null;this._insertIndicator=null;this._currentRow=null},members:{setFeedback:function(a){this._renderFeedback(this._currentRow,false);this._feedback=a;this._renderFeedback(this._currentRow,true)},renderFeedback:function(a){this._renderFeedback(this._currentRow,false);this._renderFeedback(a,true);this._currentRow=a},isFeedbackNode:function(b){var a=false;if(this._insertIndicator!=null&&this._insertIndicator==b){a=true}return a},_renderFeedback:function(b,a){if(this._feedback!=null&&b!=null){if(this._feedback.select){this._renderFeedbackSelect(b,a)}else{if(this._feedback.before){this._renderFeedbackBefore(b,a)}else{if(this._feedback.after){this._renderFeedbackAfter(b,a)}}}if(this._feedback.expand){this._renderFeedbackExpand(b,a)}if(this._feedback[$[25]]){this._renderFeedbackScroll(b,a)}}},_renderFeedbackSelect:function(c,b){c._setState($[380],b);var a=this._tree._findItemByRow(c);this._tree._renderItem(a)},_renderFeedbackBefore:function(c,b){if(b){var a=this._getRowLocation(c);a.y--;this._showInsertIndicator(a.x,a.y)}else{this._hideInsertIndicator()}},_renderFeedbackAfter:function(d,c){if(c){var b=this._getRowLocation(d);var a=d.getHeightValue();b.y=b.y+(a-1);this._showInsertIndicator(b.x,b.y)}else{this._hideInsertIndicator()}},_renderFeedbackExpand:function(c,b){var a=this._tree._findItemByRow(c);if(a!=null&&a.hasChildren()){if(b&&!a.isExpanded()){this._startExpandTimer()}else{this._stopExpandTimer()}}},_renderFeedbackScroll:function(b,a){if(a){this._startScrollTimer()}else{this._stopScrollTimer()}},_getRowLocation:function(d){var a={x:0,y:0};var b=d.getElement();var c=this._tree._getTargetNode();while(b!=c){a.x+=parseInt(b.style.left||0);a.y+=parseInt(b.style.top||0);b=b.parentNode}return a},_showInsertIndicator:function(a,e){if(this._insertIndicator==null){var d=document.createElement("div");d.style.position=$[32];d.style.borderTopStyle=$[19];d.style.borderTopColor="black";d.style.borderTopWidth="2px";d.style.zIndex=100000;d.style.height="2px";this._insertIndicator=d}var b=this._tree.getWidthValue()-(a+6);this._insertIndicator.style.left=a+"px";this._insertIndicator.style.top=e+"px";this._insertIndicator.style.width=b+"px";var c=this._tree._getTargetNode();c.appendChild(this._insertIndicator)},_hideInsertIndicator:function(){var a=this._tree._getTargetNode();a.removeChild(this._insertIndicator)},_startExpandTimer:function(){if(this._expandTimer==null){this._expandTimer=new qx.client.Timer(750);this._expandTimer.addEventListener($[59],this._onExpandTimer,this)}this._expandTimer.setEnabled(true)},_stopExpandTimer:function(){if(this._expandTimer!=null){this._expandTimer.stop()}},_onExpandTimer:function(b){this._stopExpandTimer();var a=this._tree._findItemByRow(this._currentRow);a.setExpanded(true)},_startScrollTimer:function(){if(this._scrollTimer==null){this._scrollTimer=new qx.client.Timer(250);this._scrollTimer.addEventListener($[59],this._onScrollTimer,this)}this._scrollTimer.setEnabled(true)},_stopScrollTimer:function(){if(this._scrollTimer!=null){this._scrollTimer.stop()}},_getScrollDirection:function(b){var a=0;var c=this._tree._topItemIndex;if(b===c){a=-1}else{if(b>=(c+this._tree._rows.length-2)){a=1}}return a},_onScrollTimer:function(b){this._stopScrollTimer();var i=this._tree._findItemByRow(this._currentRow);var f=this._tree._findIndexByItem(i);var d=this._getScrollDirection(f);if(d!=0){var h=f+d;var e=this._tree._findItemByIndex(h);if(e!=null){var c=this._tree._topItemIndex+d;this._tree.setTopItemIndex(c);var j=this._tree._findRowByItem(e);var g=this._currentRow;var a=function(){this._targetUpdateCheck(g,j)};qx.client.Timer.once(a,this,1)}}},_targetUpdateCheck:function(a,b){if(!this.isDisposed()){if(b!=this._currentRow&&a==this._currentRow){var c=org.eclipse.rwt.DNDSupport.getInstance();c.setCurrentTargetWidget(b)}}}}});
-qx.Class.define("org.eclipse.swt.widgets.Table",{extend:qx.ui.layout.CanvasLayout,construct:function(f,b){arguments.callee.base.call(this);this.setAppearance("table");this.setHideFocus(true);this.setTabIndex(1);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._suspendClicksOnRow=null;this._alwaysHideSelection=false;this._hideSelection=qx.lang.String.contains(b,"hideSelection");this._linesVisible=false;this._borderWidth=0;this._defaultColumnWidth=0;this._topIndex=0;this._topIndexChanging=false;this._topIndexChanged=false;this._leftOffsetChanged=false;this._hasScrollBarsSelectionListener=false;this._readyToSendChanges=true;this._resolveItemsFor=null;this._itemHeight=0;this._rows=new Array();this._items=new Array();this._gridLines=new Array();this._itemCount=0;this._unresolvedItems=null;this._checkBoxes=null;if(qx.lang.String.contains(b,"check")){this._checkBoxes=new Array()}this._multiSelect=qx.lang.String.contains(b,"multi");this._selected=new Array();this._selectionStart=-1;this._focusIndex=-1;this._emptyItem=new org.eclipse.swt.widgets.TableItem(this,-1);this._virtualItem=new org.eclipse.swt.widgets.TableItem(this,-1);this._virtualItem.setTexts(["..."]);this._resizeLine=null;this._itemLeft=new Array();this._itemWidth=new Array();this._itemImageLeft=new Array();this._itemImageWidth=new Array();this._itemTextLeft=new Array();this._itemTextWidth=new Array();this._columnArea=new qx.ui.layout.CanvasLayout();this._columnArea.setTop(0);this._columnArea.setLeft(0);this._columnArea.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._columnArea.setZIndex(20000);var d=new qx.ui.basic.Atom();d.setLabel("&nbsp;");d.getLabelObject().setMode(qx.constant.Style.LABEL_MODE_HTML);d.setAppearance($[452]);d.addState("dummy");this._columnArea.add(d);this.add(this._columnArea);this._clientArea=new qx.ui.layout.CanvasLayout();this._clientArea.setAppearance("table-client-area");this._clientArea.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._clientArea.setTop(20);this._clientArea.setLeft(0);this._noScroll=qx.lang.String.contains(b,"noScroll");if(!this._noScroll){this._clientArea.addEventListener($[49],this._onClientAreaMouseWheel,this)}this._clientArea.addEventListener($[24],this._onClientAppear,this);var a=function(g){g.stopPropagation()};this._horzScrollBar=new org.eclipse.rwt.widgets.ScrollBar(true);this._horzScrollBar.addEventListener($[75],a);this._horzScrollBar.setZIndex(100000000);this._horzScrollBar.setMergeEvents(true);this.add(this._horzScrollBar);this._horzScrollBar.setHeight(this._horzScrollBar.getPreferredBoxHeight());this._horzScrollBar.addEventListener($[78],this._onHorzScrollBarChangeValue,this);this._vertScrollBar=new org.eclipse.rwt.widgets.ScrollBar(false);this._vertScrollBar.addEventListener($[75],a);this._vertScrollBar.setZIndex(100000000);this._vertScrollBar.setMergeEvents(false);this.add(this._vertScrollBar);this._vertScrollBar.setWidth(this._vertScrollBar.getPreferredBoxWidth());this._vertScrollBar.addEventListener($[78],this._onVertScrollBarChangeValue,this);this.addEventListener($[57],this._onChangeSize,this);this.addEventListener($[68],this._onChangeSize,this);this.addEventListener($[153],this._onChangeEnabled,this);this.addEventListener($[74],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._keyboardSelecionChanged=false;this.addEventListener($[26],this._onKeyDown,this);this.addEventListener($[12],this._onKeyPress,this);this.addEventListener($[65],this._onKeyUp,this);var c=org.eclipse.swt.Request.getInstance();c.addEventListener("send",this._onSendRequest,this);var e=org.eclipse.swt.WidgetManager.getInstance();e.add(this._clientArea,f+"_clientArea",false);this.add(this._clientArea);this._cellToolTip=null;qx.ui.core.Widget.disableScrolling(this);this._clickDelayed=false;this.addEventListener($[75],this._onDragStart,this)},destruct:function(){var b=org.eclipse.swt.Request.getInstance();b.removeEventListener("send",this._onSendRequest,this);this.removeEventListener($[57],this._onChangeSize,this);this.removeEventListener($[68],this._onChangeSize,this);this.removeEventListener($[153],this._onChangeEnabled,this);this.removeEventListener($[74],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this.removeEventListener($[26],this._onKeyDown,this);this.removeEventListener($[12],this._onKeyPress,this);this.removeEventListener($[65],this._onKeyUp,this);this.removeEventListener($[75],this._onDragStart,this);this._virtualItem.dispose();this._emptyItem.dispose();for(var a=0;a<this._items.length;a++){if(this._items[a]){this._items[a].dispose()}}this._items=null;var b=org.eclipse.swt.Request.getInstance();if(this._horzScrollBar){this._horzScrollBar.removeEventListener($[78],this._onHorzScrollBarChangeValue,this);this._horzScrollBar.dispose();this._horzScrollBar=null}if(this._vertScrollBar){this._vertScrollBar.removeEventListener($[78],this._onVertScrollBarChangeValue,this);this._vertScrollBar.dispose();this._vertScrollBar=null}for(var a=0;a<this._gridLines.length;a++){this._gridLines[a].removeEventListener($[2],this._onRowMouseDown,this);this._gridLines[a].removeEventListener($[16],this._onRowMouseUp,this);this._gridLines[a].dispose();this._gridLines[a]=null}if(this._clientArea){if(!this._noScroll){this._clientArea.removeEventListener($[49],this._onClientAreaMouseWheel,this)}this._clientArea.removeEventListener($[24],this._onClientAppear,this);if(this._cellToolTip){this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this)}org.eclipse.swt.WidgetManager.getInstance().remove(this._clientArea);this._clientArea.dispose();this._clientArea=null}if(this._cellToolTip){this._cellToolTip.destroy();this._cellToolTip=null}if(this._columnArea){this._columnArea.dispose();this._columnArea=null}if(this._resizeLine){this._resizeLine.setParent(null);this._resizeLine.dispose()}if(this._rows){for(var a=0;a<this._rows.length;a++){this._rows[a].dispose()}this._rows=null}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].dispose()}this._checkBoxes=null}this._itemLeft=null;this._itemWidth=null;this._itemImageLeft=null;this._itemImageWidth=null;this._itemTextLeft=null;this._itemTextWidth=null},events:{itemselected:$[79],itemdefaultselected:$[79],itemchecked:$[79]},properties:{checkWidth:{check:$[18],init:21,themeable:true},checkHeight:{check:$[18],init:13,themeable:true}},statics:{_isShiftOnlyPressed:function(a){return a.isShiftPressed()&&!a.isCtrlPressed()&&!a.isAltPressed()&&!a.isMetaPressed()},_isCtrlOnlyPressed:function(a){return a.isCtrlOrCommandPressed()&&!a.isShiftPressed()&&!a.isAltPressed()},_isCtrlShiftOnlyPressed:function(a){return a.isCtrlOrCommandPressed()&&a.isShiftPressed()&&!a.isAltPressed()},_isMetaOnlyPressed:function(a){return a.isAltPressed()&&!a.isShiftPressed()&&!a.isCtrlPressed()},_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{_isRelevantEvent:function(a){var b=a.getTarget();var c=this._columnArea.getChildren()[0];return b===this||b===c||b instanceof org.eclipse.swt.widgets.TableRow||b instanceof org.eclipse.swt.widgets.TableColumn},setCursor:function(c){this._columnArea.setCursor(c);this._clientArea.setCursor(c);var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].setCursor(c)}for(var a=0;a<this._rows.length;a++){this._rows[a].setCursor(c)}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].setCursor(c)}}},resetCursor:function(){this._columnArea.resetCursor();this._clientArea.resetCursor();var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].resetCursor()}for(var a=0;a<this._rows.length;a++){this._rows[a].resetCursor()}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].resetCursor()}}},setTextColor:function(a){this._clientArea.setTextColor(a)},resetTextColor:function(){this._clientArea.resetTextColor()},setBackgroundImage:function(a){this._clientArea.setBackgroundImage(a)},resetBackgroundImage:function(){this._clientArea.resetBackgroundImage()},setBackgroundColor:function(a){this._clientArea.setBackgroundColor(a)},resetBackgroundColor:function(){this._clientArea.resetBackgroundColor()},setHeaderHeight:function(c){this._columnArea.setHeight(c);var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].setHeight(c)}this._updateClientAreaSize()},setHeaderVisible:function(a){this._columnArea.setVisibility(a);this._updateClientAreaSize();this._updateGridLines()},setItemHeight:function(a){this._itemHeight=a;this._updateScrollHeight();if(this._updateRowCount()){this._updateRows()}this._vertScrollBar.setIncrement(a)},getItemHeight:function(){return this._itemHeight},setAlwaysHideSelection:function(a){this._alwaysHideSelection=a},shouldHideSelection:function(){return this._alwaysHideSelection||(this._hideSelection&&!this.getFocused())},setItemMetrics:function(e,f,d,b,c,a,g){this._itemLeft[e]=f;this._itemWidth[e]=d;this._itemImageLeft[e]=b;this._itemImageWidth[e]=c;this._itemTextLeft[e]=a;this._itemTextWidth[e]=g},setScrollBarsVisibile:function(b,a){if(!b){this._horzScrollBar.setValue(0)}this._horzScrollBar.setVisibility(b);if(!a){this._vertScrollBar.setValue(0)}this._vertScrollBar.setVisibility(a);this._updateClientAreaSize()},updateRows:function(){this._updateRows()},getItemLeft:function(a){return this._itemLeft[a]},getItemWidth:function(a){return this._itemWidth[a]},getItemImageLeft:function(a){return this._itemImageLeft[a]},getItemImageWidth:function(a){return this._itemImageWidth[a]},getItemTextLeft:function(a){return this._itemTextLeft[a]},getItemTextWidth:function(a){return this._itemTextWidth[a]},setTopIndex:function(a){this._internalSetTopIndex(a,true);this._topIndexChanged=false},_internalSetTopIndex:function(b,a){if(this._topIndex!==b){this._topIndexChanging=true;if(a){this._vertScrollBar.setValue(b*this._itemHeight)}var c=b-this._topIndex;this._topIndex=b;this._scrollRowsVertical(c);this._topIndexChanged=true;this._topIndexChanging=false}},setLeftOffset:function(a){this._horzScrollBar.setValue(a);this._leftOffsetChanged=false},setBorderWidth:function(a){this._borderWidth=a},getColumn:function(a){return this._columnArea.getChildren()[a+1]},getColumnCount:function(){return this._columnArea.getChildrenLength()-1},getColumns:function(){return this._columnArea.getChildren().slice(1)},getColumnsWidth:function(){var a=0;var c=this._columnArea.getChildren();for(var b=1;b<c.length;b++){a+=c[b].getWidth()}return a},setDefaultColumnWidth:function(a){this._defaultColumnWidth=a;this._updateScrollWidth()},getDefaultColumnWidth:function(){return this._defaultColumnWidth},setLinesVisible:function(b){this._linesVisible=b;if(b){this.addState($[157])}else{this.removeState($[157])}for(var a=0;a<this._rows.length;a++){this._rows[a].setLinesVisible(b)}this._updateGridLines()},getLinesVisible:function(){return this._linesVisible},hasCheckBoxes:function(){return this._checkBoxes!==null},setFocusIndex:function(c){if(c!==this._focusIndex){var a=this._focusIndex;this._focusIndex=c;if(a!==-1){this.updateItem(a,false)}if(this._focusIndex!==-1){this.updateItem(this._focusIndex,false)}if(org.eclipse.swt.EventUtil.getSuspended()){this._selectionStart=-1}else{var b=org.eclipse.swt.Request.getInstance();var d=org.eclipse.swt.WidgetManager.getInstance().findIdByWidget(this);b.addParameter(d+$[540],c)}}},getFocusIndex:function(){return this._focusIndex},setItemCount:function(a){this._itemCount=a;this._updateScrollHeight();this._updateRows()},_onChangeEnabled:function(a){this._updateRows()},_onCheckBoxClick:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._getItemIndexFromRowIndex(c);this._toggleCheckState(b)},_onCheckBoxOver:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._checkBoxes[c];b.addState("over");this._rows[c].addState("over")},_onCheckBoxOut:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._checkBoxes[c];b.removeState("over");this._rows[c].removeState("over")},_onRowMouseDown:function(a){var c=this._getRowFromEvent(a);if(c!=null){var b=this._topIndex+this._rows.indexOf(c);if(this._isDragSource()&&this._isItemSelected(b)){if(this._isValidMouseEvent(c,b)){this.setFocusIndex(b);this._clickDelayed=true}}else{this._rowClicked(a,c)}}},_onRowMouseUp:function(a){if(this._clickDelayed){this._clickDelayed=false;var b=this._getRowFromEvent(a);if(b!=null){this._rowClicked(a,b)}}},_getRowFromEvent:function(b){var c=b.getTarget();var a=null;if(c instanceof org.eclipse.swt.widgets.TableRow){a=c}else{a=this._getRowAtPoint(b.getPageX(),b.getPageY())}return a},_isDragSource:function(){return org.eclipse.rwt.DNDSupport.getInstance().isDragSource(this)},_onDragStart:function(a){this._clickDelayed=false},_isValidMouseEvent:function(c,b){var a=b>=0&&b<this._itemCount&&this._items[b]&&this._suspendClicksOnRow!=c;return a},_rowClicked:function(a,c){var b=this._topIndex+this._rows.indexOf(c);if(this._isValidMouseEvent(c,b)){this._suspendClicksOnRow=c;qx.client.Timer.once(this._resumeClicks,this,org.eclipse.swt.EventUtil.DOUBLE_CLICK_TIME);if(this._multiSelect){this._multiSelectRowClicked(a,b)}else{this._setSingleSelection(b)}this.setFocusIndex(b);this._makeItemFullyVisible(b);this._updateSelectionParam();this.createDispatchDataEvent($[496],b)}},_multiSelectRowClicked:function(b,d){if(b.isRightButtonPressed()){if(!this._isItemSelected(d)){this._setSingleSelection(d);this._selectionStart=-1}}else{if(org.eclipse.swt.widgets.Table._isCtrlOnlyPressed(b)){if(this._isItemSelected(d)){this._deselectItem(d,true)}else{this._selectItem(d)}}if(org.eclipse.swt.widgets.Table._isShiftOnlyPressed(b)||org.eclipse.swt.widgets.Table._isCtrlShiftOnlyPressed(b)){if(org.eclipse.swt.widgets.Table._isShiftOnlyPressed(b)&&this._selectionStart!==-1){this._clearSelection()}var e=this._selectionStart!==-1?this._selectionStart:this._focusIndex;if(e!==-1){var f=Math.min(e,d);var a=Math.max(e,d);for(var c=f;c<=a;c++){this._selectItem(c)}}else{this._selectItem(d)}}if(org.eclipse.swt.widgets.Table._isNoModifierPressed(b)||org.eclipse.swt.widgets.Table._isMetaOnlyPressed(b)){this._setSingleSelection(d)}if(org.eclipse.swt.widgets.Table._isCtrlOnlyPressed(b)||org.eclipse.swt.widgets.Table._isCtrlShiftOnlyPressed(b)){this._selectionStart=d}else{this._selectionStart=-1}}},_setSingleSelection:function(a){this._clearSelection();this._selectItem(a)},_resumeClicks:function(){this._suspendClicksOnRow=null},_onRowDblClick:function(a){var c=this._rows.indexOf(a.getTarget());var b=this._getItemIndexFromRowIndex(c);if(b!==-1){this.createDispatchDataEvent($[571],b)}},_onRowContextMenu:function(a){if(org.eclipse.swt.widgets.Table._isNoModifierPressed(a)||org.eclipse.swt.widgets.Table._isMetaOnlyPressed(a)){var c=a.getTarget();var b=this.getContextMenu();if(b!==null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show()}}},_onRowChangeOverState:function(a){var d=a.getTarget();if(d.hasState("over")){for(var b=0;b<this._rows.length;b++){if(this._rows[b]!==d){this._rows[b].removeState("over")}}}var c=d.getItemIndex();if(c!=-1){this._renderItem(d,this._items[c])}},_toggleCheckState:function(a){if(this._checkBoxes!=null){var b=this._items[a];if(a>=0&&a<this._itemCount&&b){b.setChecked(!b.getChecked());var c=this._getRowIndexFromItemIndex(a);if(c!==-1){this._updateRow(c,a)}this._updateCheckParam(b);this.createDispatchDataEvent("itemchecked",a)}}},_updateSelectionParam:function(){var e=org.eclipse.swt.WidgetManager.getInstance();var d=e.findIdByWidget(this);var c=org.eclipse.swt.Request.getInstance();var b="";for(var a=0;a<this._selected.length;a++){if(b!==""){b+=","}b+=this._selected[a].toString()}c.addParameter(d+$[144],b)},_updateCheckParam:function(b){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(b);var a=org.eclipse.swt.Request.getInstance();a.addParameter(c+".checked",b.getChecked())},_onClientAreaMouseWheel:function(a){if(this._isRelevantEvent(a)){a.preventDefault();a.stopPropagation();var b=a.getWheelDelta()*this._itemHeight*2;this._vertScrollBar.setValue(this._vertScrollBar.getValue()-b)}},_onChangeSize:function(a){this._updateClientAreaSize()},_onClientAppear:function(a){this._updateRowCount();this._updateRows();this._updateGridLines()},_onKeyDown:function(a){if(this._isRelevantEvent(a)){switch(a.getKeyIdentifier()){case $[91]:this._toggleCheckState(this._focusIndex);break;case $[70]:var d=-1;var c=-1;for(var b=0;b<this._selected.length;b++){if(this._focusIndex===this._selected[b]){d=this._selected[b]}if(c===-1){c=this._selected[b]}else{c=Math.min(c,this._selected[b])}}if(d===-1){d=c}this.createDispatchDataEvent($[571],d);break}}},_onKeyPress:function(b){var f=b.getKeyIdentifier();if(this._isRelevantEvent(b)&&org.eclipse.swt.widgets.Table._isNoModifierPressed(b)&&(f==="Up"||f==="Down"||f===$[58]||f===$[55]||f==="Home"||f==="End")){b.preventDefault();b.stopPropagation();var e=this._calcGotoIndex(this._focusIndex,f);if(e!==this._focusIndex&&e>=0&&e<this._itemCount){var c=this._focusIndex;this._setSingleSelection(e);if(!this._isItemFullyVisible(e)){var d;if(e===this._itemCount-1){d=e-this._getFullyVisibleRowCount()+1}else{d=e>=this._topIndex+this._getFullyVisibleRowCount()?e-this._getFullyVisibleRowCount()+1:e}if(d<0){d=0}else{if(d>this._itemCount){d=this._itemCount}}var a=this._itemCount-this._getFullyVisibleRowCount();if(e>a&&e<this._itemCount&&f===$[55]){d=a}this._internalSetTopIndex(d,true)}this.setFocusIndex(e);this._keyboardSelecionChanged=true}}if(this._isRelevantEvent(b)&&org.eclipse.swt.widgets.Table._isNoModifierPressed(b)&&(f==="Left"||f===$[53])){b.preventDefault();b.stopPropagation()}},_calcGotoIndex:function(b,c){var a=b;switch(c){case"Home":a=0;break;case"End":a=this._itemCount-1;break;case"Up":a=b-1;break;case"Down":a=b+1;break;case $[58]:a=b-this._getFullyVisibleRowCount();if(a<0){a=0}break;case $[55]:a=b+this._getFullyVisibleRowCount();if(a>this._itemCount-1){a=this._itemCount-1}break}return a},_getFullyVisibleRowCount:function(){return Math.floor(this._clientArea.getHeight()/this._itemHeight)},_onKeyUp:function(a){if(this._keyboardSelecionChanged){this._keyboardSelecionChanged=false;this._updateSelectionParam();this.createDispatchDataEvent($[496],this._focusIndex)}},_onVertScrollBarChangeValue:function(){if(!this._topIndexChanging){var b=0;if(this._itemHeight!==0){var a=this._clientArea.isCreated()?this._vertScrollBar.getValue():0;b=Math.floor(a/this._itemHeight)}this._internalSetTopIndex(b,false)}if(this._readyToSendChanges&&this._hasScrollBarsSelectionListener){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}},_onHorzScrollBarChangeValue:function(){this._columnArea.setLeft(0-this._horzScrollBar.getValue());this._updateRowBounds();this._updateGridLines();this._leftOffsetChanged=true;if(this._readyToSendChanges&&this._hasScrollBarsSelectionListener){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}},setHasScrollBarsSelectionListener:function(a){this._hasScrollBarsSelectionListener=a},_addItem:function(b,a){if(this._items[a]){this._items.splice(a,0,b)}else{this._items[a]=b}this._updateScrollHeight()},_removeItem:function(b){var a=this._items.indexOf(b);this._items.splice(a,1);if(a===this._focusIndex){this._focusIndex=-1}this._deselectItem(a,false);this._adjustSelectedIndices(a);this._updateScrollHeight()},_selectItem:function(a){if(!this._isItemSelected(a)){this._selected.push(a);this.updateItem(a,true)}},_deselectItem:function(b,c){var a=this._selected.indexOf(b);if(a!=-1){this._selected.splice(a,1);if(c){this.updateItem(b,true)}}},_isItemSelected:function(a){return this._selected.indexOf(a)!==-1},_clearSelection:function(){while(this._selected.length>0){this._deselectItem(this._selected[0],true)}},_adjustSelectedIndices:function(c){for(var b=0;b<this._selected.length;b++){var a=this._selected[b];if(c<a){this._selected[b]=a-1}}},_resetSelectionStart:function(){this._selectionStart=-1},_isItemVisible:function(a){return a>=this._topIndex&&a<this._topIndex+this._rows.length},_isItemFullyVisible:function(a){return a>=this._topIndex&&a<this._topIndex+this._getFullyVisibleRowCount()},_makeItemFullyVisible:function(a){var c=this._getRowIndexFromItemIndex(a);var b=c===-1?null:this._rows[c];if(b!==null&&b.getTop()+b.getHeight()>this._clientArea.getHeight()){this._internalSetTopIndex(this._topIndex+1,true)}},updateItem:function(b,a){var c=this._getRowIndexFromItemIndex(b);if(c!==-1){if(a){this._updateRow(c,b)}else{this._updateRowState(c,b)}}},_getRowIndexFromItemIndex:function(b){var a=-1;if(b>=this._topIndex&&b<this._topIndex+this._rows.length){a=b-this._topIndex}return a},_getItemIndexFromRowIndex:function(b){var a=this._topIndex+b;if(a<0||a>this._itemCount-1){a=-1}return a},_isItemHovered:function(b){var a=false;var d=this._getRowIndexFromItemIndex(b);if(d>=0){var c=this._rows[d];a=c.hasState("over")&&c.hasHoverColorsDefined()}return a},_addColumn:function(a){a.setHeight(this._columnArea.getHeight());this._hookColumnMove(a);a.addEventListener($[57],this._onColumnChangeSize,this);this._columnArea.add(a);this._updateScrollWidth()},_hookColumnMove:function(a){a.addEventListener($[145],this._onColumnChangeSize,this)},_unhookColumnMove:function(a){a.removeEventListener($[145],this._onColumnChangeSize,this)},_removeColumn:function(a){this._unhookColumnMove(a);a.removeEventListener($[57],this._onColumnChangeSize,this);this._columnArea.remove(a);this._updateScrollWidth();this._updateRows()},_onColumnChangeSize:function(a){this._updateScrollWidth()},_updateScrollHeight:function(){var a=this._itemHeight+this._itemCount*this._itemHeight;if(!this._vertScrollBar.getDisposed()){this._vertScrollBar.setMaximum(a)}},_updateScrollWidth:function(){var a;if(this.getColumnCount()===0){a=this.getDefaultColumnWidth();if(this._checkBoxes!==null){a+=this.getCheckWidth()}}else{a=this.getColumnsWidth()}this._horzScrollBar.setMaximum(a);this._updateColumnHeader();this._updateGridLines()},_updateColumnHeader:function(){var e=this.getWidth()-2*this._borderWidth;var d=this._columnArea.getChildren()[0];var b=this._vertScrollBar.getVisibility()?this._vertScrollBar.getWidth():0;var a;if(this.getColumnCount()===0){var c=this.getDefaultColumnWidth();if(this._checkBoxes!==null){c+=this.getCheckWidth()}a=Math.max(c+b,e);d.setLeft(0);d.setWidth(a)}else{var c=this.getColumnsWidth();a=Math.max(c+b,e);d.setLeft(c);d.setWidth(Math.max(a-c,0))}this._columnArea.setWidth(a)},_updateClientAreaSize:function(){var d=0;if(this._columnArea.getVisibility()){d=this._columnArea.getHeight()}var c=this._horzScrollBar.getVisibility()?this._horzScrollBar.getHeight():0;var b=this._vertScrollBar.getVisibility()?this._vertScrollBar.getWidth():0;var a=this.getHeight()-d-c-(2*this._borderWidth);var e=this.getWidth()-b-(2*this._borderWidth);this._vertScrollBar.setLeft(this.getWidth()-b-(2*this._borderWidth));this._vertScrollBar.setTop(d);this._vertScrollBar.setHeight(a);this._horzScrollBar.setLeft(0);this._horzScrollBar.setTop(this.getHeight()-c-(2*this._borderWidth));this._horzScrollBar.setWidth(e);this._clientArea.setTop(d);this._clientArea.setHeight(a);this._clientArea.setWidth(e);this._updateColumnHeader();this._updateGridLines();if(this._updateRowCount()){this._updateRows()}else{this._updateRowBounds();this._updateRowTop()}},_updateRowCount:function(){var b=false;if(this._clientArea.isCreated()){var e=0;var a=this._clientArea.getHeight();if(this._itemHeight!==0&&a>0){e=Math.ceil(a/this._itemHeight)}if(e!=this._rows.length){while(this._rows.length>e){if(this._checkBoxes!=null){var d=this._checkBoxes.shift();d.removeEventListener($[502],this._onCheckBoxClick,this);d.removeEventListener($[10],this._onCheckBoxOver,this);d.removeEventListener($[15],this._onCheckBoxOut,this);d.setParent(null);d.dispose()}var f=this._rows.shift();this._unhookRowEventListener(f);f.setParent(null);f.dispose()}if(this._rows.length<e){while(this._rows.length<e){var c=new org.eclipse.swt.widgets.TableRow();this._hookRowEventListener(c);c.setLinesVisible(this._linesVisible);this._clientArea.add(c);this._rows.push(c);if(this._checkBoxes!=null){var d=new qx.ui.basic.Image();d.addEventListener($[28],this._onCheckBoxClick,this);d.addEventListener($[10],this._onCheckBoxOver,this);d.addEventListener($[15],this._onCheckBoxOut,this);d.setAppearance("table-check-box");this._clientArea.add(d);this._checkBoxes.push(d)}}}this._updateRowBounds();this._updateRowTop();this._updateRowsState();b=true}}return b},_hookRowEventListener:function(a){a.addEventListener($[2],this._onRowMouseDown,this);a.addEventListener($[16],this._onRowMouseUp,this);a.addEventListener($[62],this._onRowDblClick,this);a.addEventListener($[39],this._onRowContextMenu,this);a.addEventListener($[302],this._onRowChangeOverState,this)},_unhookRowEventListener:function(a){a.removeEventListener($[2],this._onRowMouseDown,this);a.removeEventListener($[16],this._onRowMouseUp,this);a.removeEventListener($[62],this._onRowDblClick,this);a.removeEventListener($[39],this._onRowContextMenu,this);a.removeEventListener($[302],this._onRowChangeOverState,this)},_updateRowTop:function(){var c=this._itemHeight/2-this.getCheckHeight()/2;var b=0;for(var a=0;a<this._rows.length;a++){if(this._checkBoxes!==null){this._checkBoxes[a].setTop(b+c)}this._rows[a].setTop(b);b+=this._itemHeight}},_updateRowBounds:function(){var f=0-this._horzScrollBar.getValue();var d=0;var b=0;if(this._checkBoxes!==null){b=this.getCheckWidth();d=this.getCheckHeight()}var e;if(this.getColumnCount()===0){e=this.getDefaultColumnWidth()+b}else{e=this.getColumnsWidth()}if(this._clientArea.getWidth()>e){e=this._clientArea.getWidth()}for(var c=0;c<this._rows.length;c++){if(this._checkBoxes!==null){var a=this._checkBoxes[c];a.setLeft(f);a.setWidth(b);a.setHeight(d)}var g=this._rows[c];g.setLeft(f);g.setWidth(e);g.setHeight(this._itemHeight)}},_scrollRowsVertical:function(h){if(Math.abs(h)>this._rows.length){this._updateRows()}else{var e=new Array();var b=this._checkBoxes!==null?new Array():null;var g=this._rows.length;for(var d=0;d<g;d++){var a=(g+d+h)%g;e.push(this._rows[a]);if(this._checkBoxes!==null){b.push(this._checkBoxes[a])}}this._rows=e;this._checkBoxes=b;this._updateRowTop();for(var d=0;d<g;d++){var c=this._getItemIndexFromRowIndex(d);var f=this._rows[d].getItemIndex();if(f!==c){this._updateRow(d,c)}}}},_updateRows:function(){var b=(new Date()).getTime();for(var a=0;a<this._rows.length;a++){this._updateRow(a,this._getItemIndexFromRowIndex(a))}this._vertScrollBar.autoEnableMerge((new Date()).getTime()-b)},_updateRow:function(d,a){var c=this._rows[d];if(a>=0&&a<this._itemCount){var b=this._items[a];if(b===undefined||(b!==null&&!b.getCached())){this._scheduleResolveItems();this._renderItem(c,this._virtualItem);c.setItemIndex(-1)}else{this._renderItem(c,b);c.setItemIndex(a)}}else{this._renderItem(c,this._emptyItem);c.setItemIndex(-1)}this._updateRowState(d,a)},_renderItem:function(c,a){if(c.isCreated()){a._render(c)}else{var b=function(){a._render(c);c.removeEventListener($[112],b)};c.addEventListener($[112],b)}},_updateRowsState:function(){for(var a=0;a<this._rows.length;a++){this._updateRowState(a,this._getItemIndexFromRowIndex(a))}},_updateRowState:function(e,b){var d=this._rows[e];if(b===-1){d.removeState($[29]);d.removeState($[361]);if(this._checkBoxes!==null){this._checkBoxes[e].setVisibility(false)}}else{if(this._isItemSelected(b)&&!this.shouldHideSelection()){d.addState($[29])}else{d.removeState($[29])}if(this._focusIndex===b){d.addState($[361])}else{d.removeState($[361])}if(this._checkBoxes!==null){var c=this._items[b];var a=this._checkBoxes[e];if(c!==null&&c!==undefined){if(c.getChecked()){a.addState($[197])}else{a.removeState($[197])}if(c.getGrayed()){a.addState($[226])}else{a.removeState($[226])}a.setVisibility(true)}else{a.setVisibility(false)}}}if(this.getFocused()){d.removeState($[86])}else{d.addState($[86])}},_scheduleResolveItems:function(){if(this._resolveItemsFor===null){qx.client.Timer.once(this._sendResolveItemsRequest,this,500)}this._resolveItemsFor=this._topIndex},_sendResolveItemsRequest:function(h){var g=Math.abs(this._topIndex-this._resolveItemsFor);this._resolveItemsFor=null;if(g>this._rows.length-2){this._scheduleResolveItems()}else{var d=[];for(var b=0;b<this._rows.length;b++){var c=this._getItemIndexFromRowIndex(b);if(c>=0&&c<this._itemCount){var k=this._items[c];if(k===undefined||(k!==null&&!k.getCached())){d.push(c)}}}if(d.length>0){var j=d.join(",");var e=org.eclipse.swt.WidgetManager.getInstance();var a=e.findIdByWidget(this);var f=org.eclipse.swt.Request.getInstance();f.addParameter("org.eclipse.swt.events.setData.index",j);f.addEvent("org.eclipse.swt.events.setData",a);f.send()}}},_showResizeLine:function(b){if(this._resizeLine===null){this._resizeLine=new qx.ui.basic.Terminator();this._resizeLine.setAppearance($[410]);this.add(this._resizeLine);qx.ui.core.Widget.flushGlobalQueues()}var d=this._clientArea.getTop();this._resizeLine._renderRuntimeTop(d);var c=b-2-this._horzScrollBar.getValue();this._resizeLine._renderRuntimeLeft(c);var a=this._clientArea.getHeight();this._resizeLine._renderRuntimeHeight(a);this._resizeLine.removeStyleProperty($[147])},_hideResizeLine:function(){this._resizeLine.setStyleProperty($[147],$[14])},_updateGridLines:function(){if(this.getLinesVisible()){var d=this.getColumns();this._showGridLines(d.length);var a=this._clientArea.getHeight();var f=this._columnArea.getLeft();for(var c=0;c<d.length;c++){var b=this._gridLines[c];var e=f+d[c].getLeft()+d[c].getWidth();b.setSpace(e-1,2,0,a);b.removeStyleProperty($[147])}}else{this._showGridLines(0)}},_showGridLines:function(c){for(var b=this._gridLines.length;b<c;b++){var a=new qx.ui.basic.Terminator();a.setAppearance("table-gridline-vertical");a.addState($[41]);a.setZIndex(100000);a.addEventListener($[2],this._onRowMouseDown,this);a.addEventListener($[16],this._onRowMouseUp,this);this._gridLines.push(a);this._clientArea.add(a)}for(var b=c;b<this._gridLines.length;b++){var a=this._gridLines[b];a.setStyleProperty($[147],$[14])}},_getRowAtPoint:function(g,e){var a=null;for(var d=0;a===null&&d<this._rows.length;d++){var h=this._rows[d];var c=h.getElement();var f=qx.bom.element.Location.getLeft(c);var b=qx.bom.element.Location.getTop(c);if(g>=f&&g<f+h.getWidth()&&e>=b&&e<b+h.getHeight()){a=h}}return a},_onFocusIn:function(a){this._updateRowsState()},_onFocusOut:function(a){this._updateRowsState()},onItemSelected:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[66],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.send()},onItemDefaultSelected:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[170],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.send()},onItemChecked:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[66],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.addParameter($[345],"check");b.send()},_onSendRequest:function(a){if(this._topIndexChanged||this._leftOffsetChanged){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(this);var b=org.eclipse.swt.Request.getInstance();if(this._topIndexChanged){b.addParameter(c+".topIndex",this._topIndex);this._topIndexChanged=false}if(this._leftOffsetChanged){b.addParameter(c+".leftOffset",this._horzScrollBar.getValue());this._leftOffsetChanged=false}}},_sendChanges:function(){if(!org.eclipse.swt.EventUtil.getSuspended()){var a=org.eclipse.swt.Request.getInstance();a.send()}this._readyToSendChanges=true},setEnableCellToolTip:function(a){if(a){var c=org.eclipse.swt.WidgetManager.getInstance();var b=c.findIdByWidget(this);this._cellToolTip=new org.eclipse.swt.widgets.TableCellToolTip(b);this._clientArea.addEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(this._cellToolTip)}else{this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(null);this._cellToolTip.destroy();this._cellToolTip=null}},_onClientAreaMouseMove:function(l){if(this._cellToolTip!=null){var e=l.getPageX();var d=l.getPageY();var n=this._getRowAtPoint(e,d);var a=n.getItemIndex();if(a!=-1){var j=org.eclipse.swt.WidgetManager.getInstance();var k=j.findIdByWidget(this._items[a]);var h=-1;var c=this.getColumns();var g=this._clientArea.getElement();var b=qx.bom.element.Location.getLeft(g);for(var f=0;h==-1&&f<c.length;f++){var m=b+this._itemLeft[f];if(e>=m&&e<m+this._itemWidth[f]){h=f}}this._cellToolTip.setCell(k,h)}}},setCellToolTipText:function(a){if(this._cellToolTip!=null){this._cellToolTip.setText(a)}}}});
+qx.Class.define("org.eclipse.swt.widgets.Table",{extend:qx.ui.layout.CanvasLayout,construct:function(f,b){arguments.callee.base.call(this);this.setAppearance("table");this.setHideFocus(true);this.setTabIndex(1);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._suspendClicksOnRow=null;this._alwaysHideSelection=false;this._hideSelection=qx.lang.String.contains(b,"hideSelection");this._linesVisible=false;this._borderWidth=0;this._defaultColumnWidth=0;this._topIndex=0;this._topIndexChanging=false;this._topIndexChanged=false;this._leftOffsetChanged=false;this._hasScrollBarsSelectionListener=false;this._readyToSendChanges=true;this._resolveItemsFor=null;this._itemHeight=0;this._rows=new Array();this._items=new Array();this._gridLines=new Array();this._itemCount=0;this._unresolvedItems=null;this._checkBoxes=null;if(qx.lang.String.contains(b,"check")){this._checkBoxes=new Array()}this._multiSelect=qx.lang.String.contains(b,"multi");this._selected=new Array();this._selectionStart=-1;this._focusIndex=-1;this._emptyItem=new org.eclipse.swt.widgets.TableItem(this,-1);this._virtualItem=new org.eclipse.swt.widgets.TableItem(this,-1);this._virtualItem.setTexts(["..."]);this._resizeLine=null;this._itemLeft=new Array();this._itemWidth=new Array();this._itemImageLeft=new Array();this._itemImageWidth=new Array();this._itemTextLeft=new Array();this._itemTextWidth=new Array();this._columnArea=new qx.ui.layout.CanvasLayout();this._columnArea.setTop(0);this._columnArea.setLeft(0);this._columnArea.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._columnArea.setZIndex(20000);var d=new qx.ui.basic.Atom();d.setLabel("&nbsp;");d.getLabelObject().setMode(qx.constant.Style.LABEL_MODE_HTML);d.setAppearance($[452]);d.addState("dummy");this._columnArea.add(d);this.add(this._columnArea);this._clientArea=new qx.ui.layout.CanvasLayout();this._clientArea.setAppearance("table-client-area");this._clientArea.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._clientArea.setTop(20);this._clientArea.setLeft(0);this._noScroll=qx.lang.String.contains(b,"noScroll");if(!this._noScroll){this._clientArea.addEventListener($[49],this._onClientAreaMouseWheel,this)}this._clientArea.addEventListener($[24],this._onClientAppear,this);var a=function(g){g.stopPropagation()};this._horzScrollBar=new org.eclipse.rwt.widgets.ScrollBar(true);this._horzScrollBar.addEventListener($[75],a);this._horzScrollBar.setZIndex(100000000);this._horzScrollBar.setMergeEvents(true);this.add(this._horzScrollBar);this._horzScrollBar.setHeight(this._horzScrollBar.getPreferredBoxHeight());this._horzScrollBar.addEventListener($[78],this._onHorzScrollBarChangeValue,this);this._vertScrollBar=new org.eclipse.rwt.widgets.ScrollBar(false);this._vertScrollBar.addEventListener($[75],a);this._vertScrollBar.setZIndex(100000000);this._vertScrollBar.setMergeEvents(false);this.add(this._vertScrollBar);this._vertScrollBar.setWidth(this._vertScrollBar.getPreferredBoxWidth());this._vertScrollBar.addEventListener($[78],this._onVertScrollBarChangeValue,this);this.addEventListener($[57],this._onChangeSize,this);this.addEventListener($[68],this._onChangeSize,this);this.addEventListener($[153],this._onChangeEnabled,this);this.addEventListener($[74],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._keyboardSelecionChanged=false;this.addEventListener($[26],this._onKeyDown,this);this.addEventListener($[12],this._onKeyPress,this);this.addEventListener($[65],this._onKeyUp,this);var c=org.eclipse.swt.Request.getInstance();c.addEventListener("send",this._onSendRequest,this);var e=org.eclipse.swt.WidgetManager.getInstance();e.add(this._clientArea,f+"_clientArea",false);this.add(this._clientArea);this._cellToolTip=null;qx.ui.core.Widget.disableScrolling(this);this._clickDelayed=false;this.addEventListener($[75],this._onDragStart,this)},destruct:function(){var b=org.eclipse.swt.Request.getInstance();b.removeEventListener("send",this._onSendRequest,this);this.removeEventListener($[57],this._onChangeSize,this);this.removeEventListener($[68],this._onChangeSize,this);this.removeEventListener($[153],this._onChangeEnabled,this);this.removeEventListener($[74],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this.removeEventListener($[26],this._onKeyDown,this);this.removeEventListener($[12],this._onKeyPress,this);this.removeEventListener($[65],this._onKeyUp,this);this.removeEventListener($[75],this._onDragStart,this);this._virtualItem.dispose();this._emptyItem.dispose();for(var a=0;a<this._items.length;a++){if(this._items[a]){this._items[a].dispose()}}this._items=null;var b=org.eclipse.swt.Request.getInstance();if(this._horzScrollBar){this._horzScrollBar.removeEventListener($[78],this._onHorzScrollBarChangeValue,this);this._horzScrollBar.dispose();this._horzScrollBar=null}if(this._vertScrollBar){this._vertScrollBar.removeEventListener($[78],this._onVertScrollBarChangeValue,this);this._vertScrollBar.dispose();this._vertScrollBar=null}for(var a=0;a<this._gridLines.length;a++){this._gridLines[a].removeEventListener($[2],this._onRowMouseDown,this);this._gridLines[a].removeEventListener($[16],this._onRowMouseUp,this);this._gridLines[a].dispose();this._gridLines[a]=null}if(this._clientArea){if(!this._noScroll){this._clientArea.removeEventListener($[49],this._onClientAreaMouseWheel,this)}this._clientArea.removeEventListener($[24],this._onClientAppear,this);if(this._cellToolTip){this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this)}org.eclipse.swt.WidgetManager.getInstance().remove(this._clientArea);this._clientArea.dispose();this._clientArea=null}if(this._cellToolTip){this._cellToolTip.destroy();this._cellToolTip=null}if(this._columnArea){this._columnArea.dispose();this._columnArea=null}if(this._resizeLine){this._resizeLine.setParent(null);this._resizeLine.dispose()}if(this._rows){for(var a=0;a<this._rows.length;a++){this._rows[a].dispose()}this._rows=null}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].dispose()}this._checkBoxes=null}this._itemLeft=null;this._itemWidth=null;this._itemImageLeft=null;this._itemImageWidth=null;this._itemTextLeft=null;this._itemTextWidth=null},events:{itemselected:$[79],itemdefaultselected:$[79],itemchecked:$[79]},properties:{checkWidth:{check:$[18],init:21,themeable:true},checkHeight:{check:$[18],init:13,themeable:true}},statics:{_isShiftOnlyPressed:function(a){return a.isShiftPressed()&&!a.isCtrlPressed()&&!a.isAltPressed()&&!a.isMetaPressed()},_isCtrlOnlyPressed:function(a){return a.isCtrlOrCommandPressed()&&!a.isShiftPressed()&&!a.isAltPressed()},_isCtrlShiftOnlyPressed:function(a){return a.isCtrlOrCommandPressed()&&a.isShiftPressed()&&!a.isAltPressed()},_isMetaOnlyPressed:function(a){return a.isAltPressed()&&!a.isShiftPressed()&&!a.isCtrlPressed()},_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{_isRelevantEvent:function(a){var b=a.getTarget();var c=this._columnArea.getChildren()[0];return b===this||b===c||b instanceof org.eclipse.swt.widgets.TableRow||b instanceof org.eclipse.swt.widgets.TableColumn},setCursor:function(c){this._columnArea.setCursor(c);this._clientArea.setCursor(c);var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].setCursor(c)}for(var a=0;a<this._rows.length;a++){this._rows[a].setCursor(c)}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].setCursor(c)}}},resetCursor:function(){this._columnArea.resetCursor();this._clientArea.resetCursor();var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].resetCursor()}for(var a=0;a<this._rows.length;a++){this._rows[a].resetCursor()}if(this._checkBoxes!==null){for(var a=0;a<this._checkBoxes.length;a++){this._checkBoxes[a].resetCursor()}}},setTextColor:function(a){this._clientArea.setTextColor(a)},resetTextColor:function(){this._clientArea.resetTextColor()},setBackgroundImage:function(a){this._clientArea.setBackgroundImage(a)},resetBackgroundImage:function(){this._clientArea.resetBackgroundImage()},setBackgroundColor:function(a){this._clientArea.setBackgroundColor(a)},resetBackgroundColor:function(){this._clientArea.resetBackgroundColor()},setHeaderHeight:function(c){this._columnArea.setHeight(c);var b=this._columnArea.getChildren();for(var a=0;a<b.length;a++){b[a].setHeight(c)}this._updateClientAreaSize()},setHeaderVisible:function(a){this._columnArea.setVisibility(a);this._updateClientAreaSize();this._updateGridLines()},setItemHeight:function(a){this._itemHeight=a;this._updateScrollHeight();if(this._updateRowCount()){this._updateRows()}this._vertScrollBar.setIncrement(a)},getItemHeight:function(){return this._itemHeight},setAlwaysHideSelection:function(a){this._alwaysHideSelection=a},shouldHideSelection:function(){return this._alwaysHideSelection||(this._hideSelection&&!this.getFocused())},setItemMetrics:function(e,f,d,b,c,a,g){this._itemLeft[e]=f;this._itemWidth[e]=d;this._itemImageLeft[e]=b;this._itemImageWidth[e]=c;this._itemTextLeft[e]=a;this._itemTextWidth[e]=g},setScrollBarsVisibile:function(b,a){if(!b){this._horzScrollBar.setValue(0)}this._horzScrollBar.setVisibility(b);if(!a){this._vertScrollBar.setValue(0)}this._vertScrollBar.setVisibility(a);this._updateClientAreaSize()},updateRows:function(){this._updateRows()},getItemLeft:function(a){return this._itemLeft[a]},getItemWidth:function(a){return this._itemWidth[a]},getItemImageLeft:function(a){return this._itemImageLeft[a]},getItemImageWidth:function(a){return this._itemImageWidth[a]},getItemTextLeft:function(a){return this._itemTextLeft[a]},getItemTextWidth:function(a){return this._itemTextWidth[a]},setTopIndex:function(a){this._internalSetTopIndex(a,true);this._topIndexChanged=false},_internalSetTopIndex:function(b,a){if(this._topIndex!==b){this._topIndexChanging=true;if(a){this._vertScrollBar.setValue(b*this._itemHeight)}var c=b-this._topIndex;this._topIndex=b;this._scrollRowsVertical(c);this._topIndexChanged=true;this._topIndexChanging=false}},setLeftOffset:function(a){this._horzScrollBar.setValue(a);this._leftOffsetChanged=false},setBorderWidth:function(a){this._borderWidth=a},getColumn:function(a){return this._columnArea.getChildren()[a+1]},getColumnCount:function(){return this._columnArea.getChildrenLength()-1},getColumns:function(){return this._columnArea.getChildren().slice(1)},getColumnsWidth:function(){var a=0;var c=this._columnArea.getChildren();for(var b=1;b<c.length;b++){a+=c[b].getWidth()}return a},setDefaultColumnWidth:function(a){this._defaultColumnWidth=a;this._updateScrollWidth()},getDefaultColumnWidth:function(){return this._defaultColumnWidth},setLinesVisible:function(b){this._linesVisible=b;if(b){this.addState($[157])}else{this.removeState($[157])}for(var a=0;a<this._rows.length;a++){this._rows[a].setLinesVisible(b)}this._updateGridLines()},getLinesVisible:function(){return this._linesVisible},hasCheckBoxes:function(){return this._checkBoxes!==null},setFocusIndex:function(c){if(c!==this._focusIndex){var a=this._focusIndex;this._focusIndex=c;if(a!==-1){this.updateItem(a,false)}if(this._focusIndex!==-1){this.updateItem(this._focusIndex,false)}if(org.eclipse.swt.EventUtil.getSuspended()){this._selectionStart=-1}else{var b=org.eclipse.swt.Request.getInstance();var d=org.eclipse.swt.WidgetManager.getInstance().findIdByWidget(this);b.addParameter(d+$[540],c)}}},getFocusIndex:function(){return this._focusIndex},setItemCount:function(a){this._itemCount=a;this._updateScrollHeight();this._updateRows()},_onChangeEnabled:function(a){this._updateRows()},_onCheckBoxClick:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._getItemIndexFromRowIndex(c);this._toggleCheckState(b)},_onCheckBoxOver:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._checkBoxes[c];b.addState("over");this._rows[c].addState("over")},_onCheckBoxOut:function(a){var c=this._checkBoxes.indexOf(a.getTarget());var b=this._checkBoxes[c];b.removeState("over");this._rows[c].removeState("over")},_onRowMouseDown:function(a){var c=this._getRowFromEvent(a);if(c!=null){var b=this._topIndex+this._rows.indexOf(c);if(this._isDragSource()&&this._isItemSelected(b)){if(this._isValidMouseEvent(c,b)){this.setFocusIndex(b);this._clickDelayed=true}}else{this._rowClicked(a,c)}}},_onRowMouseUp:function(a){if(this._clickDelayed){this._clickDelayed=false;var b=this._getRowFromEvent(a);if(b!=null){this._rowClicked(a,b)}}},_getRowFromEvent:function(b){var c=b.getTarget();var a=null;if(c instanceof org.eclipse.swt.widgets.TableRow){a=c}else{a=this._getRowAtPoint(b.getPageX(),b.getPageY())}return a},_isDragSource:function(){return org.eclipse.rwt.DNDSupport.getInstance().isDragSource(this)},_onDragStart:function(a){this._clickDelayed=false},_isValidMouseEvent:function(c,b){var a=b>=0&&b<this._itemCount&&this._items[b]&&this._suspendClicksOnRow!=c;return a},_rowClicked:function(a,c){var b=this._topIndex+this._rows.indexOf(c);if(this._isValidMouseEvent(c,b)){this._suspendClicksOnRow=c;qx.client.Timer.once(this._resumeClicks,this,org.eclipse.swt.EventUtil.DOUBLE_CLICK_TIME);if(this._multiSelect){this._multiSelectRowClicked(a,b)}else{this._setSingleSelection(b)}this.setFocusIndex(b);this._makeItemFullyVisible(b);this._updateSelectionParam();this.createDispatchDataEvent($[496],b)}},_multiSelectRowClicked:function(b,d){if(b.isRightButtonPressed()){if(!this._isItemSelected(d)){this._setSingleSelection(d);this._selectionStart=-1}}else{if(org.eclipse.swt.widgets.Table._isCtrlOnlyPressed(b)){if(this._isItemSelected(d)){this._deselectItem(d,true)}else{this._selectItem(d)}}if(org.eclipse.swt.widgets.Table._isShiftOnlyPressed(b)||org.eclipse.swt.widgets.Table._isCtrlShiftOnlyPressed(b)){if(org.eclipse.swt.widgets.Table._isShiftOnlyPressed(b)&&this._selectionStart!==-1){this._clearSelection()}var e=this._selectionStart!==-1?this._selectionStart:this._focusIndex;if(e!==-1){var f=Math.min(e,d);var a=Math.max(e,d);for(var c=f;c<=a;c++){this._selectItem(c)}}else{this._selectItem(d)}}if(org.eclipse.swt.widgets.Table._isNoModifierPressed(b)||org.eclipse.swt.widgets.Table._isMetaOnlyPressed(b)){this._setSingleSelection(d)}if(org.eclipse.swt.widgets.Table._isCtrlOnlyPressed(b)||org.eclipse.swt.widgets.Table._isCtrlShiftOnlyPressed(b)){this._selectionStart=d}else{this._selectionStart=-1}}},_setSingleSelection:function(a){this._clearSelection();this._selectItem(a)},_resumeClicks:function(){this._suspendClicksOnRow=null},_onRowDblClick:function(a){var c=this._rows.indexOf(a.getTarget());var b=this._getItemIndexFromRowIndex(c);if(b!==-1){this.createDispatchDataEvent($[571],b)}},_onRowContextMenu:function(a){if(org.eclipse.swt.widgets.Table._isNoModifierPressed(a)||org.eclipse.swt.widgets.Table._isMetaOnlyPressed(a)){var c=a.getTarget();var b=this.getContextMenu();if(b!==null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show()}}},_onRowChangeOverState:function(a){var d=a.getTarget();if(d.hasState("over")){for(var b=0;b<this._rows.length;b++){if(this._rows[b]!==d){this._rows[b].removeState("over")}}}var c=d.getItemIndex();if(c!=-1){this._renderItem(d,this._items[c])}},_toggleCheckState:function(a){if(this._checkBoxes!=null){var b=this._items[a];if(a>=0&&a<this._itemCount&&b){b.setChecked(!b.getChecked());var c=this._getRowIndexFromItemIndex(a);if(c!==-1){this._updateRow(c,a)}this._updateCheckParam(b);this.createDispatchDataEvent("itemchecked",a)}}},_updateSelectionParam:function(){var e=org.eclipse.swt.WidgetManager.getInstance();var d=e.findIdByWidget(this);var c=org.eclipse.swt.Request.getInstance();var b="";for(var a=0;a<this._selected.length;a++){if(b!==""){b+=","}b+=this._selected[a].toString()}c.addParameter(d+$[144],b)},_updateCheckParam:function(b){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(b);var a=org.eclipse.swt.Request.getInstance();a.addParameter(c+".checked",b.getChecked())},_onClientAreaMouseWheel:function(a){if(this._isRelevantEvent(a)){a.preventDefault();a.stopPropagation();var b=a.getWheelDelta()*this._itemHeight*2;this._vertScrollBar.setValue(this._vertScrollBar.getValue()-b)}},_onChangeSize:function(a){this._updateClientAreaSize()},_onClientAppear:function(a){this._updateRowCount();this._updateRows();this._updateGridLines()},_onKeyDown:function(a){if(this._isRelevantEvent(a)){switch(a.getKeyIdentifier()){case $[91]:this._toggleCheckState(this._focusIndex);break;case $[70]:var d=-1;var c=-1;for(var b=0;b<this._selected.length;b++){if(this._focusIndex===this._selected[b]){d=this._selected[b]}if(c===-1){c=this._selected[b]}else{c=Math.min(c,this._selected[b])}}if(d===-1){d=c}this.createDispatchDataEvent($[571],d);break}}},_onKeyPress:function(b){var f=b.getKeyIdentifier();if(this._isRelevantEvent(b)&&org.eclipse.swt.widgets.Table._isNoModifierPressed(b)&&(f==="Up"||f==="Down"||f===$[58]||f===$[55]||f==="Home"||f==="End")){b.preventDefault();b.stopPropagation();var e=this._calcGotoIndex(this._focusIndex,f);if(e!==this._focusIndex&&e>=0&&e<this._itemCount){var c=this._focusIndex;this._setSingleSelection(e);if(!this._isItemFullyVisible(e)){var d;if(e===this._itemCount-1){d=e-this._getFullyVisibleRowCount()+1}else{d=e>=this._topIndex+this._getFullyVisibleRowCount()?e-this._getFullyVisibleRowCount()+1:e}if(d<0){d=0}else{if(d>this._itemCount){d=this._itemCount}}var a=this._itemCount-this._getFullyVisibleRowCount();if(e>a&&e<this._itemCount&&f===$[55]){d=a}this._internalSetTopIndex(d,true)}this.setFocusIndex(e);this._keyboardSelecionChanged=true}}if(this._isRelevantEvent(b)&&org.eclipse.swt.widgets.Table._isNoModifierPressed(b)&&(f==="Left"||f===$[53])){b.preventDefault();b.stopPropagation()}},_calcGotoIndex:function(b,c){var a=b;switch(c){case"Home":a=0;break;case"End":a=this._itemCount-1;break;case"Up":a=b-1;break;case"Down":a=b+1;break;case $[58]:a=b-this._getFullyVisibleRowCount();if(a<0){a=0}break;case $[55]:a=b+this._getFullyVisibleRowCount();if(a>this._itemCount-1){a=this._itemCount-1}break}return a},_getFullyVisibleRowCount:function(){return Math.floor(this._clientArea.getHeight()/this._itemHeight)},_onKeyUp:function(a){if(this._keyboardSelecionChanged){this._keyboardSelecionChanged=false;this._updateSelectionParam();this.createDispatchDataEvent($[496],this._focusIndex)}},_onVertScrollBarChangeValue:function(){if(!this._topIndexChanging){var b=0;if(this._itemHeight!==0){var a=this._clientArea.isCreated()?this._vertScrollBar.getValue():0;b=Math.floor(a/this._itemHeight)}this._internalSetTopIndex(b,false)}if(this._readyToSendChanges&&this._hasScrollBarsSelectionListener){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}},_onHorzScrollBarChangeValue:function(){this._columnArea.setLeft(0-this._horzScrollBar.getValue());this._updateRowBounds();this._updateGridLines();this._leftOffsetChanged=true;if(this._readyToSendChanges&&this._hasScrollBarsSelectionListener){this._readyToSendChanges=false;qx.client.Timer.once(this._sendChanges,this,500)}},setHasScrollBarsSelectionListener:function(a){this._hasScrollBarsSelectionListener=a},_addItem:function(b,a){if(this._items[a]){this._items.splice(a,0,b)}else{this._items[a]=b}this._updateScrollHeight()},_removeItem:function(b){var a=this._items.indexOf(b);this._items.splice(a,1);if(a===this._focusIndex){this._focusIndex=-1}this._deselectItem(a,false);this._adjustSelectedIndices(a);this._updateScrollHeight()},_selectItem:function(a){if(!this._isItemSelected(a)){this._selected.push(a);this.updateItem(a,true)}},_deselectItem:function(b,c){var a=this._selected.indexOf(b);if(a!=-1){this._selected.splice(a,1);if(c){this.updateItem(b,true)}}},_isItemSelected:function(a){return this._selected.indexOf(a)!==-1},_clearSelection:function(){while(this._selected.length>0){this._deselectItem(this._selected[0],true)}},_adjustSelectedIndices:function(c){for(var b=0;b<this._selected.length;b++){var a=this._selected[b];if(c<a){this._selected[b]=a-1}}},_resetSelectionStart:function(){this._selectionStart=-1},_isItemVisible:function(a){return a>=this._topIndex&&a<this._topIndex+this._rows.length},_isItemFullyVisible:function(a){return a>=this._topIndex&&a<this._topIndex+this._getFullyVisibleRowCount()},_makeItemFullyVisible:function(a){var c=this._getRowIndexFromItemIndex(a);var b=c===-1?null:this._rows[c];if(b!==null&&b.getTop()+b.getHeight()>this._clientArea.getHeight()){this._internalSetTopIndex(this._topIndex+1,true)}},updateItem:function(b,a){var c=this._getRowIndexFromItemIndex(b);if(c!==-1){if(a){this._updateRow(c,b)}else{this._updateRowState(c,b)}}},_getRowIndexFromItemIndex:function(b){var a=-1;if(b>=this._topIndex&&b<this._topIndex+this._rows.length){a=b-this._topIndex}return a},_getItemIndexFromRowIndex:function(b){var a=this._topIndex+b;if(a<0||a>this._itemCount-1){a=-1}return a},_isItemHovered:function(b){var a=false;var d=this._getRowIndexFromItemIndex(b);if(d>=0){var c=this._rows[d];a=c.hasState("over")&&c.hasHoverColorsDefined()}return a},_addColumn:function(a){a.setHeight(this._columnArea.getHeight());this._hookColumnMove(a);a.addEventListener($[57],this._onColumnChangeSize,this);this._columnArea.add(a);this._updateScrollWidth()},_hookColumnMove:function(a){a.addEventListener($[145],this._onColumnChangeSize,this)},_unhookColumnMove:function(a){a.removeEventListener($[145],this._onColumnChangeSize,this)},_removeColumn:function(a){this._unhookColumnMove(a);a.removeEventListener($[57],this._onColumnChangeSize,this);this._columnArea.remove(a);this._updateScrollWidth();this._updateRows()},_onColumnChangeSize:function(a){this._updateScrollWidth()},_updateScrollHeight:function(){var a=this._itemHeight+this._itemCount*this._itemHeight;if(!this._vertScrollBar.getDisposed()){this._vertScrollBar.setMaximum(a)}},_updateScrollWidth:function(){var a;if(this.getColumnCount()===0){a=this.getDefaultColumnWidth();if(this._checkBoxes!==null){a+=this.getCheckWidth()}}else{a=this.getColumnsWidth()}this._horzScrollBar.setMaximum(a);this._updateColumnHeader();this._updateGridLines()},_updateColumnHeader:function(){var e=this.getWidth()-2*this._borderWidth;var d=this._columnArea.getChildren()[0];var b=this._vertScrollBar.getVisibility()?this._vertScrollBar.getWidth():0;var a;if(this.getColumnCount()===0){var c=this.getDefaultColumnWidth();if(this._checkBoxes!==null){c+=this.getCheckWidth()}a=Math.max(c+b,e);d.setLeft(0);d.setWidth(a)}else{var c=this.getColumnsWidth();a=Math.max(c+b,e);d.setLeft(c);d.setWidth(Math.max(a-c,0))}this._columnArea.setWidth(a)},_updateClientAreaSize:function(){var d=0;if(this._columnArea.getVisibility()){d=this._columnArea.getHeight()}var c=this._horzScrollBar.getVisibility()?this._horzScrollBar.getHeight():0;var b=this._vertScrollBar.getVisibility()?this._vertScrollBar.getWidth():0;var a=this.getHeight()-d-c-(2*this._borderWidth);var e=this.getWidth()-b-(2*this._borderWidth);this._vertScrollBar.setLeft(this.getWidth()-b-(2*this._borderWidth));this._vertScrollBar.setTop(d);this._vertScrollBar.setHeight(a);this._horzScrollBar.setLeft(0);this._horzScrollBar.setTop(this.getHeight()-c-(2*this._borderWidth));this._horzScrollBar.setWidth(e);this._clientArea.setTop(d);this._clientArea.setHeight(a);this._clientArea.setWidth(e);this._updateColumnHeader();this._updateGridLines();if(this._updateRowCount()){this._updateRows()}else{this._updateRowBounds();this._updateRowTop()}},_updateRowCount:function(){var b=false;if(this._clientArea.isCreated()){var e=0;var a=this._clientArea.getHeight();if(this._itemHeight!==0&&a>0){e=Math.ceil(a/this._itemHeight)}if(e!=this._rows.length){while(this._rows.length>e){if(this._checkBoxes!=null){var d=this._checkBoxes.shift();d.removeEventListener($[502],this._onCheckBoxClick,this);d.removeEventListener($[10],this._onCheckBoxOver,this);d.removeEventListener($[15],this._onCheckBoxOut,this);d.setParent(null);d.dispose()}var f=this._rows.shift();this._unhookRowEventListener(f);f.setParent(null);f.dispose()}if(this._rows.length<e){while(this._rows.length<e){var c=new org.eclipse.swt.widgets.TableRow();this._hookRowEventListener(c);c.setLinesVisible(this._linesVisible);this._clientArea.add(c);this._rows.push(c);if(this._checkBoxes!=null){var d=new qx.ui.basic.Image();d.addEventListener($[28],this._onCheckBoxClick,this);d.addEventListener($[10],this._onCheckBoxOver,this);d.addEventListener($[15],this._onCheckBoxOut,this);d.setAppearance("table-check-box");this._clientArea.add(d);this._checkBoxes.push(d)}}}this._updateRowBounds();this._updateRowTop();this._updateRowsState();b=true}}return b},_hookRowEventListener:function(a){a.addEventListener($[2],this._onRowMouseDown,this);a.addEventListener($[16],this._onRowMouseUp,this);a.addEventListener($[62],this._onRowDblClick,this);a.addEventListener($[39],this._onRowContextMenu,this);a.addEventListener($[302],this._onRowChangeOverState,this)},_unhookRowEventListener:function(a){a.removeEventListener($[2],this._onRowMouseDown,this);a.removeEventListener($[16],this._onRowMouseUp,this);a.removeEventListener($[62],this._onRowDblClick,this);a.removeEventListener($[39],this._onRowContextMenu,this);a.removeEventListener($[302],this._onRowChangeOverState,this)},_updateRowTop:function(){var c=this._itemHeight/2-this.getCheckHeight()/2;var b=0;for(var a=0;a<this._rows.length;a++){if(this._checkBoxes!==null){this._checkBoxes[a].setTop(b+c)}this._rows[a].setTop(b);b+=this._itemHeight}},_updateRowBounds:function(){var f=0-this._horzScrollBar.getValue();var d=0;var b=0;if(this._checkBoxes!==null){b=this.getCheckWidth();d=this.getCheckHeight()}var e;if(this.getColumnCount()===0){e=this.getDefaultColumnWidth()+b}else{e=this.getColumnsWidth()}if(this._clientArea.getWidth()>e){e=this._clientArea.getWidth()}for(var c=0;c<this._rows.length;c++){if(this._checkBoxes!==null){var a=this._checkBoxes[c];a.setLeft(f);a.setWidth(b);a.setHeight(d)}var g=this._rows[c];g.setLeft(f);g.setWidth(e);g.setHeight(this._itemHeight)}},_scrollRowsVertical:function(h){if(Math.abs(h)>this._rows.length){this._updateRows()}else{var e=new Array();var b=this._checkBoxes!==null?new Array():null;var g=this._rows.length;for(var d=0;d<g;d++){var a=(g+d+h)%g;e.push(this._rows[a]);if(this._checkBoxes!==null){b.push(this._checkBoxes[a])}}this._rows=e;this._checkBoxes=b;this._updateRowTop();for(var d=0;d<g;d++){var c=this._getItemIndexFromRowIndex(d);var f=this._rows[d].getItemIndex();if(f!==c){this._updateRow(d,c)}}}},_updateRows:function(){var b=(new Date()).getTime();for(var a=0;a<this._rows.length;a++){this._updateRow(a,this._getItemIndexFromRowIndex(a))}this._vertScrollBar.autoEnableMerge((new Date()).getTime()-b)},_updateRow:function(d,a){var c=this._rows[d];if(a>=0&&a<this._itemCount){var b=this._items[a];if(b===undefined||(b!==null&&!b.getCached())){this._scheduleResolveItems();this._renderItem(c,this._virtualItem);c.setItemIndex(-1)}else{this._renderItem(c,b);c.setItemIndex(a)}}else{this._renderItem(c,this._emptyItem);c.setItemIndex(-1)}this._updateRowState(d,a)},_renderItem:function(c,a){if(c.isCreated()){a._render(c)}else{var b=function(){a._render(c);c.removeEventListener($[112],b)};c.addEventListener($[112],b)}},_updateRowsState:function(){for(var a=0;a<this._rows.length;a++){this._updateRowState(a,this._getItemIndexFromRowIndex(a))}},_updateRowState:function(e,b){var d=this._rows[e];if(b===-1){d.removeState($[29]);d.removeState($[361]);if(this._checkBoxes!==null){this._checkBoxes[e].setVisibility(false)}}else{if(this._isItemSelected(b)&&!this.shouldHideSelection()){d.addState($[29])}else{d.removeState($[29])}if(this._focusIndex===b){d.addState($[361])}else{d.removeState($[361])}if(this._checkBoxes!==null){var c=this._items[b];var a=this._checkBoxes[e];if(c!==null&&c!==undefined){if(c.getChecked()){a.addState($[197])}else{a.removeState($[197])}if(c.getGrayed()){a.addState($[226])}else{a.removeState($[226])}a.setVisibility(true)}else{a.setVisibility(false)}}}if(this.getFocused()){d.removeState($[86])}else{d.addState($[86])}},_scheduleResolveItems:function(){if(this._resolveItemsFor===null){qx.client.Timer.once(this._sendResolveItemsRequest,this,500)}this._resolveItemsFor=this._topIndex},_sendResolveItemsRequest:function(h){var g=Math.abs(this._topIndex-this._resolveItemsFor);this._resolveItemsFor=null;if(g>this._rows.length-2){this._scheduleResolveItems()}else{var d=[];for(var b=0;b<this._rows.length;b++){var c=this._getItemIndexFromRowIndex(b);if(c>=0&&c<this._itemCount){var k=this._items[c];if(k===undefined||(k!==null&&!k.getCached())){d.push(c)}}}if(d.length>0){var j=d.join(",");var e=org.eclipse.swt.WidgetManager.getInstance();var a=e.findIdByWidget(this);var f=org.eclipse.swt.Request.getInstance();f.addParameter("org.eclipse.swt.events.setData.index",j);f.addEvent("org.eclipse.swt.events.setData",a);f.send()}}},_showResizeLine:function(b){if(this._resizeLine===null){this._resizeLine=new qx.ui.basic.Terminator();this._resizeLine.setAppearance($[410]);this.add(this._resizeLine);qx.ui.core.Widget.flushGlobalQueues()}var d=this._clientArea.getTop();this._resizeLine._renderRuntimeTop(d);var c=b-2-this._horzScrollBar.getValue();this._resizeLine._renderRuntimeLeft(c);var a=this._clientArea.getHeight();this._resizeLine._renderRuntimeHeight(a);this._resizeLine.removeStyleProperty($[147])},_hideResizeLine:function(){this._resizeLine.setStyleProperty($[147],$[14])},_updateGridLines:function(){if(this.getLinesVisible()){var d=this.getColumns();this._showGridLines(d.length);var a=this._clientArea.getHeight();var f=this._columnArea.getLeft();for(var c=0;c<d.length;c++){var b=this._gridLines[c];var e=f+d[c].getLeft()+d[c].getWidth();b.setSpace(e-1,2,0,a);b.removeStyleProperty($[147])}}else{this._showGridLines(0)}},_showGridLines:function(c){for(var b=this._gridLines.length;b<c;b++){var a=new qx.ui.basic.Terminator();a.setAppearance("table-gridline-vertical");a.addState($[41]);a.setZIndex(100000);a.addEventListener($[2],this._onRowMouseDown,this);a.addEventListener($[16],this._onRowMouseUp,this);this._gridLines.push(a);this._clientArea.add(a)}for(var b=c;b<this._gridLines.length;b++){var a=this._gridLines[b];a.setStyleProperty($[147],$[14])}},_getRowAtPoint:function(g,e){var a=null;for(var d=0;a===null&&d<this._rows.length;d++){var h=this._rows[d];var c=h.getElement();var f=qx.bom.element.Location.getLeft(c);var b=qx.bom.element.Location.getTop(c);if(g>=f&&g<f+h.getWidth()&&e>=b&&e<b+h.getHeight()){a=h}}return a},_onFocusIn:function(a){this._updateRowsState()},_onFocusOut:function(a){this._updateRowsState()},onItemSelected:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[66],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.send()},onItemDefaultSelected:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[170],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.send()},onItemChecked:function(a){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(a.getTarget());var b=org.eclipse.swt.Request.getInstance();b.addEvent($[66],c);org.eclipse.swt.EventUtil.addWidgetSelectedModifier();b.addParameter($[271],a.getData());b.addParameter($[345],"check");b.send()},_onSendRequest:function(a){if(this._topIndexChanged||this._leftOffsetChanged){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(this);var b=org.eclipse.swt.Request.getInstance();if(this._topIndexChanged){b.addParameter(c+".topIndex",this._topIndex);this._topIndexChanged=false}if(this._leftOffsetChanged){b.addParameter(c+".leftOffset",this._horzScrollBar.getValue());this._leftOffsetChanged=false}}},_sendChanges:function(){if(!org.eclipse.swt.EventUtil.getSuspended()){var a=org.eclipse.swt.Request.getInstance();a.send()}this._readyToSendChanges=true},setEnableCellToolTip:function(a){if(a){var c=org.eclipse.swt.WidgetManager.getInstance();var b=c.findIdByWidget(this);this._cellToolTip=new org.eclipse.swt.widgets.TableCellToolTip(b);this._clientArea.addEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(this._cellToolTip)}else{this._clientArea.removeEventListener($[48],this._onClientAreaMouseMove,this);this._clientArea.setToolTip(null);this._cellToolTip.destroy();this._cellToolTip=null}},_onClientAreaMouseMove:function(l){if(this._cellToolTip!=null){var e=l.getPageX();var d=l.getPageY();var n=this._getRowAtPoint(e,d);var a=n.getItemIndex();if(a!=-1){var j=org.eclipse.swt.WidgetManager.getInstance();var k=j.findIdByWidget(this._items[a]);var c=this.getColumns();var h=c.length==0?0:-1;var g=this._clientArea.getElement();var b=qx.bom.element.Location.getLeft(g);for(var f=0;h==-1&&f<c.length;f++){var m=b+this._itemLeft[f];if(e>=m&&e<m+this._itemWidth[f]){h=f}}this._cellToolTip.setCell(k,h)}}},setCellToolTipText:function(a){if(this._cellToolTip!=null){this._cellToolTip.setText(a)}}}});
qx.Class.define("org.eclipse.swt.widgets.TableItem",{extend:qx.core.Object,construct:function(b,a){arguments.callee.base.call(this);this._parent=b;this._cached=true;this._checked=false;this._grayed=false;this._texts=new Array();this._images=new Array();this._background=null;this._foreground=null;this._font=null;this._cellBackgrounds=null;this._cellForegrounds=null;this._cellFonts=null;if(a>=0){b._addItem(this,a)}},statics:{PX:"px"},members:{dispose:function(){arguments.callee.base.call(this);if(!this._parent.getDisposed()&&!qx.core.Object.inGlobalDispose()){this._parent._removeItem(this)}org.eclipse.swt.WidgetManager.getInstance().remove(this)},getCached:function(){return this._cached},setChecked:function(a){if(this._checked!=a){this._checked=a}},getChecked:function(){return this._checked},setGrayed:function(a){if(this._grayed!=a){this._grayed=a}},getGrayed:function(){return this._grayed},setSelection:function(b){var a=this._getIndex();if(b){this._parent._selectItem(a,false);this._parent._resetSelectionStart()}else{this._parent._deselectItem(a,false)}},setTexts:function(a){this._texts=a},setImages:function(a){this._images=a},setBackground:function(a){this._background=a},setForeground:function(a){this._foreground=a},setFont:function(a){this._font=a},setCellBackgrounds:function(a){this._cellBackgrounds=a},setCellForegrounds:function(a){this._cellForegrounds=a},setCellFonts:function(a){this._cellFonts=a},setVariant:function(a){this._variant=a},update:function(){this._cached=true;this._parent.updateItem(this._getIndex(),true)},clear:function(){this._cached=false;this._checked=false;this._grayed=false;this._texts=new Array();this._images=new Array();this._background=null;this._foreground=null;this._font=null;this._cellBackgrounds=null;this._cellForegrounds=null;this._cellFonts=null;this._variant=null},_render:function(f){var b=f.getElement();var h=this._parent;var e=0;var d=0;var n=0;var m=this._parent.getItemHeight()-1;if(m<0){m=0}var s=h.getColumnCount();var g=this._drawColors();if(s==0){s=1}var j=0;if(h.hasCheckBoxes()){j=h.getCheckWidth()}f.setVariant(this._variant);if(g&&this._background!=null){f.setBackgroundColor(this._background)}else{f.resetBackgroundColor()}for(var q=0;q<s;q++){var k="";var l="";var a="";var r=null;if(this._cellFonts&&this._cellFonts[q]){l=this._cellFonts[q]}else{if(this._font!=null){l=this._font}}if(g){if(this._cellForegrounds&&this._cellForegrounds[q]){a=this._cellForegrounds[q]}else{if(this._foreground!=null){a=this._foreground}}if(this._cellBackgrounds&&this._cellBackgrounds[q]){r=this._cellBackgrounds[q]}}if(r!=null){var o=this._getChildNode(b,e);e++;d=h.getItemLeft(q);n=h.getItemWidth(q)-1;if(n<0){n=0}this._renderBackground(o,d,n,m,r)}if(this._images&&this._images[q]){var o=this._getChildNode(b,e);e++;d=h.getItemImageLeft(q);n=h.getItemImageWidth(q);this._renderImage(o,d,n,m,this._images[q])}var o=this._getChildNode(b,e);e++;d=h.getItemTextLeft(q);n=h.getItemTextWidth(q);if(this._texts[q]!==undefined){k=this._texts[q]}var p=qx.constant.Layout.ALIGN_LEFT;var c=h.getColumn(q);if(c){p=c.getHorizontalChildrenAlign()}this._renderText(o,d,n,m,k,p,l,a)}this._deleteRemainingChildNodes(b,e)},_getChildNode:function(b,c){var a;if(b.childNodes.length>c){a=b.childNodes[c]}else{a=document.createElement("div");b.appendChild(a)}return a},_deleteRemainingChildNodes:function(b,c){for(var a=b.childNodes.length-1;a>=c;a--){b.removeChild(b.childNodes[a])}},_drawColors:function(){var a=this._parent.getEnabled();var c=this._parent._isItemSelected(this._getIndex());var b=this._parent._isItemHovered(this._getIndex());return a&&(this._parent.shouldHideSelection()||!c)&&!b},_renderBackground:function(d,e,c,a,b){d.innerHTML="&nbsp;";d.style.position=$[32];d.style.top="0px";d.style.left=e+org.eclipse.swt.widgets.TableItem.PX;d.style.width=c+org.eclipse.swt.widgets.TableItem.PX;d.style.height=a+org.eclipse.swt.widgets.TableItem.PX;d.style.backgroundImage="none";d.style.backgroundColor=b;d.style.fontSize="0";d.style.lineHeight="0";if(qx.core.Variant.isSet($[0],$[17])){d.style.filter=""}else{d.style.opacity="";d.style.KhtmlOpacity="";d.style.MozOpacity=""}},_renderImage:function(e,g,d,a,f){e.innerHTML="";e.style.position=$[32];e.style.overflow=$[14];e.style.top="0px";e.style.left=g+org.eclipse.swt.widgets.TableItem.PX;e.style.width=d+org.eclipse.swt.widgets.TableItem.PX;e.style.height=a+org.eclipse.swt.widgets.TableItem.PX;e.style.lineHeight=a+org.eclipse.swt.widgets.TableItem.PX;e.style.backgroundColor="";var c=qx.io.Alias.getInstance().resolve(f);e.style.backgroundImage="url("+c+")";e.style.backgroundRepeat=$[280];e.style.backgroundPosition=$[38];if(qx.core.Variant.isSet($[0],$[17])){e.style.filter=this._parent.getEnabled()?"":$[514]}else{var b=this._parent.getEnabled()?"":0.3;e.style.opacity=b;e.style.KhtmlOpacity=b;e.style.MozOpacity=b}},_renderText:function(d,f,c,a,g,h,b,e){if(d.innerHTML!=g){d.innerHTML=g}d.style.position=$[32];d.style.overflow=$[14];d.style.top="0px";d.style.textAlign=h;d.style.verticalAlign=$[31];d.style.whiteSpace="nowrap";d.style.left=f+org.eclipse.swt.widgets.TableItem.PX;d.style.width=c+org.eclipse.swt.widgets.TableItem.PX;d.style.height=a+org.eclipse.swt.widgets.TableItem.PX;if(b==""||b==null){if(!qx.core.Variant.isSet($[0],$[17])){d.style.font=b}d.style.fontFamily="";d.style.fontSize="";d.style.fontVariant="";d.style.fontStyle="";d.style.fontWeight=""}else{d.style.font=b}d.style.lineHeight=a+org.eclipse.swt.widgets.TableItem.PX;d.style.color=e;d.style.backgroundColor="";d.style.backgroundImage="none";if(qx.core.Variant.isSet($[0],$[17])){d.style.filter=""}else{d.style.opacity="";d.style.KhtmlOpacity="";d.style.MozOpacity=""}},_getIndex:function(){return this._parent._items.indexOf(this)}}});
qx.Class.define("org.eclipse.swt.widgets.TableCellToolTip",{extend:qx.ui.popup.ToolTip,include:org.eclipse.rwt.FadeAnimationMixin,construct:function(a){arguments.callee.base.call(this);this._controlId=a;this._itemId=null;this._columnIndex=-1},members:{_onshowtimer:function(a){this._stopShowTimer();this._requestCellToolTipText()},setText:function(a){if(a&&a!=""){this.getAtom().setLabel(a);this.setLeft(qx.event.type.MouseEvent.getPageX()+this.getMousePointerOffsetX());this.setTop(qx.event.type.MouseEvent.getPageY()+this.getMousePointerOffsetY());this.show()}},setCell:function(b,a){if(this._itemId!=b||this._columnIndex!=a){this._itemId=b;this._columnIndex=a;this.hide();if(!this._showTimer.getEnabled()&&b!=null&&a!=-1){this._showTimer.start()}}},_requestCellToolTipText:function(){if(this._itemId!=null&&this._columnIndex!=-1){var b=org.eclipse.swt.Request.getInstance();b.addEvent("org.eclipse.swt.events.cellToolTipTextRequested",this._controlId);var a=this._itemId+","+this._columnIndex;b.addParameter("org.eclipse.swt.events.cellToolTipTextRequested.cell",a);b.send()}}}});
qx.Class.define("org.eclipse.swt.widgets.TableColumn",{extend:qx.ui.basic.Atom,construct:function(a){arguments.callee.base.call(this);this._parentIsTree=a instanceof org.eclipse.rwt.widgets.Tree;this.setAppearance(this._parentIsTree?$[560]:$[452]);this.setHorizontalChildrenAlign(qx.constant.Layout.ALIGN_LEFT);this.setOverflow(qx.constant.Style.OVERFLOW_HIDDEN);this._resizable=true;this._moveable=false;this._resizeStartX=0;this._inResize=false;this._wasResizeOrMoveEvent=false;this._inMove=false;this._offsetX=0;this._initialLeft=0;this._bufferedZIndex=0;this.setWidth(0);this.setLeft(0);this.setLabel($[140]);this.getLabelObject().setMode(qx.constant.Style.LABEL_MODE_HTML);this.setLabel("");this._table=a;this._table._addColumn(this);this.addEventListener($[10],this._onMouseOver,this);this.addEventListener($[48],this._onMouseMove,this);this.addEventListener($[15],this._onMouseOut,this);this.addEventListener($[2],this._onMouseDown,this);this.addEventListener($[16],this._onMouseUp,this);this._sortImage=new qx.ui.basic.Image();this._sortImage.setAnonymous(true);if(this._parentIsTree){this._sortImage.setAppearance("tree-column-sort-indicator")}else{this._sortImage.setAppearance("table-column-sort-indicator")}this.add(this._sortImage)},destruct:function(){this.removeEventListener($[10],this._onMouseOver,this);this.removeEventListener($[48],this._onMouseMove,this);this.removeEventListener($[15],this._onMouseOut,this);this.removeEventListener($[2],this._onMouseDown,this);this.removeEventListener($[16],this._onMouseUp,this);this._disposeFields("_sortImage");if(!this._table.getDisposed()&&!qx.core.Object.inGlobalDispose()){this._table._removeColumn(this)}},statics:{RESIZE_CURSOR:(org.eclipse.rwt.Client.isGecko()&&(org.eclipse.rwt.Client.getMajor()>1||org.eclipse.rwt.Client.getMinor()>=8))?"ew-resize":$[165],STATE_MOVING:"moving",STATE_MOUSE_OVER:$[10]},members:{setSortDirection:function(a){if(a=="up"){this._sortImage.addState("up")}else{this._sortImage.removeState("up")}if(a=="down"){this._sortImage.addState("down")}else{this._sortImage.removeState("down")}},setResizable:function(a){this._resizable=a},setMoveable:function(a){this._moveable=a},onClick:function(a){if(!this._wasResizeOrMoveEvent){org.eclipse.swt.EventUtil.widgetSelected(a)}this._wasResizeOrMoveEvent=false},_onMouseOver:function(a){if(!this._inMove&&!this._inResize){this.addState(org.eclipse.swt.widgets.TableColumn.STATE_MOUSE_OVER)}},setAlignment:function(a,b){this._table.setAlignment(a,b);this.setHorizontalChildrenAlign(b)},_onMouseDown:function(b){if(!this._inMove&&!this._inResize){var c=org.eclipse.swt.WidgetUtil;if(this._isResizeLocation(b.getPageX())){this._inResize=true;var a=this.getLeft()+this.getWidth();this._table._showResizeLine(a);this._resizeStartX=b.getPageX();this.setCapture(true);b.stopPropagation();b.preventDefault();c._fakeMouseEvent(this,$[15])}else{if(this._moveable){this._inMove=true;this.setCapture(true);this._bufferedZIndex=this.getZIndex();this.setZIndex(100000000);this._table._unhookColumnMove(this);this._offsetX=b.getPageX()-this.getLeft();this._initialLeft=this.getLeft();b.stopPropagation();b.preventDefault();c._fakeMouseEvent(this,$[15])}}}},_onMouseUp:function(a){var b=org.eclipse.swt.WidgetUtil;if(this._inResize){this._table._hideResizeLine();this.getTopLevelWidget().setGlobalCursor(null);this.setCapture(false);var d=this._getResizeWidth(a.getPageX());this._sendResized(d);this._inResize=false;this._wasResizeOrMoveEvent=true;a.stopPropagation();a.preventDefault();b._fakeMouseEvent(a.getTarget(),$[10])}else{if(this._inMove){this._inMove=false;this.setCapture(false);this.setZIndex(this._bufferedZIndex);this._table._hookColumnMove(this);this.removeState(org.eclipse.swt.widgets.TableColumn.STATE_MOVING);if(this.getLeft()<this._initialLeft-1||this.getLeft()>this._initialLeft+1){this._wasResizeOrMoveEvent=true;var c=Math.round(this.getElement().getBoundingClientRect().left);this._sendMoved(this.getLeft()+a.getPageX()-c)}else{this.setLeft(this._initialLeft)}a.stopPropagation();a.preventDefault();b._fakeMouseEvent(a.getTarget(),$[10])}}},_onMouseMove:function(b){if(this._inResize){var a=this.getLeft()+this._getResizeWidth(b.getPageX());if(a<this.getLeft()+5){a=this.getLeft()+5}this._table._showResizeLine(a)}else{if(this._inMove){this.setLeft(b.getPageX()-this._offsetX);this.addState(org.eclipse.swt.widgets.TableColumn.STATE_MOVING)}else{if(this._isResizeLocation(b.getPageX())){this.getTopLevelWidget().setGlobalCursor(org.eclipse.swt.widgets.TableColumn.RESIZE_CURSOR)}else{this.getTopLevelWidget().setGlobalCursor(null)}}}b.stopPropagation();b.preventDefault()},_onMouseOut:function(a){this.removeState(org.eclipse.swt.widgets.TableColumn.STATE_MOUSE_OVER);if(!this._inResize){this.getTopLevelWidget().setGlobalCursor(null);a.stopPropagation();a.preventDefault()}},_isResizeLocation:function(b){var a=false;if(this._resizable){var c=qx.bom.element.Location.getLeft(this.getElement())+this.getWidth();if(b>=c-5&&b<=c){a=true}}return a},_getResizeWidth:function(a){var b=this._resizeStartX-a;return this.getWidth()-b},_sendResized:function(a){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.controlResized",c);b.addParameter(c+".width",a);b.send()}},_sendMoved:function(b){if(!org.eclipse.swt.EventUtil.getSuspended()){var d=org.eclipse.swt.WidgetManager.getInstance();var c=d.findIdByWidget(this);var a=org.eclipse.swt.Request.getInstance();a.addEvent("org.eclipse.swt.events.controlMoved",c);a.addParameter(c+".left",b);a.send()}}}});

Back to the top