当前位置: 首页>>代码示例>>Java>>正文


Java EnterSelectionDialog类代码示例

本文整理汇总了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();
  }
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:19,代码来源:GitSpoonMenuController.java

示例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 );
  }
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:18,代码来源:GitSpoonMenuController.java

示例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;
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:20,代码来源:SVN.java

示例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 );
    }
  }
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:24,代码来源:DataSetHelper.java

示例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(); 
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:ExcelInputDialog.java

示例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(); 
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:TextFileInputDialog.java

示例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();
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:ClusterSchemaDialog.java

示例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;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:GetXMLDataDialog.java

示例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(); 
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:ExcelInputDialog.java

示例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(); 
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:TextFileInputDialog.java

示例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();
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:ClusterSchemaDialog.java

示例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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:TextFileInputDialog.java

示例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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:ExcelInputDialog.java

示例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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:ClusterSchemaDialog.java

示例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);
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:StarModelerPerspective.java


注:本文中的org.pentaho.di.ui.core.dialog.EnterSelectionDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。