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

x33g5p2x  于2022-01-24 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(137)

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

暂无

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyHide( Menu menu ) {
 menu.notifyListeners( SWT.Hide, new Event() );
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyHelp( Menu menu ) {
 menu.notifyListeners( SWT.Help, new Event() );
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

/**
 * Marks the receiver as visible if the argument is <code>true</code>,
 * and marks it invisible otherwise.
 * <p>
 * If one of the receiver's ancestors is not visible or some
 * other condition makes the receiver not visible, marking
 * it visible may not actually cause it to be displayed.
 * </p>
 *
 * @param visible the new visibility state
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setVisible( boolean visible ) {
 checkWidget();
 if( ( style & ( SWT.BAR | SWT.DROP_DOWN ) ) == 0 ) {
  if( this.visible != visible ) {
   this.visible = visible;
   if( visible ) {
    notifyListeners( SWT.Show, new Event() );
   }
  }
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyShow( Menu menu ) {
 menu.notifyListeners( SWT.Show, new Event() );
 for( MenuItem item : menu.getItems() ) {
  if( isArmingMenuItem( item ) ) {
   item.notifyListeners( SWT.Arm, new Event() );
  }
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

public void run() {
    if (!proxy.isDisposed()) {
      MenuItem parentItem = proxy.getParentItem();
      proxy.dispose();
      parentItem.setMenu(holdMenu);
    }
    if (holdMenu != null && !holdMenu.isDisposed()) {
      holdMenu.notifyListeners(SWT.Hide, null);
    }
    holdMenu = null;
  }
});

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

/**
 * The proxy menu is being hidden, so we need to make it go away.
 *
 * @param proxy
 *            the proxy menu
 * @since 3.4
 */
private void handleHideProxy(final Menu proxy) {
  proxy.removeListener(SWT.Hide, getMenuCreatorListener());
  proxy.getDisplay().asyncExec(() -> {
    if (!proxy.isDisposed()) {
      MenuItem parentItem = proxy.getParentItem();
      proxy.dispose();
      parentItem.setMenu(holdMenu);
    }
    if (holdMenu != null && !holdMenu.isDisposed()) {
      holdMenu.notifyListeners(SWT.Hide, null);
    }
    holdMenu = null;
  });
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * The proxy menu is being hidden, so we need to make it go away.
 *
 * @param proxy
 *            the proxy menu
 * @since 3.4
 */
private void handleHideProxy(final Menu proxy) {
  proxy.removeListener(SWT.Hide, getMenuCreatorListener());
  proxy.getDisplay().asyncExec(() -> {
    if (!proxy.isDisposed()) {
      MenuItem parentItem = proxy.getParentItem();
      proxy.dispose();
      parentItem.setMenu(holdMenu);
    }
    if (holdMenu != null && !holdMenu.isDisposed()) {
      holdMenu.notifyListeners(SWT.Hide, null);
    }
    holdMenu = null;
  });
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

realMenu.notifyListeners(SWT.Show, null);

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

realMenu.notifyListeners(SWT.Show, null);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

realMenu.notifyListeners(SWT.Show, null);

相关文章