本文整理匯總了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());
}
示例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);
}
示例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();
}
}
示例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" ) );
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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)
{
}
}
}
示例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;
}
示例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();
}
示例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);
}
示例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();
}
}