本文整理汇总了Java中org.pentaho.di.core.row.value.ValueMetaString.trimTypeDesc方法的典型用法代码示例。如果您正苦于以下问题:Java ValueMetaString.trimTypeDesc方法的具体用法?Java ValueMetaString.trimTypeDesc怎么用?Java ValueMetaString.trimTypeDesc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.row.value.ValueMetaString
的用法示例。
在下文中一共展示了ValueMetaString.trimTypeDesc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addFieldsTabs
import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private void addFieldsTabs() {
// Fields tab...
//
wFieldsTab = new CTabItem( wTabFolder, SWT.NONE );
wFieldsTab.setText( BaseMessages.getString( PKG, "TextFileInputDialog.FieldsTab.TabTitle" ) );
FormLayout fieldsLayout = new FormLayout();
fieldsLayout.marginWidth = Const.FORM_MARGIN;
fieldsLayout.marginHeight = Const.FORM_MARGIN;
wFieldsComp = new Composite( wTabFolder, SWT.NONE );
wFieldsComp.setLayout( fieldsLayout );
props.setLook( wFieldsComp );
wGet = new Button( wFieldsComp, SWT.PUSH );
wGet.setText( BaseMessages.getString( PKG, "System.Button.GetFields" ) );
fdGet = new FormData();
fdGet.left = new FormAttachment( 50, 0 );
fdGet.bottom = new FormAttachment( 100, 0 );
wGet.setLayoutData( fdGet );
wMinWidth = new Button( wFieldsComp, SWT.PUSH );
wMinWidth.setText( BaseMessages.getString( PKG, "TextFileInputDialog.MinWidth.Button" ) );
wMinWidth.setToolTipText( BaseMessages.getString( PKG, "TextFileInputDialog.MinWidth.Tooltip" ) );
wMinWidth.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
input.setChanged();
}
} );
setButtonPositions( new Button[] { wGet, wMinWidth }, margin, null );
final int FieldsRows = input.inputFields.length;
ColumnInfo[] colinf =
new ColumnInfo[] { new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.NameColumn.Column" ),
ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.TypeColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaFactory.getValueMetaNames(), true ),
new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.FormatColumn.Column" ),
ColumnInfo.COLUMN_TYPE_FORMAT, 2 ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.PositionColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo(
BaseMessages.getString( PKG, "TextFileInputDialog.LengthColumn.Column" ),
ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.PrecisionColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.CurrencyColumn.Column" ),
ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.DecimalColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo(
BaseMessages.getString( PKG, "TextFileInputDialog.GroupColumn.Column" ),
ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.NullIfColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.IfNullColumn.Column" ),
ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
"TextFileInputDialog.TrimTypeColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaString.trimTypeDesc,
true ), new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.RepeatColumn.Column" ),
ColumnInfo.COLUMN_TYPE_CCOMBO, new String[] { BaseMessages.getString( PKG, "System.Combo.Yes" ),
BaseMessages.getString( PKG, "System.Combo.No" ) }, true ) };
colinf[12].setToolTip( BaseMessages.getString( PKG, "TextFileInputDialog.RepeatColumn.Tooltip" ) );
wFields = new TableView( transMeta, wFieldsComp, SWT.FULL_SELECTION | SWT.MULTI, colinf, FieldsRows, lsMod, props );
fdFields = new FormData();
fdFields.left = new FormAttachment( 0, 0 );
fdFields.top = new FormAttachment( 0, 0 );
fdFields.right = new FormAttachment( 100, 0 );
fdFields.bottom = new FormAttachment( wGet, -margin );
wFields.setLayoutData( fdFields );
fdFieldsComp = new FormData();
fdFieldsComp.left = new FormAttachment( 0, 0 );
fdFieldsComp.top = new FormAttachment( 0, 0 );
fdFieldsComp.right = new FormAttachment( 100, 0 );
fdFieldsComp.bottom = new FormAttachment( 100, 0 );
wFieldsComp.setLayoutData( fdFieldsComp );
wFieldsComp.layout();
wFieldsTab.setControl( wFieldsComp );
}