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

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

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

[英]Returns true if the receiver is selected, and false otherwise.

When the receiver is of type CHECK or RADIO, it is selected when it is checked.
[中]如果选择了接收方,则返回true,否则返回false。
当接收器类型为CHECKRADIO时,选中时会选中它。

代码示例

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

@Override
  public void handleEvent(Event event) {
    boolean set = rssOption.getSelection();
    tfrss.setTagRSSFeedEnabled( set );
  }
});

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

@Override
  public void
  handleEvent(
    Event event)
  {
    tp.setBoolean( set_item.getSelection());
  }
});

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

@Override
  public void widgetSelected(SelectionEvent e) {
    COConfigurationManager.setParameter(
        "Library.ShowCatButtons", menuItemShowCatBut.getSelection());
  }
});

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

@Override
  public void
  widgetSelected(
    SelectionEvent e )
  {
    chat.setFavourite( fave_mi.getSelection());
  }
});

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

@Override
  public void
  widgetSelected(
    SelectionEvent e )
  {
    chat.setDisableNewMsgIndications( disableindicators_mi.getSelection());
  }
});

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

@Override
  public void widgetSelected(SelectionEvent e) {
    COConfigurationManager.setParameter( "Monitor Clipboard For Torrents", itemClipMon.getSelection());
  }
});

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

@Override
  public void
  handleEvent(
    Event arg )
  {
    Utils.setQuickViewActive( all_files.get(0), itemQuickView.getSelection());
  }
});

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

@Override
  public void handleEvent(Event e) {
    COConfigurationManager.setParameter("config.style.useSIUnits", mi_iec.getSelection());
  }
});

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

@Override
  public void widgetSelected(SelectionEvent e) {
    COConfigurationManager.setParameter(
        "MyTorrentsView.showuptime", menuItemShowUptime.getSelection());
  }
});

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

@Override
  public void widgetSelected(SelectionEvent e) {
    COConfigurationManager.setParameter(
        "Library.EnableSimpleView", menuEnableSimple.getSelection());
  }
});

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

@Override
  public void run(DownloadManager dm) {
    if (ManagerUtils.isForceStartable(dm)) {
      dm.setForceStart(itemForceStart.getSelection());
    }
  }
});

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

@Override
  public void run(DownloadManager dm) {
    dm.getDownloadState().setNetworkEnabled(nn,
        itemNetwork.getSelection());
  }
});

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

@Override
  public void run(DownloadManager dm) {
    dm.getDownloadState().setFlag(
        DownloadManagerState.FLAG_SEQUENTIAL_DOWNLOAD,
        dl_seq_enable.getSelection());
  }
});

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

@Override
  public void handleEvent(Event e) {
    boolean eta_absolute = item.getSelection();
    tv.columnInvalidate("eta");
    tv.refreshTable(false);
    COConfigurationManager.setParameter("mtv.eta.show_absolute",
        eta_absolute);
  }
});

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

@Override
public void widgetSelected(SelectionEvent e) {
  MenuItem mi = (MenuItem) e.widget;
  if (mi.getSelection()) {
    Viewer oldViewer = getViewer();
    fSelectedViewerDescriptor = vd;
    CompareContentViewerSwitchingPane.this.setInput(oldViewer.getInput());
  }
}

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

public void handleNotifySelection( MenuItem item, JsonObject properties ) {
 Event event = createSelectionEvent( SWT.Selection, properties );
 if( ( item.getStyle() & SWT.RADIO ) != 0 && !item.getSelection() ) {
  event.time = -1;
 }
 item.notifyListeners( SWT.Selection, event );
}

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

@Override
  public void handleEvent(Event e) {
    if (az_menuitem.getStyle() == MenuItem.STYLE_CHECK
        || az_menuitem.getStyle() == MenuItem.STYLE_RADIO) {
      if (!menuItem.isDisposed()) {
        az_menuitem.setData(Boolean.valueOf(menuItem.getSelection()));
      }
    }
    main_listener.handleEvent(e);
  }
});

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

@Override
  public void widgetSelected(SelectionEvent e) {
    if (showFull.getSelection()) {
      cp.setMode(Mode.FULL_PATHS);
      setInput(getInput());
      expandAll();
    }
  }
});

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

private void deselectOtherRadios() {
 for( MenuItem item : parent.getItems() ) {
  if( item != this && ( item.getStyle() & SWT.RADIO ) != 0 && item.getSelection() ) {
   item.setSelection( false );
   item.notifyListeners( SWT.Selection, new Event() );
  }
 }
}

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

public void createDefaultMenuItem(Menu menu, final IFileRevision revision, boolean markAsSelected) {
  final MenuItem menuItem = new MenuItem(menu, SWT.RADIO);
  menuItem.setSelection(markAsSelected);
  menuItem.setText(TeamUIMessages.LocalHistoryPage_OpenWithMenu_DefaultEditorDescription);
  Listener listener = event -> {
    if (event.type == SWT.Selection && menuItem.getSelection()) {
      openEditor(Utils.getDefaultEditor(revision), false);
    }
  };
  menuItem.addListener(SWT.Selection, listener);
}

相关文章