javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Label.java
changeset 80 d6dafc5d983f
parent 57 59b3b4473dc8
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
   176         if ((style & SWT.SEPARATOR) != 0) {
   176         if ((style & SWT.SEPARATOR) != 0) {
   177             handle = OS.QFrame_new();
   177             handle = OS.QFrame_new();
   178         } else {
   178         } else {
   179             handle = OS.QLabel_new();
   179             handle = OS.QLabel_new();
   180             /**
   180             /**
   181              * Ampresands for keyboard shortcuts are not processed at all and
   181              * Ampersands for keyboard shortcuts are not processed at all and
   182              * there won't be a shortcut unless buddy is set. The parent is
   182              * there won't be a shortcut unless buddy is set. The parent is
   183              * used. Shortcut event can then be cancelled and focus moved
   183              * used. Shortcut event can then be canceled and focus moved
   184              * manually. This way buddy doesn't ever need to be updated.
   184              * manually. This way buddy doesn't ever need to be updated.
   185              */
   185              */
   186             OS.QLabel_setBuddy(handle, parent.handle);
   186             OS.QLabel_setBuddy(handle, parent.handle);
   187         }
   187         }
   188 
   188 
   413             if (image.isDisposed())
   413             if (image.isDisposed())
   414                 SWT.error(SWT.ERROR_INVALID_ARGUMENT);
   414                 SWT.error(SWT.ERROR_INVALID_ARGUMENT);
   415         }
   415         }
   416         if (this.image == image)
   416         if (this.image == image)
   417             return;
   417             return;
   418         OS.QLabel_setPixmap(handle, image == null ? 0 : Internal_GfxPackageSupport.getPixmapHandle(image));
   418         OS.QLabel_swt_setPixmap(handle, image == null ? 0 : Internal_GfxPackageSupport.getImageHandle(image));
   419         this.image = image;
   419         this.image = image;
   420     }
   420     }
   421 
   421 
   422     /**
   422     /**
   423      * Sets the receiver's text.
   423      * Sets the receiver's text.