本文整理汇总了Java中org.pentaho.di.ui.core.dialog.EnterSelectionDialog.setMulti方法的典型用法代码示例。如果您正苦于以下问题:Java EnterSelectionDialog.setMulti方法的具体用法?Java EnterSelectionDialog.setMulti怎么用?Java EnterSelectionDialog.setMulti使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.core.dialog.EnterSelectionDialog
的用法示例。
在下文中一共展示了EnterSelectionDialog.setMulti方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
}
示例2: 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();
}
}
示例3: 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();
}
}
示例4: 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);
}
}
示例5: getTableName
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
private void getTableName()
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(databaseMeta);
try
{
database.connect();
String Tablenames[]=database.getTablenames();
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, Tablenames, Messages.getString("JobTruncateTables.SelectTables.Title"), Messages.getString("JobTruncateTables.SelectTables.Message"));
dialog.setMulti(true);
if (dialog.open()!=null)
{
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
TableItem tableItem = new TableItem(wFields.table, SWT.NONE);
tableItem.setText(1, Tablenames[idx[i]]);
}
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("JobEntryTruncateTables.ConnectionError.DialogMessage"), e);
}
finally
{
if(database!=null) database.disconnect();
}
wFields.removeEmptyRows();
wFields.setRowNums();
wFields.optWidth(true);
}
}
示例6: getTableName
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
private void getTableName()
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(loggingObject, databaseMeta);
try
{
database.connect();
String Tablenames[]=database.getTablenames();
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, Tablenames, BaseMessages.getString(PKG, "JobTruncateTables.SelectTables.Title"), BaseMessages.getString(PKG, "JobTruncateTables.SelectTables.Message"));
dialog.setMulti(true);
dialog.setAvoidQuickSearch();
if (dialog.open()!=null)
{
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
TableItem tableItem = new TableItem(wFields.table, SWT.NONE);
tableItem.setText(1, Tablenames[idx[i]]);
}
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "JobEntryTruncateTables.ConnectionError.DialogMessage"), e);
}
finally
{
if(database!=null) database.disconnect();
}
wFields.removeEmptyRows();
wFields.setRowNums();
wFields.optWidth(true);
}
}
示例7: getTableName
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
private void getTableName() {
DatabaseMeta databaseMeta = jobMeta.findDatabase( wConnection.getText() );
if ( databaseMeta != null ) {
Database database = new Database( loggingObject, databaseMeta );
try {
database.connect();
String[] Tablenames = database.getTablenames();
Arrays.sort( Tablenames );
EnterSelectionDialog dialog = new EnterSelectionDialog( shell, Tablenames,
BaseMessages.getString( PKG, "JobTruncateTables.SelectTables.Title" ),
BaseMessages.getString( PKG, "JobTruncateTables.SelectTables.Message" ) );
dialog.setMulti( true );
dialog.setAvoidQuickSearch();
if ( dialog.open() != null ) {
int[] idx = dialog.getSelectionIndeces();
for ( int i = 0; i < idx.length; i++ ) {
TableItem tableItem = new TableItem( wFields.table, SWT.NONE );
tableItem.setText( 1, Tablenames[idx[i]] );
}
}
} catch ( KettleDatabaseException e ) {
new ErrorDialog( shell,
BaseMessages.getString( PKG, "System.Dialog.Error.Title" ),
BaseMessages.getString( PKG, "JobEntryTruncateTables.ConnectionError.DialogMessage" ), e );
} finally {
if ( database != null ) {
database.disconnect();
}
}
wFields.removeEmptyRows();
wFields.setRowNums();
wFields.optWidth( true );
}
}
示例8: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wListattribut.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, Messages.getString("JobMysqlBulkLoad.SelectColumns.Title"), Messages.getString("JobMysqlBulkLoad.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wListattribut.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("JobMysqlBulkLoad.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例9: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wListColumn.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, Messages.getString("JobMysqlBulkFile.SelectColumns.Title"), Messages.getString("JobMysqlBulkFile.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wListColumn.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("JobMysqlBulkFile.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例10: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wOrderBy.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, Messages.getString("JobMssqlBulkLoad.SelectColumns.Title"), Messages.getString("JobMssqlBulkLoad.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wOrderBy.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("JobMssqlBulkLoad.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例11: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(loggingObject, databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wListattribut.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, BaseMessages.getString(PKG, "JobMysqlBulkLoad.SelectColumns.Title"), BaseMessages.getString(PKG, "JobMysqlBulkLoad.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wListattribut.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "JobMysqlBulkLoad.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例12: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(loggingObject, databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wListColumn.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, BaseMessages.getString(PKG, "JobMysqlBulkFile.SelectColumns.Title"), BaseMessages.getString(PKG, "JobMysqlBulkFile.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wListColumn.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "JobMysqlBulkFile.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例13: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*/
private void getListColumns()
{
if (!Const.isEmpty(wTablename.getText()))
{
DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
if (databaseMeta!=null)
{
Database database = new Database(loggingObject, databaseMeta);
database.shareVariablesWith(jobMeta);
try
{
database.connect();
String schemaTable = databaseMeta.getQuotedSchemaTableCombination(wSchemaname.getText(), wTablename.getText());
RowMetaInterface row = database.getTableFields(schemaTable);
String available[] = row.getFieldNames();
String source[] = wOrderBy.getText().split(",");
for (int i=0;i<source.length;i++) source[i] = Const.trim(source[i]);
int idxSource[] = Const.indexsOfStrings(source, available);
EnterSelectionDialog dialog = new EnterSelectionDialog(shell, available, BaseMessages.getString(PKG, "JobMssqlBulkLoad.SelectColumns.Title"), BaseMessages.getString(PKG, "JobMssqlBulkLoad.SelectColumns.Message"));
dialog.setMulti(true);
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs(idxSource);
if (dialog.open()!=null)
{
String columns="";
int idx[] = dialog.getSelectionIndeces();
for (int i=0;i<idx.length;i++)
{
if (i>0) columns+=", ";
columns+=available[idx[i]];
}
wOrderBy.setText(columns);
}
}
catch(KettleDatabaseException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "JobMssqlBulkLoad.ConnectionError2.DialogMessage"), e);
}
finally
{
database.disconnect();
}
}
}
}
示例14: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*/
private void getListColumns() {
if ( !Utils.isEmpty( wTablename.getText() ) ) {
DatabaseMeta databaseMeta = jobMeta.findDatabase( wConnection.getText() );
if ( databaseMeta != null ) {
Database database = new Database( loggingObject, databaseMeta );
database.shareVariablesWith( jobMeta );
try {
database.connect();
String schemaTable =
databaseMeta.getQuotedSchemaTableCombination( wSchemaname.getText(), wTablename.getText() );
RowMetaInterface row = database.getTableFields( schemaTable );
String[] available = row.getFieldNames();
String[] source = wListattribut.getText().split( "," );
for ( int i = 0; i < source.length; i++ ) {
source[i] = Const.trim( source[i] );
}
int[] idxSource = Const.indexsOfStrings( source, available );
EnterSelectionDialog dialog = new EnterSelectionDialog( shell, available,
BaseMessages.getString( PKG, "JobMysqlBulkLoad.SelectColumns.Title" ),
BaseMessages.getString( PKG, "JobMysqlBulkLoad.SelectColumns.Message" ) );
dialog.setMulti( true );
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs( idxSource );
if ( dialog.open() != null ) {
String columns = "";
int[] idx = dialog.getSelectionIndeces();
for ( int i = 0; i < idx.length; i++ ) {
if ( i > 0 ) {
columns += ", ";
}
columns += available[idx[i]];
}
wListattribut.setText( columns );
}
} catch ( KettleDatabaseException e ) {
new ErrorDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages
.getString( PKG, "JobMysqlBulkLoad.ConnectionError2.DialogMessage" ), e );
} finally {
database.disconnect();
}
}
}
}
示例15: getListColumns
import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; //导入方法依赖的package包/类
/**
* Get a list of columns, comma separated, allow the user to select from it.
*
*/
private void getListColumns() {
if ( !Utils.isEmpty( wTablename.getText() ) ) {
DatabaseMeta databaseMeta = jobMeta.findDatabase( wConnection.getText() );
if ( databaseMeta != null ) {
Database database = new Database( loggingObject, databaseMeta );
database.shareVariablesWith( jobMeta );
try {
database.connect();
String schemaTable =
databaseMeta.getQuotedSchemaTableCombination( wSchemaname.getText(), wTablename.getText() );
RowMetaInterface row = database.getTableFields( schemaTable );
String[] available = row.getFieldNames();
String[] source = wListColumn.getText().split( "," );
for ( int i = 0; i < source.length; i++ ) {
source[i] = Const.trim( source[i] );
}
int[] idxSource = Const.indexsOfStrings( source, available );
EnterSelectionDialog dialog = new EnterSelectionDialog( shell, available,
BaseMessages.getString( PKG, "JobMysqlBulkFile.SelectColumns.Title" ),
BaseMessages.getString( PKG, "JobMysqlBulkFile.SelectColumns.Message" ) );
dialog.setMulti( true );
dialog.setAvoidQuickSearch();
dialog.setSelectedNrs( idxSource );
if ( dialog.open() != null ) {
String columns = "";
int[] idx = dialog.getSelectionIndeces();
for ( int i = 0; i < idx.length; i++ ) {
if ( i > 0 ) {
columns += ", ";
}
columns += available[idx[i]];
}
wListColumn.setText( columns );
}
} catch ( KettleDatabaseException e ) {
new ErrorDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages
.getString( PKG, "JobMysqlBulkFile.ConnectionError2.DialogMessage" ), e );
} finally {
database.disconnect();
}
}
}
}