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

x33g5p2x  于2022-01-19 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(127)

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

FileDialog.setFilterIndex介绍

[英]Set the 0-based index of the file extension filter which the dialog will use initially to filter the files it shows to the argument.

This is an index into the FilterExtensions array and the FilterNames array.
[中]设置文件扩展名筛选器的基于0的索引,对话框最初将使用该索引来筛选显示给参数的文件。
这是FilterExtensions数组和FilterNames数组的索引。

代码示例

代码示例来源:origin: anb0s/LogViewer

dialog.setFilterIndex(0);
String path = dialog.open();
if (path != null) {

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

switch (imageTypeCombo.getSelectionIndex()) {
case 0:
  fileChooser.setFilterIndex(4);
  break;
case 1:
  fileChooser.setFilterIndex(5);
  break;
case 2:
  fileChooser.setFilterIndex(2);
  break;
case 3:
  fileChooser.setFilterIndex(3);
  break;
case 4:
  fileChooser.setFilterIndex(6);
  break;
case 5:
  fileChooser.setFilterIndex(0);
  break;

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

if (usePreviousResultButton.getSelection()) {
  dialog.setFileName (fileDialogResult);
  dialog.setFilterIndex(fileDialogIndexResult);

代码示例来源:origin: org.xworker/xworker_swt

fileDialog.setFilterIndex(filterIndex);		
boolean overwrite = self.getBoolean("overwrite");
fileDialog.setOverwrite(overwrite);

代码示例来源:origin: org.xworker/xworker_swt

dialog.setFilterIndex(filterIndex);

相关文章