Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 257022 | Differences between
and this patch

Collapse All | Expand All

(-)js/org/eclipse/swt/widgets/Table.js (-6 / +12 lines)
Lines 159-181 Link Here
159
    var req = org.eclipse.swt.Request.getInstance();
159
    var req = org.eclipse.swt.Request.getInstance();
160
    if( this._horzScrollBar ) {
160
    if( this._horzScrollBar ) {
161
      this._horzScrollBar.removeEventListener( "changeValue", this._onHorzScrollBarChangeValue, this );
161
      this._horzScrollBar.removeEventListener( "changeValue", this._onHorzScrollBarChangeValue, this );
162
      this._horzScrollBar.dispose();
162
//      this._horzScrollBar.dispose();
163
      this._horzScrollBar.destroy();
163
      this._horzScrollBar = null;
164
      this._horzScrollBar = null;
164
    }
165
    }
165
    if( this._vertScrollBar ) {
166
    if( this._vertScrollBar ) {
166
      this._vertScrollBar.removeEventListener( "changeValue", this._onVertScrollBarChangeValue, this );
167
      this._vertScrollBar.removeEventListener( "changeValue", this._onVertScrollBarChangeValue, this );
167
      this._vertScrollBar.dispose();
168
//      this._vertScrollBar.dispose();
169
      this._vertScrollBar.destroy();
168
      this._vertScrollBar = null;
170
      this._vertScrollBar = null;
169
    }
171
    }
170
    if( this._clientArea ) {
172
    if( this._clientArea ) {
171
      this._clientArea.removeEventListener( "mousewheel", this._onClientAreaMouseWheel, this );
173
      this._clientArea.removeEventListener( "mousewheel", this._onClientAreaMouseWheel, this );
172
      this._clientArea.removeEventListener( "appear", this._onClientAppear, this );
174
      this._clientArea.removeEventListener( "appear", this._onClientAppear, this );
173
      this._clientArea.dispose();
175
//      this._clientArea.dispose();
176
      this._clientArea.destroy();
174
      org.eclipse.swt.WidgetManager.getInstance().remove( this._clientArea );
177
      org.eclipse.swt.WidgetManager.getInstance().remove( this._clientArea );
175
      this._clientArea = null;
178
      this._clientArea = null;
176
    }
179
    }
177
    if( this._columnArea ) {
180
    if( this._columnArea ) {
178
      this._columnArea.dispose();
181
//      this._columnArea.dispose();
182
      this._columnArea.destroy();
179
      this._columnArea = null;
183
      this._columnArea = null;
180
    }
184
    }
181
    if( this._resizeLine ) {
185
    if( this._resizeLine ) {
Lines 190-196 Link Here
190
    }
194
    }
191
    if( this._checkBoxes !== null ) {
195
    if( this._checkBoxes !== null ) {
192
      for( var i = 0; i < this._checkBoxes.length; i++ ) {
196
      for( var i = 0; i < this._checkBoxes.length; i++ ) {
193
        this._checkBoxes[ i ].dispose();
197
//        this._checkBoxes[ i ].dispose();
198
        this._checkBoxes[ i ].destroy();
194
      }
199
      }
195
      this._checkBoxes = null;
200
      this._checkBoxes = null;
196
    }
201
    }
Lines 921-927 Link Here
921
              var checkBox = this._checkBoxes.shift();
926
              var checkBox = this._checkBoxes.shift();
922
              checkBox.removeEventListener( "changeChecked", this._onCheckBoxClick, this );
927
              checkBox.removeEventListener( "changeChecked", this._onCheckBoxClick, this );
923
              checkBox.setParent( null );
928
              checkBox.setParent( null );
924
              checkBox.dispose();
929
//              checkBox.dispose();
930
              checkBox.destroy();
925
            }
931
            }
926
            var row = this._rows.shift();
932
            var row = this._rows.shift();
927
            this._unhookRowEventListener( row );
933
            this._unhookRowEventListener( row );
(-)js/org/eclipse/swt/widgets/Separator.js (-1 / +2 lines)
Lines 44-50 Link Here
44
  },
44
  },
45
  
45
  
46
  destruct : function() {
46
  destruct : function() {
47
    this._disposeObjects( "_line" );
47
//    this._disposeObjects( "_line" );
48
    this._line.destroy();
48
  },
49
  },
49
  
50
  
50
  members : {
51
  members : {
(-)js/org/eclipse/swt/widgets/Tree.js (-2 / +4 lines)
Lines 83-89 Link Here
83
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
83
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
84
84
85
    if( this._columnArea ) {
85
    if( this._columnArea ) {
86
      this._columnArea.dispose();
86
//      this._columnArea.dispose();
87
      this._columnArea.destroy();
87
      this._columnArea = null;
88
      this._columnArea = null;
88
    }
89
    }
89
    if( this._tree ) { 
90
    if( this._tree ) { 
Lines 108-114 Link Here
108
      this._tree.removeEventListener( "blur", this._onFocusOut, this );
109
      this._tree.removeEventListener( "blur", this._onFocusOut, this );
109
      this._tree.removeEventListener( "appear", this._updateLayout, this );
110
      this._tree.removeEventListener( "appear", this._updateLayout, this );
110
      this._tree.removeEventListener( "changeElement", this._onTreeElementChange, this._tree );
111
      this._tree.removeEventListener( "changeElement", this._onTreeElementChange, this._tree );
111
      this._tree.dispose();
112
//      this._tree.dispose();
113
      this._tree.destroy();
112
      this._tree = null;
114
      this._tree = null;
113
    }
115
    }
114
  },
116
  },
(-)js/org/eclipse/swt/widgets/TableColumn.js (-1 / +2 lines)
Lines 68-74 Link Here
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
71
    this._disposeFields( "_sortImage" );
71
//    this._disposeFields( "_sortImage" );
72
    this._sortImage.destroy();
72
    if( !this._table.getDisposed() ) {
73
    if( !this._table.getDisposed() ) {
73
      this._table._removeColumn( this );
74
      this._table._removeColumn( this );
74
    }
75
    }
(-)js/org/eclipse/swt/widgets/DateTimeCalendar.js (-94 / +95 lines)
Lines 1-94 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2008 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
10
 ******************************************************************************/
10
 ******************************************************************************/
11
11
12
qx.Class.define( "org.eclipse.swt.widgets.DateTimeCalendar", {
12
qx.Class.define( "org.eclipse.swt.widgets.DateTimeCalendar", {
13
  extend : qx.ui.layout.CanvasLayout,
13
  extend : qx.ui.layout.CanvasLayout,
14
14
15
  construct : function( style, monthNames, weekdayNames ) {
15
  construct : function( style, monthNames, weekdayNames ) {
16
    this.base( arguments );
16
    this.base( arguments );
17
    this.setAppearance( "datetime-calendar" );      
17
    this.setAppearance( "datetime-calendar" );      
18
    
18
    
19
    // Has selection listener
19
    // Has selection listener
20
    this._hasSelectionListener = false;
20
    this._hasSelectionListener = false;
21
    
21
    
22
    // Get names of weekdays and months
22
    // Get names of weekdays and months
23
    org.eclipse.swt.widgets.Calendar.MONTH_NAMES = monthNames;    
23
    org.eclipse.swt.widgets.Calendar.MONTH_NAMES = monthNames;    
24
    org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES = weekdayNames;
24
    org.eclipse.swt.widgets.Calendar.WEEKDAY_NAMES = weekdayNames;
25
    
25
    
26
    // The Calendar
26
    // The Calendar
27
    this._calendar = new org.eclipse.swt.widgets.Calendar;
27
    this._calendar = new org.eclipse.swt.widgets.Calendar;
28
    this._calendar.addEventListener( "changeDate", this._onChangeDate, this );
28
    this._calendar.addEventListener( "changeDate", this._onChangeDate, this );
29
    this._calendar.setDate( new Date( 74, 5, 6 ) );
29
    this._calendar.setDate( new Date( 74, 5, 6 ) );
30
    this.add( this._calendar );
30
    this.add( this._calendar );
31
    
31
    
32
    this.addEventListener( "contextmenu", this._onContextMenu, this );
32
    this.addEventListener( "contextmenu", this._onContextMenu, this );
33
  },
33
  },
34
34
35
  destruct : function() {
35
  destruct : function() {
36
    this._calendar.removeEventListener( "changeDate", this._onChangeDate, this );
36
    this._calendar.removeEventListener( "changeDate", this._onChangeDate, this );
37
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
37
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
38
    this._disposeObjects( "_calendar" );
38
    //this._disposeObjects( "_calendar" );
39
  },
39
    this._calendar.destroy();
40
40
  },
41
  members : {
41
42
    _onChangeDate : function() {
42
  members : {
43
      var date = this._calendar.getDate();      
43
    _onChangeDate : function() {
44
      this._sendChanges( date.getDate(), date.getMonth(), date.getFullYear() );
44
      var date = this._calendar.getDate();      
45
    },
45
      this._sendChanges( date.getDate(), date.getMonth(), date.getFullYear() );
46
    
46
    },
47
    _onContextMenu : function( evt ) {     
47
    
48
      var menu = this.getContextMenu();      
48
    _onContextMenu : function( evt ) {     
49
      if( menu != null ) {
49
      var menu = this.getContextMenu();      
50
        menu.setLocation( evt.getPageX(), evt.getPageY() );
50
      if( menu != null ) {
51
        menu.setOpener( this );
51
        menu.setLocation( evt.getPageX(), evt.getPageY() );
52
        menu.show();
52
        menu.setOpener( this );
53
        evt.stopPropagation();
53
        menu.show();
54
      }
54
        evt.stopPropagation();
55
    },
55
      }
56
    
56
    },
57
    _sendChanges : function( date, month, year ) {
57
    
58
      if( !org_eclipse_rap_rwt_EventUtil_suspend ) {        
58
    _sendChanges : function( date, month, year ) {
59
        var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
59
      if( !org_eclipse_rap_rwt_EventUtil_suspend ) {        
60
        var req = org.eclipse.swt.Request.getInstance();
60
        var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
61
        var id = widgetManager.findIdByWidget( this );        
61
        var req = org.eclipse.swt.Request.getInstance();
62
        req.addParameter( id + ".day", date );
62
        var id = widgetManager.findIdByWidget( this );        
63
        req.addParameter( id + ".month", month );
63
        req.addParameter( id + ".day", date );
64
        req.addParameter( id + ".year", year );
64
        req.addParameter( id + ".month", month );
65
        if( this._hasSelectionListener ) {
65
        req.addParameter( id + ".year", year );
66
          req.addEvent( "org.eclipse.swt.events.widgetSelected", id );
66
        if( this._hasSelectionListener ) {
67
          req.send();
67
          req.addEvent( "org.eclipse.swt.events.widgetSelected", id );
68
        }
68
          req.send();
69
      }
69
        }
70
    },
70
      }
71
    
71
    },
72
    setMonth : function( value ) { 
72
    
73
      var date = this._calendar.getDate();
73
    setMonth : function( value ) { 
74
      date.setMonth( value );
74
      var date = this._calendar.getDate();
75
      this._calendar.setDate( date );
75
      date.setMonth( value );
76
    },
76
      this._calendar.setDate( date );
77
    
77
    },
78
    setDay : function( value ) {
78
    
79
      var date = this._calendar.getDate();
79
    setDay : function( value ) {
80
      date.setDate( value );
80
      var date = this._calendar.getDate();
81
      this._calendar.setDate( date );
81
      date.setDate( value );
82
    },
82
      this._calendar.setDate( date );
83
    
83
    },
84
    setYear : function( value ) {
84
    
85
      var date = this._calendar.getDate();
85
    setYear : function( value ) {
86
      date.setYear( value );
86
      var date = this._calendar.getDate();
87
      this._calendar.setDate( date );
87
      date.setYear( value );
88
    },
88
      this._calendar.setDate( date );
89
    
89
    },
90
    setHasSelectionListener : function( value ) {
90
    
91
      this._hasSelectionListener = value;
91
    setHasSelectionListener : function( value ) {
92
    }
92
      this._hasSelectionListener = value;
93
  }
93
    }
94
} );
94
  }
95
} );
(-)js/org/eclipse/swt/widgets/CoolItem.js (-1 / +2 lines)
Lines 37-43 Link Here
37
      this._handle.removeEventListener( "mousedown", this._onHandleMouseDown, this );
37
      this._handle.removeEventListener( "mousedown", this._onHandleMouseDown, this );
38
      this._handle.removeEventListener( "mousemove", this._onHandleMouseMove, this );
38
      this._handle.removeEventListener( "mousemove", this._onHandleMouseMove, this );
39
      this._handle.removeEventListener( "mouseup", this._onHandleMouseUp, this );
39
      this._handle.removeEventListener( "mouseup", this._onHandleMouseUp, this );
40
      this._handle.dispose();
40
      //this._handle.dispose();
41
      this._handle.destroy();
41
    }
42
    }
42
  },
43
  },
43
44
(-)js/org/eclipse/swt/widgets/Scale.js (-6 / +12 lines)
Lines 106-119 Link Here
106
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
106
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
107
    this.removeEventListener( "keypress", this._onKeyPress, this );
107
    this.removeEventListener( "keypress", this._onKeyPress, this );
108
    this.removeEventListener( "mousewheel", this._onMouseWheel, this );
108
    this.removeEventListener( "mousewheel", this._onMouseWheel, this );
109
    this._disposeObjects( "_line",
109
//    this._disposeObjects( "_line",
110
                          "_thumb",
110
//                          "_thumb",
111
                          "_minMarker",
111
//                          "_minMarker",
112
                          "_maxMarker" );
112
//                          "_maxMarker" );
113
    this._line.destroy();
114
    this._thumb.destroy();
115
    this._minMarker.destroy();
116
    this._maxMarker.destroy();
113
    // Clear and dispose markers
117
    // Clear and dispose markers
114
    for( var i = 0; i < this._middleMarkers.length; i++ ) {
118
    for( var i = 0; i < this._middleMarkers.length; i++ ) {
115
      var marker = this._middleMarkers[ i ];      
119
      var marker = this._middleMarkers[ i ];      
116
      marker.dispose();
120
//      marker.dispose();
121
      marker.destroy();
117
    }                      
122
    }                      
118
  },  
123
  },  
119
124
Lines 332-338 Link Here
332
      for( var i = 0; i < this._middleMarkers.length; i++ ) {
337
      for( var i = 0; i < this._middleMarkers.length; i++ ) {
333
        var marker = this._middleMarkers[ i ];
338
        var marker = this._middleMarkers[ i ];
334
        this.remove( marker );
339
        this.remove( marker );
335
        marker.dispose();
340
//        marker.dispose();
341
        marker.destroy();
336
      }
342
      }
337
      
343
      
338
      // Create and add new markets
344
      // Create and add new markets
(-)js/org/eclipse/swt/widgets/Sash.js (-3 / +8 lines)
Lines 20-28 Link Here
20
    this.addEventListener( "changeHeight", this._onChangeSize, this );
20
    this.addEventListener( "changeHeight", this._onChangeSize, this );
21
    this._slider = new qx.ui.layout.CanvasLayout();
21
    this._slider = new qx.ui.layout.CanvasLayout();
22
    this._slider.setAppearance( "sash-slider" );
22
    this._slider.setAppearance( "sash-slider" );
23
    this._slider.setVisibility( false );    
23
    this._slider.setVisibility( false );
24
    
24
    // Fix IE Styling issues
25
    // Fix IE Styling issues
25
    org.eclipse.swt.WidgetUtil.fixIEBoxHeight( this._slider );
26
    org.eclipse.swt.WidgetUtil.fixIEBoxHeight( this._slider );
27
         
26
    this.add( this._slider );
28
    this.add( this._slider );
27
    this._sliderHandle = new qx.ui.layout.CanvasLayout();
29
    this._sliderHandle = new qx.ui.layout.CanvasLayout();
28
    this._sliderHandle.setStyleProperty( "backgroundPosition", "center center" );
30
    this._sliderHandle.setStyleProperty( "backgroundPosition", "center center" );
Lines 45-51 Link Here
45
    this.removeEventListener( "changeWidth", this._onChangeSize, this );
47
    this.removeEventListener( "changeWidth", this._onChangeSize, this );
46
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
48
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
47
    this._removeStyle( this.getOrientation() );
49
    this._removeStyle( this.getOrientation() );
48
    this._disposeObjects( "_slider", "_handle", "_sliderHandle" );
50
//    this._disposeObjects( "_slider", "_handle", "_sliderHandle" );
51
    this._slider.destroy();
52
    this._handle.destroy();
53
    this._sliderHandle.destroy();
49
  },
54
  },
50
55
51
  properties : {
56
  properties : {
Lines 65-71 Link Here
65
  },
70
  },
66
71
67
  members : {
72
  members : {
68
    
73
69
    _onChangeSize : function( evt ) {
74
    _onChangeSize : function( evt ) {
70
      this._handle.setWidth( this.getWidth() );
75
      this._handle.setWidth( this.getWidth() );
71
      this._handle.setHeight( this.getHeight() );
76
      this._handle.setHeight( this.getHeight() );
(-)js/org/eclipse/swt/widgets/TreeItem.js (-1 / +2 lines)
Lines 71-77 Link Here
71
    if( this._checkBox != null ) {
71
    if( this._checkBox != null ) {
72
      this._checkBox.removeEventListener( "click", this._onChangeChecked, this );
72
      this._checkBox.removeEventListener( "click", this._onChangeChecked, this );
73
      this._checkBox.removeEventListener( "dblclick", this._onCheckBoxDblClick, this );
73
      this._checkBox.removeEventListener( "dblclick", this._onCheckBoxDblClick, this );
74
      this._checkBox.dispose();
74
//      this._checkBox.dispose();
75
      this._checkBox.destroy();
75
    }
76
    }
76
    this.removeEventListener( "click", this._onClick, this );
77
    this.removeEventListener( "click", this._onClick, this );
77
    this.removeEventListener( "dblclick", this._onDblClick, this );
78
    this.removeEventListener( "dblclick", this._onDblClick, this );
(-)js/org/eclipse/swt/widgets/Combo.js (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
  construct : function() {
18
  construct : function() {
19
    this.base( arguments );
19
    this.base( arguments );
20
    this.rap_init();    
20
    this.rap_init();
21
  },
21
  },
22
22
23
  members : {
23
  members : {
(-)js/org/eclipse/swt/widgets/ExpandItem.js (-126 / +129 lines)
Lines 1-126 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2008 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 * 
8
 * Contributors:
8
 * Contributors:
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
10
 ******************************************************************************/
10
 ******************************************************************************/
11
11
12
qx.Class.define( "org.eclipse.swt.widgets.ExpandItem", {
12
qx.Class.define( "org.eclipse.swt.widgets.ExpandItem", {
13
  extend : qx.ui.layout.CanvasLayout,
13
  extend : qx.ui.layout.CanvasLayout,
14
14
15
  construct : function( parent ) {
15
  construct : function( parent ) {
16
    this.base( arguments ); 
16
    this.base( arguments ); 
17
    if( parent.classname != "org.eclipse.swt.widgets.ExpandBar" ) {
17
    if( parent.classname != "org.eclipse.swt.widgets.ExpandBar" ) {
18
      this.error( "illegal parent, must be a ExpandBar" );
18
      this.error( "illegal parent, must be a ExpandBar" );
19
    } 
19
    } 
20
    this.setAppearance( "expand-item" );    
20
    this.setAppearance( "expand-item" );    
21
    this._expandBar = parent; 
21
    this._expandBar = parent; 
22
    this._headerHeight = 24; // Chevron size with top/bottom insets
22
    this._headerHeight = 24; // Chevron size with top/bottom insets
23
    this._expanded = false;
23
    this._expanded = false;
24
    this._image = null;
24
    this._image = null;
25
    this._text = "";    
25
    this._text = "";    
26
    // Construct a header area
26
    // Construct a header area
27
    this._header = new qx.ui.basic.Atom( "(empty)", this._image, 16, 16 );
27
    this._header = new qx.ui.basic.Atom( "(empty)", this._image, 16, 16 );
28
    this._header.getLabelObject().setPaddingBottom( 4 );    
28
    this._header.getLabelObject().setPaddingBottom( 4 );    
29
    this._header.setAppearance( "expand-item-header" );    
29
    this._header.setAppearance( "expand-item-header" );    
30
    this._header.addEventListener( "click", this._onClick, this );  
30
    this._header.addEventListener( "click", this._onClick, this );  
31
    this._header.addEventListener( "mouseover", this._onHandleMouseOver, this );
31
    this._header.addEventListener( "mouseover", this._onHandleMouseOver, this );
32
    this._header.addEventListener( "mouseout", this._onHandleMouseOut, this );  
32
    this._header.addEventListener( "mouseout", this._onHandleMouseOut, this );  
33
    this._header.addEventListener( "contextmenu", this._onContextMenu, this );
33
    this._header.addEventListener( "contextmenu", this._onContextMenu, this );
34
    this._header.setHeight( this._headerHeight ); 
34
    this._header.setHeight( this._headerHeight ); 
35
    this._header.setLabel( this._text );      
35
    this._header.setLabel( this._text );      
36
    this.add( this._header );    
36
    this.add( this._header );    
37
    // Chevron image
37
    // Chevron image
38
    this._chevron = new qx.ui.basic.Atom();
38
    this._chevron = new qx.ui.basic.Atom();
39
    this._chevron.setAppearance( "expand-item-chevron-button" );    
39
    this._chevron.setAppearance( "expand-item-chevron-button" );    
40
    this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 );
40
    this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 );
41
    this._chevron.addEventListener( "click", this._onClick, this ); 
41
    this._chevron.addEventListener( "click", this._onClick, this ); 
42
    this._chevron.addEventListener( "mouseover", this._onHandleMouseOver, this );
42
    this._chevron.addEventListener( "mouseover", this._onHandleMouseOver, this );
43
    this._chevron.addEventListener( "mouseout", this._onHandleMouseOut, this );  
43
    this._chevron.addEventListener( "mouseout", this._onHandleMouseOut, this );  
44
    this._chevron.addEventListener( "contextmenu", this._onContextMenu, this );   
44
    this._chevron.addEventListener( "contextmenu", this._onContextMenu, this );   
45
    this.add( this._chevron );    
45
    this.add( this._chevron );    
46
    this._frameBorder = new qx.ui.core.Border( 1, "solid" );
46
    this._frameBorder = new qx.ui.core.Border( 1, "solid" );
47
    this._frameBorder.setColor( this._header.getBackgroundColor() );
47
    this._frameBorder.setColor( this._header.getBackgroundColor() );
48
    this.setBorder( this._frameBorder );
48
    this.setBorder( this._frameBorder );
49
  },
49
  },
50
50
51
  destruct : function() {    
51
  destruct : function() {    
52
    this._header.removeEventListener( "click", this._onClick, this );
52
    this._header.removeEventListener( "click", this._onClick, this );
53
    this._header.removeEventListener( "mouseover", this._onHandleMouseOver, this );
53
    this._header.removeEventListener( "mouseover", this._onHandleMouseOver, this );
54
    this._header.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
54
    this._header.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
55
    this._header.removeEventListener( "contextmenu", this._onContextMenu, this ); 
55
    this._header.removeEventListener( "contextmenu", this._onContextMenu, this ); 
56
    this._chevron.removeEventListener( "click", this._onClick, this );
56
    this._chevron.removeEventListener( "click", this._onClick, this );
57
    this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this );
57
    this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this );
58
    this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
58
    this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
59
    this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this );   
59
    this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this );   
60
    this._disposeObjects( "_header", "_chevron", "_frameBorder" );     
60
//    this._disposeObjects( "_header", "_chevron", "_frameBorder" );
61
  },
61
    this._disposeObjects( "_frameBorder" );
62
62
    this._header.destroy();
63
  statics : {
63
    this._chevron.destroy();
64
    STATE_EXPANDED : "expanded",
64
  },
65
    STATE_OVER : "over"
65
66
  },
66
  statics : {
67
67
    STATE_EXPANDED : "expanded",
68
  members : {      
68
    STATE_OVER : "over"
69
    setExpanded : function( expanded ) {
69
  },
70
      this._expanded = expanded;
70
71
      if( expanded ) { 
71
  members : {      
72
        this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED );       
72
    setExpanded : function( expanded ) {
73
      } else { 
73
      this._expanded = expanded;
74
        this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED );       
74
      if( expanded ) { 
75
      }
75
        this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED );       
76
    }, 
76
      } else { 
77
    
77
        this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_EXPANDED );       
78
    setImage : function( image ) {
78
      }
79
      this._image = image;
79
    }, 
80
      this._header.setIcon( image );      
80
    
81
    },
81
    setImage : function( image ) {
82
    
82
      this._image = image;
83
    setText : function( text ) {
83
      this._header.setIcon( image );      
84
      this._text = text;
84
    },
85
      this._header.setLabel( text );      
85
    
86
    },
86
    setText : function( text ) {
87
    
87
      this._text = text;
88
    setHeaderHeight : function( headerHeight ) {
88
      this._header.setLabel( text );      
89
      this._headerHeight = headerHeight;
89
    },
90
      this._header.setHeight( this._headerHeight );   
90
    
91
      this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 );
91
    setHeaderHeight : function( headerHeight ) {
92
    },
92
      this._headerHeight = headerHeight;
93
    
93
      this._header.setHeight( this._headerHeight );   
94
    _onClick : function( evt ) {
94
      this._chevron.setTop( ( this._headerHeight - this._chevron.getHeight() ) / 2 );
95
      if( !org_eclipse_rap_rwt_EventUtil_suspend ) {        
95
    },
96
        var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
96
    
97
        var req = org.eclipse.swt.Request.getInstance();
97
    _onClick : function( evt ) {
98
        var id = widgetManager.findIdByWidget( this );        
98
      if( !org_eclipse_rap_rwt_EventUtil_suspend ) {        
99
        if( this._expanded ) {
99
        var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
100
          req.addEvent( "org.eclipse.swt.events.expandItemCollapsed", id );
100
        var req = org.eclipse.swt.Request.getInstance();
101
        } else {
101
        var id = widgetManager.findIdByWidget( this );        
102
          req.addEvent( "org.eclipse.swt.events.expandItemExpanded", id );
102
        if( this._expanded ) {
103
        }
103
          req.addEvent( "org.eclipse.swt.events.expandItemCollapsed", id );
104
        req.send();
104
        } else {
105
      }
105
          req.addEvent( "org.eclipse.swt.events.expandItemExpanded", id );
106
    },
106
        }
107
    
107
        req.send();
108
    _onContextMenu : function( evt ) {      
108
      }
109
      var menu = this._expandBar.getContextMenu();      
109
    },
110
      if( menu != null ) {
110
    
111
        menu.setLocation( evt.getPageX(), evt.getPageY() );
111
    _onContextMenu : function( evt ) {      
112
        menu.setOpener( this._expandBar );
112
      var menu = this._expandBar.getContextMenu();      
113
        menu.show();
113
      if( menu != null ) {
114
        evt.stopPropagation();
114
        menu.setLocation( evt.getPageX(), evt.getPageY() );
115
      }
115
        menu.setOpener( this._expandBar );
116
    },
116
        menu.show();
117
    
117
        evt.stopPropagation();
118
    _onHandleMouseOver : function( evt ) {
118
      }
119
      this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER );
119
    },
120
    },
120
    
121
    
121
    _onHandleMouseOver : function( evt ) {
122
    _onHandleMouseOut : function( evt ) {
122
      this._chevron.addState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER );
123
      this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER );
123
    },
124
    }
124
    
125
  }
125
    _onHandleMouseOut : function( evt ) {
126
} );
126
      this._chevron.removeState( org.eclipse.swt.widgets.ExpandItem.STATE_OVER );
127
    }
128
  }
129
} );
(-)js/org/eclipse/swt/widgets/Shell.js (-1 / +2 lines)
Lines 484-490 Link Here
484
      } else {
484
      } else {
485
        if( this._blocker ) {
485
        if( this._blocker ) {
486
          this.remove( this._blocker );
486
          this.remove( this._blocker );
487
          this._blocker.dispose();
487
//          this._blocker.dispose();
488
          this._blocker.destroy();
488
          this._blocker = null;
489
          this._blocker = null;
489
        }
490
        }
490
      }
491
      }
(-)js/org/eclipse/swt/widgets/TreeColumn.js (-1 / +2 lines)
Lines 68-74 Link Here
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
71
    this._disposeFields( "_sortImage" );
71
//    this._disposeFields( "_sortImage" );
72
    this._sortImage.destroy();
72
    if( !this._tree.getDisposed() ) {
73
    if( !this._tree.getDisposed() ) {
73
      this._tree._removeColumn( this );
74
      this._tree._removeColumn( this );
74
    }
75
    }
(-)js/org/eclipse/swt/custom/CTabFolder.js (-1 / +3 lines)
Lines 57-63 Link Here
57
    this.removeEventListener( "changeWidth", this._updateLayout, this );
57
    this.removeEventListener( "changeWidth", this._updateLayout, this );
58
    this.removeEventListener( "changeHeight", this._updateLayout, this );
58
    this.removeEventListener( "changeHeight", this._updateLayout, this );
59
    this.removeEventListener( "keypress", this._onKeyPress, this );
59
    this.removeEventListener( "keypress", this._onKeyPress, this );
60
    this._disposeObjects( "_frame", "_separator" );
60
    //this._disposeObjects( "_frame", "_separator" );
61
    this._frame.destroy();
62
    this._separator.destroy();
61
    this._frameBorder.dispose();
63
    this._frameBorder.dispose();
62
  },
64
  },
63
65
(-)js/org/eclipse/swt/custom/CTabItem.js (-1 / +2 lines)
Lines 66-72 Link Here
66
      this._closeButton.removeEventListener( "click", this._onClose, this );
66
      this._closeButton.removeEventListener( "click", this._onClose, this );
67
      var wm = org.eclipse.swt.WidgetManager.getInstance();
67
      var wm = org.eclipse.swt.WidgetManager.getInstance();
68
      wm.setToolTip( this._closeButton, null );
68
      wm.setToolTip( this._closeButton, null );
69
      this._closeButton.dispose();
69
      //this._closeButton.dispose();
70
      this._closeButton.destroy();
70
      this._closeButton = null;
71
      this._closeButton = null;
71
    }
72
    }
72
  },
73
  },
(-)js/org/eclipse/swt/WidgetManager.js (-1 / +2 lines)
Lines 81-87 Link Here
81
            typePool.elements.push( widget );
81
            typePool.elements.push( widget );
82
          // dispose of widgets that cannot be pooled
82
          // dispose of widgets that cannot be pooled
83
          } else {
83
          } else {
84
            widget.dispose();
84
            // [if] Replace dispose() with destroy()
85
          	widget.destroy();
85
          }
86
          }
86
        }
87
        }
87
      }
88
      }

Return to bug 257022