org.eclipse.swt.widgets.MenuItem.addDisposeListener()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(184)

本文整理了Java中org.eclipse.swt.widgets.MenuItem.addDisposeListener()方法的一些代码示例,展示了MenuItem.addDisposeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.addDisposeListener()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.MenuItem
类名称:MenuItem
方法名:addDisposeListener

暂无

代码示例

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
  public void imageDownloaded(Image image, String key, boolean returnedImmediately){
                   
    if ( image != null && returnedImmediately ){
                                    
     m.setImage( image );
           m.addDisposeListener(
       new DisposeListener(){
         
         @Override
         public void widgetDisposed(DisposeEvent e){
           ImageLoader.getInstance().releaseImage( key );
         }
       });
    }
  }
});

代码示例来源:origin: BiglySoftware/BiglyBT

item.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent e) {

代码示例来源:origin: BiglySoftware/BiglyBT

/**
 * <p>
 * Set a MenuItem's image with the given ImageRepository key. In compliance with platform
 * human interface guidelines, the images are not set under Mac OS X.
 * </p>
 * @param item SWT MenuItem
 * @param repoKey ImageRepository image key
 * @see <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMenus/chapter_7_section_3.html#//apple_ref/doc/uid/TP30000356/TPXREF116">Apple HIG</a>
 */
 public static void setMenuItemImage(final MenuItem item, final String repoKey) {
   if (Constants.isOSX || repoKey == null) {
     return;
   }
   ImageLoader imageLoader = ImageLoader.getInstance();
   item.setImage(imageLoader.getImage(repoKey));
   item.addDisposeListener(new DisposeListener() {
     @Override
     public void widgetDisposed(DisposeEvent e) {
       ImageLoader imageLoader = ImageLoader.getInstance();
       imageLoader.releaseImage(repoKey);
     }
   });
 }

代码示例来源:origin: BiglySoftware/BiglyBT

item.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent event) {

代码示例来源:origin: BiglySoftware/BiglyBT

item.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

menuItem.addDisposeListener(disposeListener);
menuItem.addListener(SWT.Selection, selectionListener);

相关文章