本文整理了Java中org.eclipse.swt.widgets.FileDialog.open()
方法的一些代码示例,展示了FileDialog.open()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileDialog.open()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.FileDialog
类名称:FileDialog
方法名:open
[英]Makes the dialog visible and brings it to the front of the display.
[中]使对话框可见,并将其显示在显示屏的前面。
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*.dbf;*.DBF", "*" } );
if ( wDbf.getText() != null ) {
dialog.setFileName( wDbf.getText() );
}
dialog.setFilterNames( new String[] { "DBF files", "All files" } );
if ( dialog.open() != null ) {
String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName();
wDbf.setText( str );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
if ( wTrustStorePath.getText() != null ) {
String fpath = transMeta.environmentSubstitute( wTrustStorePath.getText() );
dialog.setFileName( fpath );
}
if ( dialog.open() != null ) {
String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName();
wTrustStorePath.setText( str );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*.shp;*.SHP", "*" } );
if ( wShape.getText() != null ) {
dialog.setFileName( wShape.getText() );
}
dialog.setFilterNames( new String[] { "Shape files", "All files" } );
if ( dialog.open() != null ) {
String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName();
wShape.setText( str );
if ( str.toUpperCase().endsWith( ".SHP" ) && ( wDbf.getText() == null || wDbf.getText().length() == 0 ) ) {
String strdbf = str.substring( 0, str.length() - 4 );
wDbf.setText( strdbf + ".dbf" );
}
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wPsqlPath.getText() != null ) {
dialog.setFileName( wPsqlPath.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wPsqlPath.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wDataFile.getText() != null ) {
dialog.setFileName( wDataFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wDataFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wDataFile.getText() != null ) {
dialog.setFileName( wDataFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wDataFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wLogFile.getText() != null ) {
dialog.setFileName( wLogFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wLogFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wBadFile.getText() != null ) {
dialog.setFileName( wBadFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wBadFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wDiscardFile.getText() != null ) {
dialog.setFileName( wDiscardFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wDiscardFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wGploadPath.getText() != null ) {
dialog.setFileName( wGploadPath.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wGploadPath.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wControlFile.getText() != null ) {
dialog.setFileName( wControlFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wControlFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wLogFile.getText() != null ) {
dialog.setFileName( wLogFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wLogFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.SAVE );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wLogFile.getText() != null ) {
dialog.setFileName( wLogFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wLogFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wSqlldr.getText() != null ) {
dialog.setFileName( wSqlldr.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wSqlldr.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wControlFile.getText() != null ) {
dialog.setFileName( wControlFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wControlFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.SAVE );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wControlFile.getText() != null ) {
dialog.setFileName( wControlFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wControlFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*png;*PNG", "*jpeg;*jpg;*JPEG;*JPG", "*gif;*GIF", "*" } );
if ( wImageFilename.getText() != null ) {
dialog.setFileName( transMeta.environmentSubstitute( wImageFilename.getText() ) );
}
dialog.setFilterNames( IMAGES_FILE_TYPES );
if ( dialog.open() != null ) {
wImageFilename.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
Random randomgen = new Random();
wContentID.setText( Long.toString( Math.abs( randomgen.nextLong() ), 32 ) );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wLogFile.getText() != null ) {
dialog.setFileName( wLogFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wLogFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.SAVE );
dialog.setFilterExtensions( new String[] { "*" } );
if ( wDataFile.getText() != null ) {
dialog.setFileName( wDataFile.getText() );
}
dialog.setFilterNames( ALL_FILETYPES );
if ( dialog.open() != null ) {
wDataFile.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
FileDialog dialog = new FileDialog( shell, SWT.OPEN );
dialog.setFilterExtensions( new String[] { "*png;*PNG", "*jpeg;*jpg;*JPEG;*JPG", "*gif;*GIF", "*" } );
if ( wImageFilename.getText() != null ) {
dialog.setFileName( jobMeta.environmentSubstitute( wImageFilename.getText() ) );
}
dialog.setFilterNames( IMAGES_FILE_TYPES );
if ( dialog.open() != null ) {
wImageFilename.setText( dialog.getFilterPath() + Const.FILE_SEPARATOR + dialog.getFileName() );
Random randomgen = new Random();
wContentID.setText( Long.toString( Math.abs( randomgen.nextLong() ), 32 ) );
}
}
} );
内容来源于网络,如有侵权,请联系作者删除!