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


Java Const.FORM_MARGIN屬性代碼示例

本文整理匯總了Java中org.pentaho.di.core.Const.FORM_MARGIN屬性的典型用法代碼示例。如果您正苦於以下問題:Java Const.FORM_MARGIN屬性的具體用法?Java Const.FORM_MARGIN怎麽用?Java Const.FORM_MARGIN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.pentaho.di.core.Const的用法示例。


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

示例1: open

public void open() {

    shell = new Shell( parentShell, style );
    props.setLook( shell );
    shell.setImage( GUIResource.getInstance().getImageSpoon() );

    FormLayout formLayout = new FormLayout();
    formLayout.marginWidth = Const.FORM_MARGIN;
    formLayout.marginHeight = Const.FORM_MARGIN;

    if ( title == null ) {
      title = BaseMessages.getString( PKG, "Sdmx.PreviewTimeSeriesDialog.Title" ) + " " + timeSeries.size();
    }
    if ( message == null ) {
      message = BaseMessages.getString( PKG, "Sdmx.PreviewTimeSeriesDialog.Header" );
    }

    shell.setLayout( formLayout );
    shell.setText( title );

    addTableView();

    shell.open();
    while (!shell.isDisposed()) {
      if (!shell.getDisplay().readAndDispatch())
        shell.getDisplay().sleep();
    }
  }
 
開發者ID:andtorg,項目名稱:sdmx-kettle,代碼行數:28,代碼來源:PreviewTimeSeriesDialog.java

示例2: addFieldsTab

private void addFieldsTab() {
    // ////////////////////////
    // START OF FIELD TAB ///
    // ////////////////////////
    wFieldsTab = new CTabItem( wTabFolder, SWT.NONE );
    wFieldsTab.setText( BaseMessages.getString( PKG, "SdmxDialog.FieldTab.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 );

    final int fieldsRows = meta.getInputFields().length;

    // add code here
    ColumnInfo[] colinf =
        new ColumnInfo[] {
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.NameColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.TypeColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaBase.getTypes(), true ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.FormatColumn.Column" ),ColumnInfo.COLUMN_TYPE_FORMAT, 2 ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.LengthColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.PrecisionColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.CurrencyColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.DecimalColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.GroupColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
//            new ColumnInfo( BaseMessages.getString( PKG, "SdmxtDialog.NullIfColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
//            new ColumnInfo( BaseMessages.getString( PKG, "SdmxInputDialog.IfNullColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.TrimTypeColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaBase.trimTypeDesc, true ),
            new ColumnInfo( BaseMessages.getString( PKG, "SdmxDialog.RepeatColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO,
                new String[] { BaseMessages.getString( PKG, "System.Combo.Yes" ), BaseMessages.getString( PKG, "System.Combo.No" ) }, true ) };

    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 );
  }
 
開發者ID:andtorg,項目名稱:sdmx-kettle,代碼行數:60,代碼來源:SdmxStepDialog.java


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