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

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

本文整理了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

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

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

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

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

  1. /**
  2. * Marks the receiver as visible if the argument is <code>true</code>,
  3. * and marks it invisible otherwise.
  4. * <p>
  5. * If one of the receiver's ancestors is not visible or some
  6. * other condition makes the receiver not visible, marking
  7. * it visible may not actually cause it to be displayed.
  8. * </p>
  9. *
  10. * @param visible the new visibility state
  11. *
  12. * @exception SWTException <ul>
  13. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  14. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  15. * </ul>
  16. */
  17. public void setVisible( boolean visible ) {
  18. checkWidget();
  19. if( ( style & ( SWT.BAR | SWT.DROP_DOWN ) ) == 0 ) {
  20. if( this.visible != visible ) {
  21. this.visible = visible;
  22. if( visible ) {
  23. notifyListeners( SWT.Show, new Event() );
  24. }
  25. }
  26. }
  27. }

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

  1. public void handleNotifyShow( Menu menu ) {
  2. menu.notifyListeners( SWT.Show, new Event() );
  3. for( MenuItem item : menu.getItems() ) {
  4. if( isArmingMenuItem( item ) ) {
  5. item.notifyListeners( SWT.Arm, new Event() );
  6. }
  7. }
  8. }

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

  1. public void run() {
  2. if (!proxy.isDisposed()) {
  3. MenuItem parentItem = proxy.getParentItem();
  4. proxy.dispose();
  5. parentItem.setMenu(holdMenu);
  6. }
  7. if (holdMenu != null && !holdMenu.isDisposed()) {
  8. holdMenu.notifyListeners(SWT.Hide, null);
  9. }
  10. holdMenu = null;
  11. }
  12. });

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

  1. /**
  2. * The proxy menu is being hidden, so we need to make it go away.
  3. *
  4. * @param proxy
  5. * the proxy menu
  6. * @since 3.4
  7. */
  8. private void handleHideProxy(final Menu proxy) {
  9. proxy.removeListener(SWT.Hide, getMenuCreatorListener());
  10. proxy.getDisplay().asyncExec(() -> {
  11. if (!proxy.isDisposed()) {
  12. MenuItem parentItem = proxy.getParentItem();
  13. proxy.dispose();
  14. parentItem.setMenu(holdMenu);
  15. }
  16. if (holdMenu != null && !holdMenu.isDisposed()) {
  17. holdMenu.notifyListeners(SWT.Hide, null);
  18. }
  19. holdMenu = null;
  20. });
  21. }

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

  1. /**
  2. * The proxy menu is being hidden, so we need to make it go away.
  3. *
  4. * @param proxy
  5. * the proxy menu
  6. * @since 3.4
  7. */
  8. private void handleHideProxy(final Menu proxy) {
  9. proxy.removeListener(SWT.Hide, getMenuCreatorListener());
  10. proxy.getDisplay().asyncExec(() -> {
  11. if (!proxy.isDisposed()) {
  12. MenuItem parentItem = proxy.getParentItem();
  13. proxy.dispose();
  14. parentItem.setMenu(holdMenu);
  15. }
  16. if (holdMenu != null && !holdMenu.isDisposed()) {
  17. holdMenu.notifyListeners(SWT.Hide, null);
  18. }
  19. holdMenu = null;
  20. });
  21. }

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

  1. realMenu.notifyListeners(SWT.Show, null);

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

  1. realMenu.notifyListeners(SWT.Show, null);

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

  1. realMenu.notifyListeners(SWT.Show, null);

相关文章