Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 120035 Details for
Bug 257022
Migrate to qooxdoo 0.7.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Revised patch for RWT to work with qx-0.7.4
qx-0.7.4-rwt-patch.txt (text/plain), 32.54 KB, created by
Ralf Sternberg
on 2008-12-10 08:18:17 EST
(
hide
)
Description:
Revised patch for RWT to work with qx-0.7.4
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2008-12-10 08:18:17 EST
Size:
32.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/swt/widgets/Table.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Table.js,v >retrieving revision 1.18 >diff -u -r1.18 Table.js >--- js/org/eclipse/swt/widgets/Table.js 1 Dec 2008 13:11:11 -0000 1.18 >+++ js/org/eclipse/swt/widgets/Table.js 10 Dec 2008 10:12:39 -0000 >@@ -159,23 +159,27 @@ > var req = org.eclipse.swt.Request.getInstance(); > if( this._horzScrollBar ) { > this._horzScrollBar.removeEventListener( "changeValue", this._onHorzScrollBarChangeValue, this ); >- this._horzScrollBar.dispose(); >+// this._horzScrollBar.dispose(); >+ this._horzScrollBar.destroy(); > this._horzScrollBar = null; > } > if( this._vertScrollBar ) { > this._vertScrollBar.removeEventListener( "changeValue", this._onVertScrollBarChangeValue, this ); >- this._vertScrollBar.dispose(); >+// this._vertScrollBar.dispose(); >+ this._vertScrollBar.destroy(); > this._vertScrollBar = null; > } > if( this._clientArea ) { > this._clientArea.removeEventListener( "mousewheel", this._onClientAreaMouseWheel, this ); > this._clientArea.removeEventListener( "appear", this._onClientAppear, this ); >- this._clientArea.dispose(); >+// this._clientArea.dispose(); >+ this._clientArea.destroy(); > org.eclipse.swt.WidgetManager.getInstance().remove( this._clientArea ); > this._clientArea = null; > } > if( this._columnArea ) { >- this._columnArea.dispose(); >+// this._columnArea.dispose(); >+ this._columnArea.destroy(); > this._columnArea = null; > } > if( this._resizeLine ) { >@@ -190,7 +194,8 @@ > } > if( this._checkBoxes !== null ) { > for( var i = 0; i < this._checkBoxes.length; i++ ) { >- this._checkBoxes[ i ].dispose(); >+// this._checkBoxes[ i ].dispose(); >+ this._checkBoxes[ i ].destroy(); > } > this._checkBoxes = null; > } >@@ -921,7 +926,8 @@ > var checkBox = this._checkBoxes.shift(); > checkBox.removeEventListener( "changeChecked", this._onCheckBoxClick, this ); > checkBox.setParent( null ); >- checkBox.dispose(); >+// checkBox.dispose(); >+ checkBox.destroy(); > } > var row = this._rows.shift(); > this._unhookRowEventListener( row ); >Index: js/org/eclipse/swt/widgets/Separator.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Separator.js,v >retrieving revision 1.2 >diff -u -r1.2 Separator.js >--- js/org/eclipse/swt/widgets/Separator.js 12 Jun 2008 13:14:28 -0000 1.2 >+++ js/org/eclipse/swt/widgets/Separator.js 10 Dec 2008 10:12:39 -0000 >@@ -44,7 +44,8 @@ > }, > > destruct : function() { >- this._disposeObjects( "_line" ); >+// this._disposeObjects( "_line" ); >+ this._line.destroy(); > }, > > members : { >Index: js/org/eclipse/swt/widgets/Tree.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Tree.js,v >retrieving revision 1.7 >diff -u -r1.7 Tree.js >--- js/org/eclipse/swt/widgets/Tree.js 19 Aug 2008 15:40:24 -0000 1.7 >+++ js/org/eclipse/swt/widgets/Tree.js 10 Dec 2008 10:12:39 -0000 >@@ -83,7 +83,8 @@ > this.removeEventListener( "changeHeight", this._onChangeSize, this ); > > if( this._columnArea ) { >- this._columnArea.dispose(); >+// this._columnArea.dispose(); >+ this._columnArea.destroy(); > this._columnArea = null; > } > if( this._tree ) { >@@ -108,7 +109,8 @@ > this._tree.removeEventListener( "blur", this._onFocusOut, this ); > this._tree.removeEventListener( "appear", this._updateLayout, this ); > this._tree.removeEventListener( "changeElement", this._onTreeElementChange, this._tree ); >- this._tree.dispose(); >+// this._tree.dispose(); >+ this._tree.destroy(); > this._tree = null; > } > }, >Index: js/org/eclipse/swt/widgets/TableColumn.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/TableColumn.js,v >retrieving revision 1.4 >diff -u -r1.4 TableColumn.js >--- js/org/eclipse/swt/widgets/TableColumn.js 15 Oct 2008 09:44:05 -0000 1.4 >+++ js/org/eclipse/swt/widgets/TableColumn.js 10 Dec 2008 10:12:39 -0000 >@@ -68,7 +68,8 @@ > this.removeEventListener( "mouseout", this._onMouseOut, this ); > this.removeEventListener( "mousedown", this._onMouseDown, this ); > this.removeEventListener( "mouseup", this._onMouseUp, this ); >- this._disposeFields( "_sortImage" ); >+// this._disposeFields( "_sortImage" ); >+ this._sortImage.destroy(); > if( !this._table.getDisposed() ) { > this._table._removeColumn( this ); > } >Index: js/org/eclipse/swt/widgets/DateTimeCalendar.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/DateTimeCalendar.js,v >retrieving revision 1.4 >diff -u -r1.4 DateTimeCalendar.js >--- js/org/eclipse/swt/widgets/DateTimeCalendar.js 18 Sep 2008 10:53:27 -0000 1.4 >+++ js/org/eclipse/swt/widgets/DateTimeCalendar.js 10 Dec 2008 10:12:38 -0000 >@@ -1,94 +1,95 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Innoopract Informationssysteme GmbH. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Innoopract Informationssysteme GmbH - initial API and implementation >- ******************************************************************************/ >- >-qx.Class.define( "org.eclipse.swt.widgets.DateTimeCalendar", { >- extend : qx.ui.layout.CanvasLayout, >- >- construct : function( style, monthNames, weekdayNames ) { >- this.base( arguments ); >- this.setAppearance( "datetime-calendar" ); >- >- // Has selection listener >- this._hasSelectionListener = false; >- >- // Get names of weekdays and months >- org.eclipse.swt.widgets.Calendar.MONTH_NAMES = monthNames; >- org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES = weekdayNames; >- >- // The Calendar >- this._calendar = new org.eclipse.swt.widgets.Calendar; >- this._calendar.addEventListener( "changeDate", this._onChangeDate, this ); >- this._calendar.setDate( new Date( 74, 5, 6 ) ); >- this.add( this._calendar ); >- >- this.addEventListener( "contextmenu", this._onContextMenu, this ); >- }, >- >- destruct : function() { >- this._calendar.removeEventListener( "changeDate", this._onChangeDate, this ); >- this.removeEventListener( "contextmenu", this._onContextMenu, this ); >- this._disposeObjects( "_calendar" ); >- }, >- >- members : { >- _onChangeDate : function() { >- var date = this._calendar.getDate(); >- this._sendChanges( date.getDate(), date.getMonth(), date.getFullYear() ); >- }, >- >- _onContextMenu : function( evt ) { >- var menu = this.getContextMenu(); >- if( menu != null ) { >- menu.setLocation( evt.getPageX(), evt.getPageY() ); >- menu.setOpener( this ); >- menu.show(); >- evt.stopPropagation(); >- } >- }, >- >- _sendChanges : function( date, month, year ) { >- if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >- var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >- var req = org.eclipse.swt.Request.getInstance(); >- var id = widgetManager.findIdByWidget( this ); >- req.addParameter( id + ".day", date ); >- req.addParameter( id + ".month", month ); >- req.addParameter( id + ".year", year ); >- if( this._hasSelectionListener ) { >- req.addEvent( "org.eclipse.swt.events.widgetSelected", id ); >- req.send(); >- } >- } >- }, >- >- setMonth : function( value ) { >- var date = this._calendar.getDate(); >- date.setMonth( value ); >- this._calendar.setDate( date ); >- }, >- >- setDay : function( value ) { >- var date = this._calendar.getDate(); >- date.setDate( value ); >- this._calendar.setDate( date ); >- }, >- >- setYear : function( value ) { >- var date = this._calendar.getDate(); >- date.setYear( value ); >- this._calendar.setDate( date ); >- }, >- >- setHasSelectionListener : function( value ) { >- this._hasSelectionListener = value; >- } >- } >-} ); >+/******************************************************************************* >+ * Copyright (c) 2008 Innoopract Informationssysteme GmbH. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Innoopract Informationssysteme GmbH - initial API and implementation >+ ******************************************************************************/ >+ >+qx.Class.define( "org.eclipse.swt.widgets.DateTimeCalendar", { >+ extend : qx.ui.layout.CanvasLayout, >+ >+ construct : function( style, monthNames, weekdayNames ) { >+ this.base( arguments ); >+ this.setAppearance( "datetime-calendar" ); >+ >+ // Has selection listener >+ this._hasSelectionListener = false; >+ >+ // Get names of weekdays and months >+ org.eclipse.swt.widgets.Calendar.MONTH_NAMES = monthNames; >+ org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES = weekdayNames; >+ >+ // The Calendar >+ this._calendar = new org.eclipse.swt.widgets.Calendar; >+ this._calendar.addEventListener( "changeDate", this._onChangeDate, this ); >+ this._calendar.setDate( new Date( 74, 5, 6 ) ); >+ this.add( this._calendar ); >+ >+ this.addEventListener( "contextmenu", this._onContextMenu, this ); >+ }, >+ >+ destruct : function() { >+ this._calendar.removeEventListener( "changeDate", this._onChangeDate, this ); >+ this.removeEventListener( "contextmenu", this._onContextMenu, this ); >+ //this._disposeObjects( "_calendar" ); >+ this._calendar.destroy(); >+ }, >+ >+ members : { >+ _onChangeDate : function() { >+ var date = this._calendar.getDate(); >+ this._sendChanges( date.getDate(), date.getMonth(), date.getFullYear() ); >+ }, >+ >+ _onContextMenu : function( evt ) { >+ var menu = this.getContextMenu(); >+ if( menu != null ) { >+ menu.setLocation( evt.getPageX(), evt.getPageY() ); >+ menu.setOpener( this ); >+ menu.show(); >+ evt.stopPropagation(); >+ } >+ }, >+ >+ _sendChanges : function( date, month, year ) { >+ if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >+ var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >+ var req = org.eclipse.swt.Request.getInstance(); >+ var id = widgetManager.findIdByWidget( this ); >+ req.addParameter( id + ".day", date ); >+ req.addParameter( id + ".month", month ); >+ req.addParameter( id + ".year", year ); >+ if( this._hasSelectionListener ) { >+ req.addEvent( "org.eclipse.swt.events.widgetSelected", id ); >+ req.send(); >+ } >+ } >+ }, >+ >+ setMonth : function( value ) { >+ var date = this._calendar.getDate(); >+ date.setMonth( value ); >+ this._calendar.setDate( date ); >+ }, >+ >+ setDay : function( value ) { >+ var date = this._calendar.getDate(); >+ date.setDate( value ); >+ this._calendar.setDate( date ); >+ }, >+ >+ setYear : function( value ) { >+ var date = this._calendar.getDate(); >+ date.setYear( value ); >+ this._calendar.setDate( date ); >+ }, >+ >+ setHasSelectionListener : function( value ) { >+ this._hasSelectionListener = value; >+ } >+ } >+} ); >Index: js/org/eclipse/swt/widgets/CoolItem.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/CoolItem.js,v >retrieving revision 1.3 >diff -u -r1.3 CoolItem.js >--- js/org/eclipse/swt/widgets/CoolItem.js 12 Jun 2008 13:14:28 -0000 1.3 >+++ js/org/eclipse/swt/widgets/CoolItem.js 10 Dec 2008 10:12:38 -0000 >@@ -37,7 +37,8 @@ > this._handle.removeEventListener( "mousedown", this._onHandleMouseDown, this ); > this._handle.removeEventListener( "mousemove", this._onHandleMouseMove, this ); > this._handle.removeEventListener( "mouseup", this._onHandleMouseUp, this ); >- this._handle.dispose(); >+ //this._handle.dispose(); >+ this._handle.destroy(); > } > }, > >Index: js/org/eclipse/swt/widgets/Scale.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Scale.js,v >retrieving revision 1.3 >diff -u -r1.3 Scale.js >--- js/org/eclipse/swt/widgets/Scale.js 19 Nov 2008 18:29:01 -0000 1.3 >+++ js/org/eclipse/swt/widgets/Scale.js 10 Dec 2008 10:12:39 -0000 >@@ -106,14 +106,19 @@ > this.removeEventListener( "contextmenu", this._onContextMenu, this ); > this.removeEventListener( "keypress", this._onKeyPress, this ); > this.removeEventListener( "mousewheel", this._onMouseWheel, this ); >- this._disposeObjects( "_line", >- "_thumb", >- "_minMarker", >- "_maxMarker" ); >+// this._disposeObjects( "_line", >+// "_thumb", >+// "_minMarker", >+// "_maxMarker" ); >+ this._line.destroy(); >+ this._thumb.destroy(); >+ this._minMarker.destroy(); >+ this._maxMarker.destroy(); > // Clear and dispose markers > for( var i = 0; i < this._middleMarkers.length; i++ ) { > var marker = this._middleMarkers[ i ]; >- marker.dispose(); >+// marker.dispose(); >+ marker.destroy(); > } > }, > >@@ -332,7 +337,8 @@ > for( var i = 0; i < this._middleMarkers.length; i++ ) { > var marker = this._middleMarkers[ i ]; > this.remove( marker ); >- marker.dispose(); >+// marker.dispose(); >+ marker.destroy(); > } > > // Create and add new markets >Index: js/org/eclipse/swt/widgets/Sash.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Sash.js,v >retrieving revision 1.5 >diff -u -r1.5 Sash.js >--- js/org/eclipse/swt/widgets/Sash.js 9 Dec 2008 11:14:07 -0000 1.5 >+++ js/org/eclipse/swt/widgets/Sash.js 10 Dec 2008 10:12:38 -0000 >@@ -20,9 +20,11 @@ > this.addEventListener( "changeHeight", this._onChangeSize, this ); > this._slider = new qx.ui.layout.CanvasLayout(); > this._slider.setAppearance( "sash-slider" ); >- this._slider.setVisibility( false ); >+ this._slider.setVisibility( false ); >+ > // Fix IE Styling issues > org.eclipse.swt.WidgetUtil.fixIEBoxHeight( this._slider ); >+ > this.add( this._slider ); > this._sliderHandle = new qx.ui.layout.CanvasLayout(); > this._sliderHandle.setStyleProperty( "backgroundPosition", "center center" ); >@@ -45,7 +47,10 @@ > this.removeEventListener( "changeWidth", this._onChangeSize, this ); > this.removeEventListener( "changeHeight", this._onChangeSize, this ); > this._removeStyle( this.getOrientation() ); >- this._disposeObjects( "_slider", "_handle", "_sliderHandle" ); >+// this._disposeObjects( "_slider", "_handle", "_sliderHandle" ); >+ this._slider.destroy(); >+ this._handle.destroy(); >+ this._sliderHandle.destroy(); > }, > > properties : { >@@ -65,7 +70,7 @@ > }, > > members : { >- >+ > _onChangeSize : function( evt ) { > this._handle.setWidth( this.getWidth() ); > this._handle.setHeight( this.getHeight() ); >Index: js/org/eclipse/swt/widgets/TreeItem.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/TreeItem.js,v >retrieving revision 1.3 >diff -u -r1.3 TreeItem.js >--- js/org/eclipse/swt/widgets/TreeItem.js 8 Jul 2008 15:59:09 -0000 1.3 >+++ js/org/eclipse/swt/widgets/TreeItem.js 10 Dec 2008 10:12:39 -0000 >@@ -71,7 +71,8 @@ > if( this._checkBox != null ) { > this._checkBox.removeEventListener( "click", this._onChangeChecked, this ); > this._checkBox.removeEventListener( "dblclick", this._onCheckBoxDblClick, this ); >- this._checkBox.dispose(); >+// this._checkBox.dispose(); >+ this._checkBox.destroy(); > } > this.removeEventListener( "click", this._onClick, this ); > this.removeEventListener( "dblclick", this._onDblClick, this ); >Index: js/org/eclipse/swt/widgets/Combo.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Combo.js,v >retrieving revision 1.10 >diff -u -r1.10 Combo.js >--- js/org/eclipse/swt/widgets/Combo.js 9 Sep 2008 14:07:42 -0000 1.10 >+++ js/org/eclipse/swt/widgets/Combo.js 10 Dec 2008 10:12:38 -0000 >@@ -17,7 +17,7 @@ > > construct : function() { > this.base( arguments ); >- this.rap_init(); >+ this.rap_init(); > }, > > members : { >Index: js/org/eclipse/swt/widgets/ExpandItem.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/ExpandItem.js,v >retrieving revision 1.3 >diff -u -r1.3 ExpandItem.js >--- js/org/eclipse/swt/widgets/ExpandItem.js 1 Dec 2008 13:58:09 -0000 1.3 >+++ js/org/eclipse/swt/widgets/ExpandItem.js 10 Dec 2008 10:12:38 -0000 >@@ -1,126 +1,129 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Innoopract Informationssysteme GmbH. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Innoopract Informationssysteme GmbH - initial API and implementation >- ******************************************************************************/ >- >-qx.Class.define( "org.eclipse.swt.widgets.ExpandItem", { >- extend : qx.ui.layout.CanvasLayout, >- >- construct : function( parent ) { >- this.base( arguments ); >- if( parent.classname != "org.eclipse.swt.widgets.ExpandBar" ) { >- this.error( "illegal parent, must be a ExpandBar" ); >- } >- this.setAppearance( "expand-item" ); >- this._expandBar = parent; >- this._headerHeight = 24; // Chevron size with top/bottom insets >- this._expanded = false; >- this._image = null; >- this._text = ""; >- // Construct a header area >- this._header = new qx.ui.basic.Atom( "(empty)", this._image, 16, 16 ); >- this._header.getLabelObject().setPaddingBottom( 4 ); >- this._header.setAppearance( "expand-item-header" ); >- this._header.addEventListener( "click", this._onClick, this ); >- this._header.addEventListener( "mouseover", this._onHandleMouseOver, this ); >- this._header.addEventListener( "mouseout", this._onHandleMouseOut, this ); >- this._header.addEventListener( "contextmenu", this._onContextMenu, this ); >- this._header.setHeight( this._headerHeight ); >- this._header.setLabel( this._text ); >- this.add( this._header ); >- // Chevron image >- this._chevron = new qx.ui.basic.Atom(); >- this._chevron.setAppearance( "expand-item-chevron-button" ); >- this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 ); >- this._chevron.addEventListener( "click", this._onClick, this ); >- this._chevron.addEventListener( "mouseover", this._onHandleMouseOver, this ); >- this._chevron.addEventListener( "mouseout", this._onHandleMouseOut, this ); >- this._chevron.addEventListener( "contextmenu", this._onContextMenu, this ); >- this.add( this._chevron ); >- this._frameBorder = new qx.ui.core.Border( 1, "solid" ); >- this._frameBorder.setColor( this._header.getBackgroundColor() ); >- this.setBorder( this._frameBorder ); >- }, >- >- destruct : function() { >- this._header.removeEventListener( "click", this._onClick, this ); >- this._header.removeEventListener( "mouseover", this._onHandleMouseOver, this ); >- this._header.removeEventListener( "mouseout", this._onHandleMouseOut, this ); >- this._header.removeEventListener( "contextmenu", this._onContextMenu, this ); >- this._chevron.removeEventListener( "click", this._onClick, this ); >- this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this ); >- this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); >- this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this ); >- this._disposeObjects( "_header", "_chevron", "_frameBorder" ); >- }, >- >- statics : { >- STATE_EXPANDED : "expanded", >- STATE_OVER : "over" >- }, >- >- members : { >- setExpanded : function( expanded ) { >- this._expanded = expanded; >- if( expanded ) { >- this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED ); >- } else { >- this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED ); >- } >- }, >- >- setImage : function( image ) { >- this._image = image; >- this._header.setIcon( image ); >- }, >- >- setText : function( text ) { >- this._text = text; >- this._header.setLabel( text ); >- }, >- >- setHeaderHeight : function( headerHeight ) { >- this._headerHeight = headerHeight; >- this._header.setHeight( this._headerHeight ); >- this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 ); >- }, >- >- _onClick : function( evt ) { >- if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >- var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >- var req = org.eclipse.swt.Request.getInstance(); >- var id = widgetManager.findIdByWidget( this ); >- if( this._expanded ) { >- req.addEvent( "org.eclipse.swt.events.expandItemCollapsed", id ); >- } else { >- req.addEvent( "org.eclipse.swt.events.expandItemExpanded", id ); >- } >- req.send(); >- } >- }, >- >- _onContextMenu : function( evt ) { >- var menu = this._expandBar.getContextMenu(); >- if( menu != null ) { >- menu.setLocation( evt.getPageX(), evt.getPageY() ); >- menu.setOpener( this._expandBar ); >- menu.show(); >- evt.stopPropagation(); >- } >- }, >- >- _onHandleMouseOver : function( evt ) { >- this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER ); >- }, >- >- _onHandleMouseOut : function( evt ) { >- this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER ); >- } >- } >-} ); >+/******************************************************************************* >+ * Copyright (c) 2008 Innoopract Informationssysteme GmbH. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Innoopract Informationssysteme GmbH - initial API and implementation >+ ******************************************************************************/ >+ >+qx.Class.define( "org.eclipse.swt.widgets.ExpandItem", { >+ extend : qx.ui.layout.CanvasLayout, >+ >+ construct : function( parent ) { >+ this.base( arguments ); >+ if( parent.classname != "org.eclipse.swt.widgets.ExpandBar" ) { >+ this.error( "illegal parent, must be a ExpandBar" ); >+ } >+ this.setAppearance( "expand-item" ); >+ this._expandBar = parent; >+ this._headerHeight = 24; // Chevron size with top/bottom insets >+ this._expanded = false; >+ this._image = null; >+ this._text = ""; >+ // Construct a header area >+ this._header = new qx.ui.basic.Atom( "(empty)", this._image, 16, 16 ); >+ this._header.getLabelObject().setPaddingBottom( 4 ); >+ this._header.setAppearance( "expand-item-header" ); >+ this._header.addEventListener( "click", this._onClick, this ); >+ this._header.addEventListener( "mouseover", this._onHandleMouseOver, this ); >+ this._header.addEventListener( "mouseout", this._onHandleMouseOut, this ); >+ this._header.addEventListener( "contextmenu", this._onContextMenu, this ); >+ this._header.setHeight( this._headerHeight ); >+ this._header.setLabel( this._text ); >+ this.add( this._header ); >+ // Chevron image >+ this._chevron = new qx.ui.basic.Atom(); >+ this._chevron.setAppearance( "expand-item-chevron-button" ); >+ this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 ); >+ this._chevron.addEventListener( "click", this._onClick, this ); >+ this._chevron.addEventListener( "mouseover", this._onHandleMouseOver, this ); >+ this._chevron.addEventListener( "mouseout", this._onHandleMouseOut, this ); >+ this._chevron.addEventListener( "contextmenu", this._onContextMenu, this ); >+ this.add( this._chevron ); >+ this._frameBorder = new qx.ui.core.Border( 1, "solid" ); >+ this._frameBorder.setColor( this._header.getBackgroundColor() ); >+ this.setBorder( this._frameBorder ); >+ }, >+ >+ destruct : function() { >+ this._header.removeEventListener( "click", this._onClick, this ); >+ this._header.removeEventListener( "mouseover", this._onHandleMouseOver, this ); >+ this._header.removeEventListener( "mouseout", this._onHandleMouseOut, this ); >+ this._header.removeEventListener( "contextmenu", this._onContextMenu, this ); >+ this._chevron.removeEventListener( "click", this._onClick, this ); >+ this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this ); >+ this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); >+ this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this ); >+// this._disposeObjects( "_header", "_chevron", "_frameBorder" ); >+ this._disposeObjects( "_frameBorder" ); >+ this._header.destroy(); >+ this._chevron.destroy(); >+ }, >+ >+ statics : { >+ STATE_EXPANDED : "expanded", >+ STATE_OVER : "over" >+ }, >+ >+ members : { >+ setExpanded : function( expanded ) { >+ this._expanded = expanded; >+ if( expanded ) { >+ this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED ); >+ } else { >+ this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED ); >+ } >+ }, >+ >+ setImage : function( image ) { >+ this._image = image; >+ this._header.setIcon( image ); >+ }, >+ >+ setText : function( text ) { >+ this._text = text; >+ this._header.setLabel( text ); >+ }, >+ >+ setHeaderHeight : function( headerHeight ) { >+ this._headerHeight = headerHeight; >+ this._header.setHeight( this._headerHeight ); >+ this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 ); >+ }, >+ >+ _onClick : function( evt ) { >+ if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >+ var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >+ var req = org.eclipse.swt.Request.getInstance(); >+ var id = widgetManager.findIdByWidget( this ); >+ if( this._expanded ) { >+ req.addEvent( "org.eclipse.swt.events.expandItemCollapsed", id ); >+ } else { >+ req.addEvent( "org.eclipse.swt.events.expandItemExpanded", id ); >+ } >+ req.send(); >+ } >+ }, >+ >+ _onContextMenu : function( evt ) { >+ var menu = this._expandBar.getContextMenu(); >+ if( menu != null ) { >+ menu.setLocation( evt.getPageX(), evt.getPageY() ); >+ menu.setOpener( this._expandBar ); >+ menu.show(); >+ evt.stopPropagation(); >+ } >+ }, >+ >+ _onHandleMouseOver : function( evt ) { >+ this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER ); >+ }, >+ >+ _onHandleMouseOut : function( evt ) { >+ this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER ); >+ } >+ } >+} ); >Index: js/org/eclipse/swt/widgets/Shell.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/Shell.js,v >retrieving revision 1.7 >diff -u -r1.7 Shell.js >--- js/org/eclipse/swt/widgets/Shell.js 7 Nov 2008 14:03:32 -0000 1.7 >+++ js/org/eclipse/swt/widgets/Shell.js 10 Dec 2008 10:12:39 -0000 >@@ -484,7 +484,8 @@ > } else { > if( this._blocker ) { > this.remove( this._blocker ); >- this._blocker.dispose(); >+// this._blocker.dispose(); >+ this._blocker.destroy(); > this._blocker = null; > } > } >Index: js/org/eclipse/swt/widgets/TreeColumn.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/widgets/TreeColumn.js,v >retrieving revision 1.3 >diff -u -r1.3 TreeColumn.js >--- js/org/eclipse/swt/widgets/TreeColumn.js 12 Jun 2008 13:14:28 -0000 1.3 >+++ js/org/eclipse/swt/widgets/TreeColumn.js 10 Dec 2008 10:12:39 -0000 >@@ -68,7 +68,8 @@ > this.removeEventListener( "mouseout", this._onMouseOut, this ); > this.removeEventListener( "mousedown", this._onMouseDown, this ); > this.removeEventListener( "mouseup", this._onMouseUp, this ); >- this._disposeFields( "_sortImage" ); >+// this._disposeFields( "_sortImage" ); >+ this._sortImage.destroy(); > if( !this._tree.getDisposed() ) { > this._tree._removeColumn( this ); > } >Index: js/org/eclipse/swt/custom/CTabFolder.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/custom/CTabFolder.js,v >retrieving revision 1.4 >diff -u -r1.4 CTabFolder.js >--- js/org/eclipse/swt/custom/CTabFolder.js 24 Nov 2008 09:00:07 -0000 1.4 >+++ js/org/eclipse/swt/custom/CTabFolder.js 10 Dec 2008 10:12:38 -0000 >@@ -57,7 +57,9 @@ > this.removeEventListener( "changeWidth", this._updateLayout, this ); > this.removeEventListener( "changeHeight", this._updateLayout, this ); > this.removeEventListener( "keypress", this._onKeyPress, this ); >- this._disposeObjects( "_frame", "_separator" ); >+ //this._disposeObjects( "_frame", "_separator" ); >+ this._frame.destroy(); >+ this._separator.destroy(); > this._frameBorder.dispose(); > }, > >Index: js/org/eclipse/swt/custom/CTabItem.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/custom/CTabItem.js,v >retrieving revision 1.2 >diff -u -r1.2 CTabItem.js >--- js/org/eclipse/swt/custom/CTabItem.js 12 Jun 2008 13:14:29 -0000 1.2 >+++ js/org/eclipse/swt/custom/CTabItem.js 10 Dec 2008 10:12:38 -0000 >@@ -66,7 +66,8 @@ > this._closeButton.removeEventListener( "click", this._onClose, this ); > var wm = org.eclipse.swt.WidgetManager.getInstance(); > wm.setToolTip( this._closeButton, null ); >- this._closeButton.dispose(); >+ //this._closeButton.dispose(); >+ this._closeButton.destroy(); > this._closeButton = null; > } > }, >Index: js/org/eclipse/swt/WidgetManager.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/WidgetManager.js,v >retrieving revision 1.4 >diff -u -r1.4 WidgetManager.js >--- js/org/eclipse/swt/WidgetManager.js 18 Sep 2008 17:21:01 -0000 1.4 >+++ js/org/eclipse/swt/WidgetManager.js 10 Dec 2008 10:12:38 -0000 >@@ -81,7 +81,8 @@ > typePool.elements.push( widget ); > // dispose of widgets that cannot be pooled > } else { >- widget.dispose(); >+ // [if] Replace dispose() with destroy() >+ widget.destroy(); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 257022
:
119124
|
119884
| 120035 |
120036
|
120037