本文整理汇总了Java中org.pentaho.vfs.ui.VfsFileChooserDialog类的典型用法代码示例。如果您正苦于以下问题:Java VfsFileChooserDialog类的具体用法?Java VfsFileChooserDialog怎么用?Java VfsFileChooserDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VfsFileChooserDialog类属于org.pentaho.vfs.ui包,在下文中一共展示了VfsFileChooserDialog类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: openFileVFSFile
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public void openFileVFSFile() {
FileObject initialFile;
FileObject rootFile;
try {
initialFile = KettleVFS.getFileObject( getLastFileOpened() );
rootFile = initialFile.getFileSystem().getRoot();
} catch ( Exception e ) {
String message = Const.getStackTracker( e );
new ErrorDialog( shell, BaseMessages.getString( PKG, "Spoon.Error" ), message, e );
return;
}
FileObject selectedFile =
getVfsFileChooserDialog( rootFile, initialFile ).open(
shell, null, Const.STRING_TRANS_AND_JOB_FILTER_EXT, Const.getTransformationAndJobFilterNames(),
VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE );
if ( selectedFile != null ) {
setLastFileOpened( selectedFile.getName().getFriendlyURI() );
openFile( selectedFile.getName().getFriendlyURI(), rep != null );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:Spoon.java
示例2: onStart
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public void onStart( LifeEventHandler handler ) throws LifecycleException {
if ( new File( GoogleDriveFileObject.resolveCredentialsPath() + "/" + resourceBundle.getString( "client.secrets" ) )
.exists() ) {
/*
* Registers the UI for the VFS Browser
* */
final Spoon spoon = Spoon.getInstance();
spoon.getDisplay().asyncExec( new Runnable() {
public void run() {
VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog( null, null );
GoogleDriveFileChooserDialog
hadoopVfsFileChooserDialog =
new GoogleDriveFileChooserDialog( GoogleDriveFileProvider.SCHEME, GoogleDriveFileProvider.DISPLAY_NAME,
dialog, SWT.NONE );
dialog.addVFSUIPanel( hadoopVfsFileChooserDialog );
}
} );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:GoogleDriveKettleLifecycleListener.java
示例3: openFileVFSFile
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public void openFileVFSFile() {
FileObject initialFile = null;
FileObject rootFile = null;
try {
initialFile = KettleVFS.getFileObject(getLastFileOpened());
rootFile = initialFile.getFileSystem().getRoot();
} catch (IOException e) {
e.printStackTrace();
String message = e.getMessage();
if (e.getCause() != null) {
message = e.getCause().getMessage();
}
MessageBox messageDialog = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
messageDialog.setText(Messages.getString("Spoon.Error"));
messageDialog.setMessage(message);
messageDialog.open();
// bring up a dialog to prompt for userid/password and try again
// lastVfsUsername = "";
// lastVfsPassword = "";
// if (lastFileOpened != null && lastFileOpened.indexOf("@") == -1)
// {
// lastFileOpened = lastFileOpened.substring(0,
// lastFileOpened.indexOf("//")+2) + lastVfsUsername + ":" +
// lastVfsPassword + "@" +
// lastFileOpened.substring(lastFileOpened.indexOf("//")+2);
// }
// openFileVFSFile();
return;
}
VfsFileChooserDialog vfsFileChooser = new VfsFileChooserDialog(rootFile, initialFile);
FileObject selectedFile = vfsFileChooser.open(shell, null, Const.STRING_TRANS_AND_JOB_FILTER_EXT, Const.getTransformationAndJobFilterNames(), VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE);
if (selectedFile != null) {
setLastFileOpened(selectedFile.getName().getFriendlyURI());
openFile(selectedFile.getName().getFriendlyURI(), false);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:Spoon.java
示例4: openFileVFSFile
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public void openFileVFSFile() {
FileObject initialFile = null;
FileObject rootFile = null;
try {
initialFile = KettleVFS.getFileObject(getLastFileOpened());
rootFile = initialFile.getFileSystem().getRoot();
} catch (Exception e) {
String message = Const.getStackTracker(e);
new ErrorDialog(shell, BaseMessages.getString(PKG, "Spoon.Error"), message, e);
// bring up a dialog to prompt for userid/password and try again
// lastVfsUsername = "";
// lastVfsPassword = "";
// if (lastFileOpened != null && lastFileOpened.indexOf("@") == -1)
// {
// lastFileOpened = lastFileOpened.substring(0,
// lastFileOpened.indexOf("//")+2) + lastVfsUsername + ":" +
// lastVfsPassword + "@" +
// lastFileOpened.substring(lastFileOpened.indexOf("//")+2);
// }
// openFileVFSFile();
return;
}
FileObject selectedFile = getVfsFileChooserDialog(rootFile, initialFile).open(shell, null, Const.STRING_TRANS_AND_JOB_FILTER_EXT, Const
.getTransformationAndJobFilterNames(), VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE);
if (selectedFile != null) {
setLastFileOpened(selectedFile.getName().getFriendlyURI());
openFile(selectedFile.getName().getFriendlyURI(), false);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:Spoon.java
示例5: selectFile
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
protected Optional<String> selectFile( TextVar fileWidget, String[] fileFilters ) {
String curFile = transMeta.environmentSubstitute( fileWidget.getText() );
FileObject root = null;
try {
root = KettleVFS.getFileObject( curFile != null ? curFile : Const.getUserHomeDirectory() );
VfsFileChooserDialog vfsFileChooser = Spoon.getInstance().getVfsFileChooserDialog( root.getParent(), root );
FileObject file =
vfsFileChooser.open(
shell, null, fileFilters, Const.getTransformationFilterNames(),
VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE );
if ( file == null ) {
return Optional.empty();
}
String filePath = getRelativePath( file.getName().toString() );
fileWidget.setText( filePath );
return Optional.ofNullable( filePath );
} catch ( IOException | KettleException e ) {
new ErrorDialog( shell,
BaseMessages.getString( PKG, "TransExecutorDialog.ErrorLoadingTransformation.DialogTitle" ),
BaseMessages.getString( PKG, "TransExecutorDialog.ErrorLoadingTransformation.DialogMessage" ), e );
}
return Optional.empty();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:29,代码来源:BaseStreamingDialog.java
示例6: onStart
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
@Override
public void onStart( LifeEventHandler handler ) throws LifecycleException {
/*
* Registers the UI for the VFS Browser
*/
final Spoon spoon = spoonSupplier.get();
spoon.getDisplay().asyncExec( new Runnable() {
public void run() {
VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog( null, null );
RepositoryVfsProviderDialog hadoopVfsFileChooserDialog =
new RepositoryVfsProviderDialog( RepositoryVfsProvider.SCHEME, "Repository VFS", dialog, SWT.NONE );
dialog.addVFSUIPanel( hadoopVfsFileChooserDialog );
}
} );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:RepositoryVfsKettleLifecycleListener.java
示例7: onStart
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public void onStart( LifeEventHandler handler ) throws LifecycleException {
final Spoon spoon = Spoon.getInstance();
spoon.getDisplay().asyncExec( new Runnable() {
public void run() {
VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog( null, null );
GoogleCloudStorageFileChooserDialog
googleCloudStorageVfsFileChooserDialog =
new GoogleCloudStorageFileChooserDialog( dialog, null, null );
dialog.addVFSUIPanel( googleCloudStorageVfsFileChooserDialog );
}
} );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:GoogleCloudStorageKettleLifecycleListener.java
示例8: GoogleCloudStorageFileChooserDialog
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public GoogleCloudStorageFileChooserDialog( VfsFileChooserDialog vfsFileChooserDialog, FileObject rootFile,
FileObject initialFile ) {
super( GoogleCloudStorageFileProvider.SCHEME, GoogleCloudStorageFileProvider.SCHEME_NAME, vfsFileChooserDialog,
SWT.NONE );
this.vfsFileChooserDialog = vfsFileChooserDialog;
this.rootFile = rootFile;
this.initialFile = initialFile;
setLayout( new GridLayout() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:GoogleCloudStorageFileChooserDialog.java
示例9: GoogleDriveFileChooserDialog
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public GoogleDriveFileChooserDialog( String vfsScheme, String vfsSchemeDisplayText,
VfsFileChooserDialog vfsFileChooserDialog, int flags ) {
super( vfsScheme, vfsSchemeDisplayText, vfsFileChooserDialog, flags );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:GoogleDriveFileChooserDialog.java
示例10: RepositoryVfsProviderDialog
import org.pentaho.vfs.ui.VfsFileChooserDialog; //导入依赖的package包/类
public RepositoryVfsProviderDialog( String vfsScheme, String vfsSchemeDisplayText,
VfsFileChooserDialog vfsFileChooserDialog, int flags ) {
super( vfsScheme, vfsSchemeDisplayText, vfsFileChooserDialog, flags );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:RepositoryVfsProviderDialog.java
注:本文中的org.pentaho.vfs.ui.VfsFileChooserDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论