@@ -141,11 +141,6 @@ private void drawInCellEditor(long window) {
141
141
* </ul>
142
142
*/
143
143
public Rectangle getBounds () {
144
- checkWidget ();
145
- return getBoundsInPixels ();
146
- }
147
-
148
- Rectangle getBoundsInPixels () {
149
144
checkWidget ();
150
145
if (image != null ) {
151
146
Rectangle rect = image .getBoundsInPixels ();
@@ -201,11 +196,6 @@ public Image getImage () {
201
196
* </ul>
202
197
*/
203
198
public Point getLocation () {
204
- checkWidget ();
205
- return getLocationInPixels ();
206
- }
207
-
208
- Point getLocationInPixels () {
209
199
checkWidget ();
210
200
return new Point (x , y );
211
201
}
@@ -236,11 +226,6 @@ public Canvas getParent () {
236
226
* </ul>
237
227
*/
238
228
public Point getSize () {
239
- checkWidget ();
240
- return getSizeInPixels ();
241
- }
242
-
243
- Point getSizeInPixels () {
244
229
checkWidget ();
245
230
if (image != null ) {
246
231
Rectangle rect = image .getBoundsInPixels ();
@@ -348,11 +333,6 @@ void releaseWidget () {
348
333
* </ul>
349
334
*/
350
335
public void setBounds (int x , int y , int width , int height ) {
351
- checkWidget ();
352
- setBounds (new Rectangle (x , y , width , height ));
353
- }
354
-
355
- void setBoundsInPixels (int x , int y , int width , int height ) {
356
336
checkWidget ();
357
337
if (this .x == x && this .y == y && this .width == width && this .height == height ) return ;
358
338
boolean isFocus = isFocusCaret ();
@@ -377,14 +357,9 @@ void setBoundsInPixels (int x, int y, int width, int height) {
377
357
* </ul>
378
358
*/
379
359
public void setBounds (Rectangle rect ) {
380
- checkWidget ();
381
- setBoundsInPixels (rect );
382
- }
383
-
384
- void setBoundsInPixels (Rectangle rect ) {
385
360
checkWidget ();
386
361
if (rect == null ) error (SWT .ERROR_NULL_ARGUMENT );
387
- setBoundsInPixels (rect .x , rect .y , rect .width , rect .height );
362
+ setBounds (rect .x , rect .y , rect .width , rect .height );
388
363
}
389
364
390
365
void setFocus () {
@@ -457,12 +432,7 @@ public void setImage (Image image) {
457
432
*/
458
433
public void setLocation (int x , int y ) {
459
434
checkWidget ();
460
- setLocation (new Point (x , y ));
461
- }
462
-
463
- void setLocationInPixels (int x , int y ) {
464
- checkWidget ();
465
- setBoundsInPixels (x , y , width , height );
435
+ setBounds (x , y , width , height );
466
436
}
467
437
468
438
/**
@@ -478,14 +448,9 @@ void setLocationInPixels (int x, int y) {
478
448
* </ul>
479
449
*/
480
450
public void setLocation (Point location ) {
481
- checkWidget ();
482
- setLocationInPixels (location );
483
- }
484
-
485
- void setLocationInPixels (Point location ) {
486
451
checkWidget ();
487
452
if (location == null ) error (SWT .ERROR_NULL_ARGUMENT );
488
- setLocationInPixels (location .x , location .y );
453
+ setLocation (location .x , location .y );
489
454
}
490
455
491
456
/**
@@ -501,12 +466,7 @@ void setLocationInPixels (Point location) {
501
466
*/
502
467
public void setSize (int width , int height ) {
503
468
checkWidget ();
504
- setSize (new Point (width ,height ));
505
- }
506
-
507
- void setSizeInPixels (int width , int height ) {
508
- checkWidget ();
509
- setBoundsInPixels (x , y , width , height );
469
+ setBounds (x , y , width , height );
510
470
}
511
471
512
472
/**
@@ -523,14 +483,9 @@ void setSizeInPixels (int width, int height) {
523
483
* </ul>
524
484
*/
525
485
public void setSize (Point size ) {
526
- checkWidget ();
527
- setSizeInPixels (size );
528
- }
529
-
530
- void setSizeInPixels (Point size ) {
531
486
checkWidget ();
532
487
if (size == null ) error (SWT .ERROR_NULL_ARGUMENT );
533
- setSizeInPixels (size .x , size .y );
488
+ setSize (size .x , size .y );
534
489
}
535
490
536
491
/**
0 commit comments