當前位置: 首頁>>代碼示例>>Java>>正文


Java TextVar類代碼示例

本文整理匯總了Java中org.pentaho.di.ui.core.widget.TextVar的典型用法代碼示例。如果您正苦於以下問題:Java TextVar類的具體用法?Java TextVar怎麽用?Java TextVar使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TextVar類屬於org.pentaho.di.ui.core.widget包,在下文中一共展示了TextVar類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: OutputFileSelectionWidget

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
OutputFileSelectionWidget(Composite composite, JobMeta jobMeta) {
    super(composite, SWT.NONE);

    GridLayout gridLayout = new GridLayout(1, true);
    gridLayout.marginLeft = 0;
    gridLayout.marginRight = 0;
    gridLayout.horizontalSpacing = 0;
    gridLayout.marginWidth = 0;
    this.setLayout(gridLayout);

    outputFilenameField = new TextVar(jobMeta, this, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
    outputFilenameField.setLayoutData(WidgetFactory.createGridData());

    outputFileInResultCheckBox = new Button(this, SWT.CHECK);
    outputFileInResultCheckBox.setText("Add to result filenames");
    outputFileInResultCheckBox.setSelection(true);
    outputFilenameField.setLayoutData(WidgetFactory.createGridData());
}
 
開發者ID:datacleaner,項目名稱:pdi-datacleaner,代碼行數:19,代碼來源:OutputFileSelectionWidget.java

示例2: createNewExtText

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
private void createNewExtText(XulComponent parent) {
  xulParent = parent;

  if ((xulParent != null) && (xulParent instanceof XulTree)){
    variableSpace = (DatabaseMeta)((XulTree)xulParent).getData();

  }else{
    variableSpace = new DatabaseMeta();
    style = SWT.BORDER;
  }

  extText = new TextVar(variableSpace, parentComposite, style);
  textBox = extText.getTextWidget();
  addKeyListener(textBox);
  setManagedObject(extText);
}
 
開發者ID:bsspirit,項目名稱:kettle-4.4.0-stable,代碼行數:17,代碼來源:ExtTextbox.java

示例3: getTableName

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
private void getTableName( TextVar schema, TextVar tableName ) {
  DatabaseMeta inf = null;
  // New class: SelectTableDialog
  int connr = wConnection.getSelectionIndex();
  if ( connr >= 0 ) {
    inf = transMeta.getDatabase( connr );
  }

  if ( inf != null ) {
    if ( log.isDebug() ) {
      logDebug( BaseMessages.getString( PKG, "GPLoadDialog.Log.LookingAtConnection" ) + inf.toString() );
    }

    DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() );
    std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() );
    if ( std.open() ) {
      schema.setText( Const.NVL( std.getSchemaName(), "" ) );
      tableName.setText( Const.NVL( std.getTableName(), "" ) );
    }
  } else {
    MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
    mb.setMessage( BaseMessages.getString( PKG, "GPLoadDialog.InvalidConnection.DialogMessage" ) );
    mb.setText( BaseMessages.getString( PKG, "GPLoadDialog.InvalidConnection.DialogTitle" ) );
    mb.open();
  }
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:27,代碼來源:GPLoadDialog.java

示例4: addRandomSeedControllers

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
private void addRandomSeedControllers() {
  // random seed
  wlRandomSeed = new Label( wgRowHandling, SWT.RIGHT );
  wlRandomSeed.setText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.Seed.Label" ) );
  props.setLook( wlRandomSeed );
  wlRandomSeed.setLayoutData( getFirstLabelFormData() );

  wtvRandomSeed = new TextVar( transMeta, wgRowHandling, SWT.SINGLE | SWT.LEAD | SWT.BORDER );
  props.setLook( wtvRandomSeed );
  wtvRandomSeed.addModifyListener( simpleModifyListener );
  wtvRandomSeed.setLayoutData( getFirstPromptFormData( wlRandomSeed ) );
  lastControl = wtvRandomSeed;
  wtvRandomSeed.setToolTipText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.Seed.TipText" ) );
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-cpython-plugin,代碼行數:15,代碼來源:CPythonScriptExecutorDialog.java

示例5: OutputFieldsTab

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
public OutputFieldsTab( CTabFolder tabFolder, PropsUI props, VariableSpace transMeta,
                        ModifyListener modifyListener ) {
  super( tabFolder, BaseMessages.getString( PKG, "CallEndpointDialog.TabItem.OutputFields.Title" ), props );

  final Field<TextVar> resultNameField = new TextVarFieldBuilder( this, props )
      .setVariableSpace( transMeta )
      .addModifyListener( modifyListener )
      .setLabel( BaseMessages.getString( PKG, "CallEndpointDialog.TabItem.OutputFields.ResultName" ) )
      .setLeftPlacement( LEFT_PLACEMENT )
      .setWidth( FIELD_WIDTH )
      .build();
  resultNameText = resultNameField.getControl();
  final Field<TextVar> statusCodeNameField = new TextVarFieldBuilder( this, props )
      .setVariableSpace( transMeta )
      .addModifyListener( modifyListener )
      .setLabel( BaseMessages.getString( PKG, "CallEndpointDialog.TabItem.OutputFields.StatusCodeName" ) )
      .setTop( resultNameField )
      .setTopMargin( BAServerCommonDialog.MEDIUM_MARGIN )
      .setLeftPlacement( LEFT_PLACEMENT )
      .setWidth( FIELD_WIDTH )
      .build();
  statusCodeNameText = statusCodeNameField.getControl();
  final Field<TextVar> responseTimeNameField = new TextVarFieldBuilder( this, props )
      .setVariableSpace( transMeta )
      .addModifyListener( modifyListener )
      .setLabel( BaseMessages.getString( PKG, "CallEndpointDialog.TabItem.OutputFields.ResponseTimeName" ) )
      .setTop( statusCodeNameField )
      .setTopMargin( BAServerCommonDialog.MEDIUM_MARGIN )
      .setLeftPlacement( LEFT_PLACEMENT )
      .setWidth( FIELD_WIDTH )
      .build();
  responseTimeNameText = responseTimeNameField.getControl();
}
 
開發者ID:pentaho,項目名稱:pdi-platform-utils-plugin,代碼行數:34,代碼來源:OutputFieldsTab.java

示例6: createWidget

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
@Override protected Field<TextVar> createWidget( Composite parent ) {
  final Field<TextVar> field = new Field<TextVar>( parent, SWT.NONE );
  prepareControl( field, new TextVarBuilder( field, props, variableSpace ) );
  for ( ModifyListener ml : listeners ) {
    field.getControl().addModifyListener( ml );
  }

  return field;
}
 
開發者ID:pentaho,項目名稱:pdi-platform-utils-plugin,代碼行數:10,代碼來源:TextVarFieldBuilder.java

示例7: addStandardTextVar

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
protected TextVar addStandardTextVar(String labelMessageKey, Control prevControl) {
  int vertPad = verticalPadding;
  addStandardLabel(labelMessageKey, prevControl);
  verticalPadding = vertPad;
  TextVar targetControl = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
  targetControl.addModifyListener(lsMod);
  targetControl.setLayoutData(standardInputSpacing(prevControl));
  return targetControl;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:10,代碼來源:InfobrightLoaderDialog.java

示例8: getManagedObject

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
public Object getManagedObject() {
  if (textBox.isDisposed()){
    int thisStyle = isMultiline()? SWT.MULTI|SWT.BORDER|SWT.WRAP|SWT.V_SCROLL : style;
    extText = new TextVar(variableSpace, parentComposite, thisStyle);
    setDisabled(isDisabled());
    setMaxlength(getMaxlength());
    setValue(getValue());
    setReadonly(isReadonly());
    setType(getType());
    textBox = extText.getTextWidget();
    managedObject = extText;
    layout();
  }
  return managedObject;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:16,代碼來源:ExtTextbox.java

示例9: LabelTextVar

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
public LabelTextVar(VariableSpace space, Composite composite, int flags, String labelText, String toolTipText)
{
    super(composite, SWT.NONE);
    props.setLook(this);
    
    int middle = props.getMiddlePct();
    int margin = Const.MARGIN;
    
    FormLayout formLayout = new FormLayout();
    formLayout.marginWidth  = 0;
    formLayout.marginHeight = 0;
    formLayout.marginTop = 0;
    formLayout.marginBottom = 0;
    
    this.setLayout(formLayout);
    
    int textFlags = SWT.SINGLE | SWT.LEFT | SWT.BORDER;
    if (flags!=SWT.NONE) textFlags = flags;
    
    wText = new TextVar(space, this, textFlags, toolTipText);
    FormData fdText = new FormData();
    fdText.left = new FormAttachment(middle, margin);
    fdText.right= new FormAttachment(100, 0);
    wText.setLayoutData(fdText);
    wText.getTextWidget().setToolTipText(toolTipText);

    wLabel = new Label(this, SWT.RIGHT);
    props.setLook(wLabel);
    wLabel.setText(labelText);
    FormData fdLabel = new FormData();
    fdLabel.left = new FormAttachment(0, 0);
    fdLabel.right= new FormAttachment(middle, 0);
    fdLabel.top  = new FormAttachment(wText, 0, SWT.CENTER);
    wLabel.setLayoutData(fdLabel);
    wLabel.setToolTipText(toolTipText);
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:37,代碼來源:LabelTextVar.java

示例10: SheetGetter

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
public SheetGetter(IntuitivusSpreadsheetStepMeta meta, Shell shell, TextVar target)
{
	this.shell = shell;
	this.display = shell.getDisplay();
	this.meta = meta;
	this.target = target;
}
 
開發者ID:intuitivus,項目名稱:pdi-spreadsheet-plugin,代碼行數:8,代碼來源:SheetGetter.java

示例11: selectFolder

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
private void selectFolder(TextVar input)
{
	if(connect()) {
		try {
			Folder folder= mailConn.getStore().getDefaultFolder();
			SelectFolderDialog s= new SelectFolderDialog(shell, SWT.NONE, folder);
			String foldername= s.open();
			if(foldername!=null)
				input.setText(foldername);
		}catch(Exception e)
		{
			
		}
	}
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:16,代碼來源:JobEntryGetPOPDialog.java

示例12: addStandardTextVar

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
protected TextVar addStandardTextVar(String labelMessageKey, Control prevControl) {
  int vertPad = verticalPadding;
  Label label = addStandardLabel(labelMessageKey, prevControl);
  verticalPadding = vertPad;
  TextVar targetControl = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
  targetControl.addModifyListener(lsMod);
  targetControl.setLayoutData(standardInputSpacing(prevControl, label));
  targetControl.addSelectionListener(new SelectionAdapter() { @Override
  public void widgetDefaultSelected(SelectionEvent event) { ok(); } });
  return targetControl;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:12,代碼來源:IngresVectorwiseLoaderDialog.java

示例13: getManagedObject

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
public Object getManagedObject() {
  if (textBox.isDisposed()){
    int thisStyle = isMultiline()? SWT.MULTI|SWT.BORDER|SWT.WRAP|SWT.V_SCROLL : style;
    extText = new TextVar(variableSpace, parentComposite, thisStyle);
    setDisabled(isDisabled());
    setMaxlength(getMaxlength());
    setValue(getValue());
    setReadonly(isReadonly());
    setType(getType());
    textBox = extText.getTextWidget();
    setManagedObject(extText);
    layout();
  }
  return super.getManagedObject();
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:16,代碼來源:ExtTextbox.java

示例14: SimpleFileSelection

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
/**
 * Constructor.
 * 
 * @param shell
 *            shell to set.
 * @param textVar
 *            text variable to edit.
 * @param filterExtensions
 *            filter extensions to set.
 * @param filterNames
 *            filter names to set.
 * @throws IllegalArgumentException
 *             if shell or text variable is null.
 */
public SimpleFileSelection(final Shell shell, final TextVar textVar, final String[] filterExtensions,
        final String[] filterNames) throws IllegalArgumentException {
    super();
    Assert.assertNotNull(shell, "Shell cannot be null");
    Assert.assertNotNull(textVar, "Text var cannot be null");
    Assert.assertNotNull(filterNames, "Filter names cannot be null");
    Assert.assertNotNull(filterExtensions, "Filter extensions cannot be null");
    this.shell = shell;
    this.textVar = textVar;
    this.filterExtensions = new String[filterExtensions.length];
    System.arraycopy(filterExtensions, 0, this.filterExtensions, 0, filterExtensions.length);
    this.filterNames = new String[filterNames.length];
    System.arraycopy(filterNames, 0, this.filterNames, 0, filterNames.length);
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:29,代碼來源:SimpleFileSelection.java

示例15: getTableName

import org.pentaho.di.ui.core.widget.TextVar; //導入依賴的package包/類
private void getTableName(TextVar schema, TextVar tableName) {
   DatabaseMeta inf = null;
   // New class: SelectTableDialog
   int connr = wConnection.getSelectionIndex();
   if (connr >= 0)
      inf = transMeta.getDatabase(connr);

   if (inf != null) {
      if (log.isDebug())
         logDebug(BaseMessages.getString(PKG,
               "GPLoadDialog.Log.LookingAtConnection") + inf.toString()); //$NON-NLS-1$

      DatabaseExplorerDialog std = new DatabaseExplorerDialog(shell,
            SWT.NONE, inf, transMeta.getDatabases());
      std.setSelectedSchemaAndTable(wSchema.getText(), wTable.getText());
      if (std.open()) {
         schema.setText(Const.NVL(std.getSchemaName(), ""));
         tableName.setText(Const.NVL(std.getTableName(), ""));
      }
   } else {
      MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
      mb.setMessage(BaseMessages.getString(PKG,
            "GPLoadDialog.InvalidConnection.DialogMessage")); //$NON-NLS-1$
      mb.setText(BaseMessages.getString(PKG,
            "GPLoadDialog.InvalidConnection.DialogTitle")); //$NON-NLS-1$
      mb.open();
   }
}
 
開發者ID:bsspirit,項目名稱:kettle-4.4.0-stable,代碼行數:29,代碼來源:GPLoadDialog.java


注:本文中的org.pentaho.di.ui.core.widget.TextVar類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。