本文整理汇总了Java中org.pentaho.di.ui.core.dialog.EnterSelectionDialog类的典型用法代码示例。如果您正苦于以下问题:Java EnterSelectionDialog类的具体用法?Java EnterSelectionDialog怎么用?Java EnterSelectionDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EnterSelectionDialog类属于org.pentaho.di.ui.core.dialog包,在下文中一共展示了EnterSelectionDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openRepo
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
public void openRepo() {
MetaStoreFactory<GitRepository> repoFactory = getRepoFactory();
try {
List<String> names = repoFactory.getElementNames();
Collections.sort( names );
EnterSelectionDialog esd = new EnterSelectionDialog( getShell(), names.toArray( new String[names.size()] ), "Select Repository", "Select the repository to open..." );
String name = esd.open();
if ( name == null ) {
return;
}
GitRepository repo = repoFactory.loadElement( name );
gitController.openGit( repo );
} catch ( Exception e ) {
e.printStackTrace();
}
}
示例2: editRepo
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
public void editRepo() throws MetaStoreException {
MetaStoreFactory<GitRepository> repoFactory = getRepoFactory();
List<String> names = repoFactory.getElementNames();
Collections.sort( names );
EnterSelectionDialog esd = new EnterSelectionDialog( getShell(), names.toArray( new String[names.size()] ), "Select Repository", "Select the repository to edit..." );
String name = esd.open();
if ( name == null ) {
return;
}
GitRepository repo = repoFactory.loadElement( name );
EditRepositoryDialog dialog = new EditRepositoryDialog( getShell(), repo );
if ( dialog.open() == Window.OK ) {
repoFactory.saveElement( repo );
}
}
示例3: merge
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
@Override
public boolean merge() {
String name = null;
List<String> names = getBranches();
EnterSelectionDialog esd = new EnterSelectionDialog( shell, names.toArray( new String[names.size()] ),
"Select Branch", "Select the branch to be merged (reintegrated) into the current working copy" );
name = esd.open();
if ( name == null ) {
return false;
}
try {
svnClient.mergeReintegrate( new SVNUrl( getRemoteRoot() + File.separator + name ),
SVNRevision.HEAD, root, false, false );
return true;
} catch ( Exception e ) {
showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), e.getMessage() );
}
return false;
}
示例4: removeDataSetGroup
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
public void removeDataSetGroup() {
Spoon spoon = ( (Spoon) SpoonFactory.getInstance() );
IMetaStore metaStore = spoon.getMetaStore();
MetaStoreFactory<DataSetGroup> groupFactory = new MetaStoreFactory<DataSetGroup>( DataSetGroup.class, metaStore, PentahoDefaults.NAMESPACE );
try {
List<String> groupNames = groupFactory.getElementNames();
Collections.sort( groupNames );
EnterSelectionDialog esd = new EnterSelectionDialog( spoon.getShell(), groupNames.toArray( new String[groupNames.size()] ), "Select the group", "Select the group to edit..." );
String groupName = esd.open();
if ( groupName != null ) {
// TODO: Find the unit tests for this group, if there are any, we can't remove the group
//
groupFactory.deleteElement(groupName);
}
} catch ( Exception e ) {
new ErrorDialog( spoon.getShell(), "Error", "Error retrieving the list of data set groups or deleting a group", e );
}
}
示例5: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles()
{
ExcelInputMeta eii = new ExcelInputMeta();
getInfo(eii);
String[] files = eii.getFilePaths(transMeta);
if (files.length > 0)
{
EnterSelectionDialog esd = new EnterSelectionDialog(shell, files, Messages.getString("ExcelInputDialog.FilesRead.DialogTitle"), Messages.getString("ExcelInputDialog.FilesRead.DialogMessage"));
esd.setViewOnly();
esd.open();
}
else
{
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage(Messages.getString("ExcelInputDialog.NoFilesFound.DialogMessage"));
mb.setText(Messages.getString("System.Dialog.Error.Title"));
mb.open();
}
}
示例6: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles()
{
TextFileInputMeta tfii = new TextFileInputMeta();
getInfo(tfii);
String files[] = tfii.getFilePaths(transMeta);
if (files!=null && files.length>0)
{
EnterSelectionDialog esd = new EnterSelectionDialog(shell, files, "Files read", "Files read:");
esd.setViewOnly();
esd.open();
}
else
{
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage(Messages.getString("TextFileInputDialog.NoFilesFound.DialogMessage"));
mb.setText(Messages.getString("System.Dialog.Error.Title"));
mb.open();
}
}
示例7: selectSlaveServers
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void selectSlaveServers()
{
String[] names = SlaveServer.getSlaveServerNames(slaveServers);
int idx[] = Const.indexsOfFoundStrings(wServers.getItems(0), names);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, names, Messages.getString("ClusterSchemaDialog.SelectServers.Label"), //$NON-NLS-1$
Messages.getString("ClusterSchemaDialog.SelectServersCluster.Label")); //$NON-NLS-1$
dialog.setSelectedNrs(idx);
dialog.setMulti(true);
if (dialog.open()!=null)
{
clusterSchema.getSlaveServers().clear();
int[] indeces = dialog.getSelectionIndeces();
for (int i=0;i<indeces.length;i++)
{
SlaveServer slaveServer = SlaveServer.findSlaveServer(slaveServers, names[indeces[i]]);
clusterSchema.getSlaveServers().add(slaveServer);
}
refreshSlaveServers();
}
}
示例8: populateLoopPaths
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void populateLoopPaths(GetXMLDataMeta meta, String XMLSource,boolean dynamicXMLSource,
boolean useURL)
{
if(Const.isEmpty(XMLSource)) return;
String[] list_xpath=null;
LoopNodesImportProgressDialog pd=null;
if(dynamicXMLSource) {
pd = new LoopNodesImportProgressDialog(shell, meta, XMLSource, useURL);
}else {
pd = new LoopNodesImportProgressDialog(shell, meta, XMLSource, meta.getEncoding()==null?"UTF-8":meta.getEncoding());
}
if(pd!=null) {
list_xpath= pd.open();
if(list_xpath!=null) {
EnterSelectionDialog s = new EnterSelectionDialog(shell, list_xpath, BaseMessages.getString(PKG, "GetXMLDataDialog.Dialog.SelectALoopPath.Title"), BaseMessages.getString(PKG, "GetXMLDataDialog.Dialog.SelectALoopPath.Message"));
String listxpaths = s.open();
if (listxpaths != null) {
wLoopXPath.setText(listxpaths);
}
}
}
this.XMLSource=XMLSource;
}
示例9: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles()
{
ExcelInputMeta eii = new ExcelInputMeta();
getInfo(eii);
String[] files = eii.getFilePaths(transMeta);
if (files.length > 0)
{
EnterSelectionDialog esd = new EnterSelectionDialog(shell, files, BaseMessages.getString(PKG, "ExcelInputDialog.FilesRead.DialogTitle"), BaseMessages.getString(PKG, "ExcelInputDialog.FilesRead.DialogMessage"));
esd.setViewOnly();
esd.open();
}
else
{
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage(BaseMessages.getString(PKG, "ExcelInputDialog.NoFilesFound.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
示例10: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles()
{
TextFileInputMeta tfii = new TextFileInputMeta();
getInfo(tfii);
String files[] = tfii.getFilePaths(transMeta);
if (files!=null && files.length>0)
{
EnterSelectionDialog esd = new EnterSelectionDialog(shell, files, "Files read", "Files read:");
esd.setViewOnly();
esd.open();
}
else
{
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage(BaseMessages.getString(PKG, "TextFileInputDialog.NoFilesFound.DialogMessage"));
mb.setText(BaseMessages.getString(PKG, "System.Dialog.Error.Title"));
mb.open();
}
}
示例11: selectSlaveServers
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void selectSlaveServers()
{
String[] names = SlaveServer.getSlaveServerNames(slaveServers);
int idx[] = Const.indexsOfFoundStrings(wServers.getItems(0), names);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, names, BaseMessages.getString(PKG, "ClusterSchemaDialog.SelectServers.Label"), //$NON-NLS-1$
BaseMessages.getString(PKG, "ClusterSchemaDialog.SelectServersCluster.Label")); //$NON-NLS-1$
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs(idx);
dialog.setMulti(true);
if (dialog.open()!=null)
{
clusterSchema.getSlaveServers().clear();
int[] indeces = dialog.getSelectionIndeces();
for (int i=0;i<indeces.length;i++)
{
SlaveServer slaveServer = SlaveServer.findSlaveServer(slaveServers, names[indeces[i]]);
clusterSchema.getSlaveServers().add(slaveServer);
}
refreshSlaveServers();
}
}
示例12: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles() {
TextFileInputMeta tfii = new TextFileInputMeta();
getInfo( tfii, true );
String[] files =
FileInputList.createFilePathList( transMeta, tfii.inputFiles.fileName, tfii.inputFiles.fileMask,
tfii.inputFiles.excludeFileMask, tfii.inputFiles.fileRequired, tfii.inputFiles.includeSubFolderBoolean() );
if ( files != null && files.length > 0 ) {
EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, "Files read", "Files read:" );
esd.setViewOnly();
esd.open();
} else {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage( BaseMessages.getString( PKG, "TextFileInputDialog.NoFilesFound.DialogMessage" ) );
mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) );
mb.open();
}
}
示例13: showFiles
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void showFiles() {
ExcelInputMeta eii = new ExcelInputMeta();
getInfo( eii );
String[] files = eii.getFilePaths( transMeta );
if ( files.length > 0 ) {
EnterSelectionDialog esd =
new EnterSelectionDialog( shell, files,
BaseMessages.getString( PKG, "ExcelInputDialog.FilesRead.DialogTitle" ),
BaseMessages.getString( PKG, "ExcelInputDialog.FilesRead.DialogMessage" ) );
esd.setViewOnly();
esd.open();
} else {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage( BaseMessages.getString( PKG, "ExcelInputDialog.NoFilesFound.DialogMessage" ) );
mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) );
mb.open();
}
}
示例14: selectSlaveServers
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
private void selectSlaveServers() {
String[] names = SlaveServer.getSlaveServerNames( slaveServers );
int[] idx = Const.indexsOfFoundStrings( wServers.getItems( 0 ), names );
EnterSelectionDialog dialog =
new EnterSelectionDialog( shell, names,
BaseMessages.getString( PKG, "ClusterSchemaDialog.SelectServers.Label" ),
BaseMessages.getString( PKG, "ClusterSchemaDialog.SelectServersCluster.Label" ) );
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs( idx );
dialog.setMulti( true );
if ( dialog.open() != null ) {
clusterSchema.getSlaveServers().clear();
int[] indeces = dialog.getSelectionIndeces();
for ( int i = 0; i < indeces.length; i++ ) {
SlaveServer slaveServer = SlaveServer.findSlaveServer( slaveServers, names[indeces[i]] );
clusterSchema.getSlaveServers().add( slaveServer );
}
refreshSlaveServers();
}
}
示例15: open
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入依赖的package包/类
public void open() {
// List all star domains in the metastore
//
Shell shell = Spoon.getInstance().getShell();
try {
List<IdNameDescription> starDomainList = StarDomainMetaStoreUtil.getStarDomainList(Spoon.getInstance().getMetaStore());
List<String> rows = new ArrayList<String>();
for (IdNameDescription ind : starDomainList) {
rows.add(ind.getName()+" : "+ind.getDescription());
}
EnterSelectionDialog selectionDialog = new EnterSelectionDialog(shell, rows.toArray(new String[rows.size()]), "Select star domain", "Select the star domain to open:");
selectionDialog.setMulti(false);
if (selectionDialog.open()!=null) {
int index = selectionDialog.getSelectionNr();
StarDomain starDomain = StarDomainMetaStoreUtil.loadStarDomain(Spoon.getInstance().getMetaStore(), starDomainList.get(index).getId());
if (starDomain!=null) {
createTabForDomain(starDomain);
}
}
} catch(Exception e) {
new ErrorDialog(shell, "Error", "Error getting list of star domains from the MetaStore:", e);
}
}