Java Code Examples for org.eclipse.swt.custom.CTabItem#setText()

The following examples show how to use org.eclipse.swt.custom.CTabItem#setText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldsTab.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
public void buildFieldsTab() {
  checkArgument( wTabFolder.getItemCount() > 0 );

  CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, wTabFolder.getItemCount() - 1 );
  wFieldsTab.setText( BaseMessages.getString( PKG, "JmsConsumerDialog.FieldsTab" ) );

  Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wFieldsComp );
  FormLayout fieldsLayout = new FormLayout();
  fieldsLayout.marginHeight = 15;
  fieldsLayout.marginWidth = 15;
  wFieldsComp.setLayout( fieldsLayout );

  FormData fieldsFormData = new FormData();
  fieldsFormData.left = new FormAttachment( 0, 0 );
  fieldsFormData.top = new FormAttachment( wFieldsComp, 0 );
  fieldsFormData.right = new FormAttachment( 100, 0 );
  fieldsFormData.bottom = new FormAttachment( 100, 0 );
  wFieldsComp.setLayoutData( fieldsFormData );

  buildFieldTable( wFieldsComp, wFieldsComp );

  wFieldsComp.layout();
  wFieldsTab.setControl( wFieldsComp );
}
 
Example 2
Source File: BaseStreamingDialog.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void buildSetupTab() {
  wSetupTab = new CTabItem( wTabFolder, SWT.NONE );
  wSetupTab.setText( BaseMessages.getString( PKG, "BaseStreamingDialog.SetupTab" ) );

  wSetupComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wSetupComp );
  FormLayout setupLayout = new FormLayout();
  setupLayout.marginHeight = 15;
  setupLayout.marginWidth = 15;
  wSetupComp.setLayout( setupLayout );

  buildSetup( wSetupComp );

  FormData fdSetupComp = new FormData();
  fdSetupComp.left = new FormAttachment( 0, 0 );
  fdSetupComp.top = new FormAttachment( 0, 0 );
  fdSetupComp.right = new FormAttachment( 100, 0 );
  fdSetupComp.bottom = new FormAttachment( 100, 0 );
  wSetupComp.setLayoutData( fdSetupComp );
  wSetupComp.layout();
  wSetupTab.setControl( wSetupComp );
}
 
Example 3
Source File: KGPrintView.java    From elexis-3-core with Eclipse Public License 1.0 6 votes vote down vote up
CTabItem addItem(final String template, final String title, final Kontakt adressat){
	CTabItem ret = new CTabItem(ctab, SWT.NONE);
	text = new TextContainer(getViewSite());
	ret.setControl(text.getPlugin().createContainer(ctab, new ICallback() {
		public void save(){}
		
		public boolean saveAs(){
			return false;
		}
		
	}));
	Brief actBrief =
		text.createFromTemplateName(Konsultation.getAktuelleKons(), template, Brief.UNKNOWN,
			adressat, Messages.KGPrintView_EMR); //$NON-NLS-1$
	ret.setData("brief", actBrief); //$NON-NLS-1$
	ret.setData("text", text); //$NON-NLS-1$
	ret.setText(title);
	return ret;
}
 
Example 4
Source File: AbstractPageGenerator.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates a new tab and place it as last.
 * 
 * @param index
 * @param itemKey
 */
protected void createTabItem( int index, String itemKey )
{
	if ( tabFolder.getItemCount( ) <= index )
	{
		CTabItem tabItem = new CTabItem( tabFolder, SWT.NONE );
		tabItem.setText( itemKey );
		itemMap.put( tabItem, null );
	}
}
 
Example 5
Source File: CodeDetailView.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
private void addPagesFor(String point){
	List<IConfigurationElement> list = Extensions.getExtensions(point);
	for (IConfigurationElement ce : list) {
		try {
			if ("Artikel".equals(ce.getName())) { //$NON-NLS-1$
				continue;
			}
			IDetailDisplay detailDisplay =
				(IDetailDisplay) ce.createExecutableExtension(ExtensionPointConstantsUi.VERRECHNUNGSCODE_CDD);
			CodeSelectorFactory codeSelector =
				(CodeSelectorFactory) ce.createExecutableExtension(ExtensionPointConstantsUi.VERRECHNUNGSCODE_CSF);
			String a = ce.getAttribute(ExtensionPointConstantsUi.VERRECHNUNGSCODE_IMPC);
			ImporterPage ip = null;
			if (a != null) {
				ip = (ImporterPage) ce.createExecutableExtension(ExtensionPointConstantsUi.VERRECHNUNGSCODE_IMPC);
				if (ip != null) {
					importers.put(detailDisplay.getTitle(), ip);
				}
			}
			MasterDetailsPage page = new MasterDetailsPage(ctab, codeSelector, detailDisplay);
			CTabItem ct = new CTabItem(ctab, SWT.NONE);
			ct.setText(detailDisplay.getTitle());
			ct.setControl(page);
			ct.setData(detailDisplay);
			
			CoreUiUtil.injectServicesWithContext(codeSelector);
			CoreUiUtil.injectServicesWithContext(detailDisplay);
		} catch (Exception ex) {
			LoggerFactory.getLogger(getClass()).error("Error creating pages", ex);
			ElexisStatus status =
				new ElexisStatus(ElexisStatus.WARNING, Hub.PLUGIN_ID, ElexisStatus.CODE_NONE,
					"Fehler beim Initialisieren von " + ce.getName(), ex,
					ElexisStatus.LOG_WARNINGS);
			StatusManager.getManager().handle(status, StatusManager.SHOW);
		}
	}
}
 
Example 6
Source File: ExcelInputDialog.java    From hop with Apache License 2.0 5 votes vote down vote up
/**
 * Hilight (or not) tab to indicate if action is required.
 *
 * @param hilightMe  <code>true</code> to highlight, <code>false</code> if not.
 * @param tabItem    Tab to highlight
 * @param tabCaption Tab text (normally fetched from resource).
 */
private void tagTab( boolean hilightMe, CTabItem tabItem, String tabCaption ) {
  if ( hilightMe ) {
    tabItem.setText( TAB_FLAG + tabCaption );
  } else {
    tabItem.setText( tabCaption );
  }
}
 
Example 7
Source File: HierarchyWizardEditor.java    From arx with Apache License 2.0 5 votes vote down vote up
/**
 * Create a tab.
 *
 * @param tabFolder
 */
private void createGeneralTab(CTabFolder tabFolder) {
	CTabItem tabItem1 = new CTabItem(tabFolder, SWT.NULL);
    tabItem1.setText(Resources.getMessage("HierarchyWizardEditor.0")); //$NON-NLS-1$
    Composite parent = new Composite(tabFolder, SWT.NULL);
    parent.setLayout(SWTUtil.createGridLayout(2, false));
    parent.setLayoutData(SWTUtil.createFillHorizontallyGridData());
    editor = new HierarchyWizardEditorFunction<T>(this, model, parent, true);
    editor.setFunction(model.getDefaultFunction());
    tabItem1.setControl(parent);
}
 
Example 8
Source File: JmsDialogSecurityLayout.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
void buildSecurityTab() {
  CTabItem wSecurityTab = new CTabItem( wTabFolder, SWT.NONE, 1 );
  wSecurityTab.setText( BaseMessages.getString( PKG, "JmsDialog.Security.Tab" ) );

  Composite wSecurityComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wSecurityComp );
  FormLayout securityLayout = new FormLayout();
  securityLayout.marginHeight = 15;
  securityLayout.marginWidth = 15;
  wSecurityComp.setLayout( securityLayout );

  FormData fdAuthComposite = new FormDataBuilder().fullWidth().result();

  ibmMqAuthComposite = new AuthComposite( wSecurityComp, SWT.NONE, props, lsMod, transMeta,
    getString( PKG, "JmsDialog.Authentication" ), getString( PKG, "JmsDialog.JmsUser" ),
    getString( PKG, "JmsDialog.JmsPassword" ) );
  ibmMqAuthComposite.setLayoutData( fdAuthComposite );

  activeMqAuthComposite = new AuthComposite( wSecurityComp, SWT.NONE, props, lsMod, transMeta,
    getString( PKG, "JmsDialog.Authentication" ), getString( PKG, "JmsDialog.JmsUser" ),
    getString( PKG, "JmsDialog.JmsPassword" ) );
  activeMqAuthComposite.setLayoutData( fdAuthComposite );

  Composite wSslGroup = new Composite( wSecurityComp, SWT.NONE );

  FormLayout flSsl = new FormLayout();
  flSsl.marginHeight = 0;
  flSsl.marginWidth = 0;
  wSslGroup.setLayout( flSsl );

  FormData fdSslGroup = new FormData();
  fdSslGroup.left = new FormAttachment( 0, 0 );
  fdSslGroup.top = new FormAttachment( activeMqAuthComposite, 15 );
  fdSslGroup.right = new FormAttachment( 100, 0 );
  fdSslGroup.bottom = new FormAttachment( 100, 0 );
  fdSslGroup.width = INPUT_WIDTH;
  wSslGroup.setLayoutData( fdSslGroup );

  props.setLook( wSslGroup );

  checkBoxTableCombo = new CheckBoxTableComboDefaultButton(
    wSslGroup,
    props,
    lsMod,
    transMeta,
    sslConfig,
    this::toggleVisibility,
    jmsDelegate );

  FormData fdSecurityComp = new FormData();
  wSecurityComp.setLayoutData( fdSecurityComp );

  wSecurityTab.setControl( wSecurityComp );
  activeMqAuthComposite.setUsername( jmsDelegate.amqUsername );
  activeMqAuthComposite.setPassword( jmsDelegate.amqPassword );
  ibmMqAuthComposite.setUsername( jmsDelegate.ibmUsername );
  ibmMqAuthComposite.setPassword( jmsDelegate.ibmPassword );

  toggleVisibility( JmsProvider.ConnectionType.valueOf( this.jmsDelegate.connectionType ) );
}
 
Example 9
Source File: WorkflowExecutorDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void addResultRowsTab() {

    final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE );
    wTab.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultRows.Title" ) );
    wTab.setToolTipText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultRows.Tooltip" ) );

    ScrolledComposite scrolledComposite = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL );
    scrolledComposite.setLayout( new FillLayout() );

    Composite wInputComposite = new Composite( scrolledComposite, SWT.NONE );
    props.setLook( wInputComposite );

    FormLayout tabLayout = new FormLayout();
    tabLayout.marginWidth = 15;
    tabLayout.marginHeight = 15;
    wInputComposite.setLayout( tabLayout );

    wlResultRowsTarget = new Label( wInputComposite, SWT.RIGHT );
    props.setLook( wlResultRowsTarget );
    wlResultRowsTarget.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultRowsTarget.Label" ) );
    FormData fdlResultRowsTarget = new FormData();
    fdlResultRowsTarget.top = new FormAttachment( 0, 0 );
    fdlResultRowsTarget.left = new FormAttachment( 0, 0 ); // First one in the left
    wlResultRowsTarget.setLayoutData( fdlResultRowsTarget );

    wResultRowsTarget = new CCombo( wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
    props.setLook( wResultRowsTarget );
    wResultRowsTarget.addModifyListener( lsMod );
    FormData fdResultRowsTarget = new FormData();
    fdResultRowsTarget.width = 250;
    fdResultRowsTarget.top = new FormAttachment( wlResultRowsTarget, 5 );
    fdResultRowsTarget.left = new FormAttachment( 0, 0 ); // To the right
    wResultRowsTarget.setLayoutData( fdResultRowsTarget );

    wlResultFields = new Label( wInputComposite, SWT.NONE );
    wlResultFields.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFields.Label" ) );
    props.setLook( wlResultFields );
    FormData fdlResultFields = new FormData();
    fdlResultFields.left = new FormAttachment( 0, 0 );
    fdlResultFields.top = new FormAttachment( wResultRowsTarget, 10 );
    wlResultFields.setLayoutData( fdlResultFields );

    int nrRows = ( workflowExecutorMeta.getResultRowsField() != null ? workflowExecutorMeta.getResultRowsField().length : 1 );

    ColumnInfo[] ciResultFields =
      new ColumnInfo[] {
        new ColumnInfo( BaseMessages.getString( PKG, "JobExecutorDialog.ColumnInfo.Field" ),
          ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
        new ColumnInfo( BaseMessages.getString( PKG, "JobExecutorDialog.ColumnInfo.Type" ),
          ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaFactory.getValueMetaNames() ),
        new ColumnInfo( BaseMessages.getString( PKG, "JobExecutorDialog.ColumnInfo.Length" ),
          ColumnInfo.COLUMN_TYPE_TEXT, false ),
        new ColumnInfo( BaseMessages.getString( PKG, "JobExecutorDialog.ColumnInfo.Precision" ),
          ColumnInfo.COLUMN_TYPE_TEXT, false ), };

    wResultRowsFields =
      new TableView( pipelineMeta, wInputComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL
        | SWT.H_SCROLL, ciResultFields, nrRows, false, lsMod, props, false );

    FormData fdResultFields = new FormData();
    fdResultFields.left = new FormAttachment( 0, 0 );
    fdResultFields.top = new FormAttachment( wlResultFields, 5 );
    fdResultFields.right = new FormAttachment( 100, 0 );
    fdResultFields.bottom = new FormAttachment( 100, 0 );
    wResultRowsFields.setLayoutData( fdResultFields );
    wResultRowsFields.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 25, 25, 25, 25 ) );

    wInputComposite.pack();
    Rectangle bounds = wInputComposite.getBounds();

    scrolledComposite.setContent( wInputComposite );
    scrolledComposite.setExpandHorizontal( true );
    scrolledComposite.setExpandVertical( true );
    scrolledComposite.setMinWidth( bounds.width );
    scrolledComposite.setMinHeight( bounds.height );

    wTab.setControl( scrolledComposite );
    wTabFolder.setSelection( wTab );
  }
 
Example 10
Source File: JobDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void addSettingsTab() {
  // ////////////////////////
  // START OF SETTINGS TAB///
  // /
  wSettingsTab = new CTabItem( wTabFolder, SWT.NONE );
  wSettingsTab.setText( BaseMessages.getString( PKG, "JobDialog.SettingsTab.Label" ) );

  FormLayout LogLayout = new FormLayout();
  LogLayout.marginWidth = Const.MARGIN;
  LogLayout.marginHeight = Const.MARGIN;

  Composite wSettingsComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wSettingsComp );
  wSettingsComp.setLayout( LogLayout );

  wlBatchTrans = new Label( wSettingsComp, SWT.RIGHT );
  wlBatchTrans.setText( BaseMessages.getString( PKG, "JobDialog.PassBatchID.Label" ) );
  props.setLook( wlBatchTrans );
  fdlBatchTrans = new FormData();
  fdlBatchTrans.left = new FormAttachment( 0, 0 );
  fdlBatchTrans.top = new FormAttachment( 0, margin );
  fdlBatchTrans.right = new FormAttachment( middle, -margin );
  wlBatchTrans.setLayoutData( fdlBatchTrans );
  wBatchTrans = new Button( wSettingsComp, SWT.CHECK );
  props.setLook( wBatchTrans );
  wBatchTrans.setToolTipText( BaseMessages.getString( PKG, "JobDialog.PassBatchID.Tooltip" ) );
  fdBatchTrans = new FormData();
  fdBatchTrans.left = new FormAttachment( middle, 0 );
  fdBatchTrans.top = new FormAttachment( 0, margin );
  fdBatchTrans.right = new FormAttachment( 100, 0 );
  wBatchTrans.setLayoutData( fdBatchTrans );

  // Shared objects file
  Label wlSharedObjectsFile = new Label( wSettingsComp, SWT.RIGHT );
  wlSharedObjectsFile.setText( BaseMessages.getString( PKG, "JobDialog.SharedObjectsFile.Label" ) );
  props.setLook( wlSharedObjectsFile );
  FormData fdlSharedObjectsFile = new FormData();
  fdlSharedObjectsFile.left = new FormAttachment( 0, 0 );
  fdlSharedObjectsFile.right = new FormAttachment( middle, -margin );
  fdlSharedObjectsFile.top = new FormAttachment( wBatchTrans, 4 * margin );
  wlSharedObjectsFile.setLayoutData( fdlSharedObjectsFile );
  wSharedObjectsFile = new TextVar( jobMeta, wSettingsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  wlSharedObjectsFile.setToolTipText( BaseMessages.getString( PKG, "JobDialog.SharedObjectsFile.Tooltip" ) );
  wSharedObjectsFile.setToolTipText( BaseMessages.getString( PKG, "JobDialog.SharedObjectsFile.Tooltip" ) );
  props.setLook( wSharedObjectsFile );
  FormData fdSharedObjectsFile = new FormData();
  fdSharedObjectsFile.left = new FormAttachment( middle, 0 );
  fdSharedObjectsFile.top = new FormAttachment( wBatchTrans, 4 * margin );
  fdSharedObjectsFile.right = new FormAttachment( 100, 0 );
  wSharedObjectsFile.setLayoutData( fdSharedObjectsFile );
  wSharedObjectsFile.addModifyListener( new ModifyListener() {
    public void modifyText( ModifyEvent arg0 ) {
      sharedObjectsFileChanged = true;
    }
  } );

  FormData fdLogComp = new FormData();
  fdLogComp.left = new FormAttachment( 0, 0 );
  fdLogComp.top = new FormAttachment( 0, 0 );
  fdLogComp.right = new FormAttachment( 100, 0 );
  fdLogComp.bottom = new FormAttachment( 100, 0 );
  wSettingsComp.setLayoutData( fdLogComp );

  wSettingsComp.layout();
  wSettingsTab.setControl( wSettingsComp );

  // ///////////////////////////////////////////////////////////
  // / END OF LOG TAB
  // ///////////////////////////////////////////////////////////
}
 
Example 11
Source File: LogAnalysis.java    From AndroidRobot with Apache License 2.0 4 votes vote down vote up
public void createLogList() {
    tabFolderLogList = new CTabFolder(sashFormLog, SWT.NONE | SWT.BORDER);
    tabFolderLogList.setTabHeight(0);
    tabFolderLogList.marginHeight = 0;
    tabFolderLogList.marginWidth = 0;
    tabFolderLogList.setLayout(new FillLayout());
    tabFolderLogList.setBounds(5, 5, 200, 465);
    tabFolderLogList.setSimple(false);
    tabFolderLogList.setUnselectedCloseVisible(true);

    CTabItem tabItemLogList = new CTabItem(tabFolderLogList, SWT.NONE | SWT.MULTI
                                                             | SWT.V_SCROLL);
    tabFolderLogList.setSelection(tabItemLogList);
    tabItemLogList.setText("日志浏览");

    Composite composite = new Composite(tabFolderLogList, SWT.NONE);
    composite.setLayout(new GridLayout());
    treeLog = new Tree(composite, SWT.BORDER);
    colorBlack = display.getSystemColor(SWT.COLOR_BLACK);

    tabItemLogList.setControl(composite);
    treeLog.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    treeLog.addListener(SWT.MouseDoubleClick, new Listener() {
        public void handleEvent(Event event) {
            Point point = new Point(event.x, event.y);
            TreeItem item = treeLog.getItem(point);
            if (item != null) {
                String taskName = (String) item.getData("task");
                String loop = String.valueOf(item.getData("loop"));
                String caseName = (String) item.getData("case");
                int index = (Integer) item.getData("index");
                //System.out.println("task:"+taskName+" loop:"+loop+" caseName:"+caseName+" index:"+index);
                if (index != 0)
                    Log.loadLogs(styledTextLog, display, logFile, taskName, loop, caseName,
                        index);
            }
        }
    });

}
 
Example 12
Source File: WorkflowDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void addParamTab() {
  // ////////////////////////
  // START OF PARAM TAB
  // /
  CTabItem wParamTab = new CTabItem( wTabFolder, SWT.NONE );
  wParamTab.setText( BaseMessages.getString( PKG, "WorkflowDialog.ParamTab.Label" ) );

  FormLayout paramLayout = new FormLayout();
  paramLayout.marginWidth = props.getMargin();
  paramLayout.marginHeight = props.getMargin();

  Composite wParamComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wParamComp );
  wParamComp.setLayout( paramLayout );

  Label wlFields = new Label( wParamComp, SWT.RIGHT );
  wlFields.setText( BaseMessages.getString( PKG, "WorkflowDialog.Parameters.Label" ) );
  props.setLook( wlFields );
  FormData fdlFields = new FormData();
  fdlFields.left = new FormAttachment( 0, 0 );
  fdlFields.top = new FormAttachment( 0, 0 );
  wlFields.setLayoutData( fdlFields );

  final int FieldsCols = 3;
  final int FieldsRows = workflowMeta.listParameters().length;

  ColumnInfo[] colinf = new ColumnInfo[ FieldsCols ];
  colinf[ 0 ] =
    new ColumnInfo(
      BaseMessages.getString( PKG, "WorkflowDialog.ColumnInfo.Parameter.Label" ), ColumnInfo.COLUMN_TYPE_TEXT,
      false );
  colinf[ 1 ] =
    new ColumnInfo(
      BaseMessages.getString( PKG, "WorkflowDialog.ColumnInfo.Default.Label" ), ColumnInfo.COLUMN_TYPE_TEXT,
      false );
  colinf[ 2 ] =
    new ColumnInfo(
      BaseMessages.getString( PKG, "WorkflowDialog.ColumnInfo.Description.Label" ), ColumnInfo.COLUMN_TYPE_TEXT,
      false );

  wParamFields =
    new TableView(
      workflowMeta, wParamComp, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, FieldsRows, lsMod, props );

  FormData fdFields = new FormData();
  fdFields.left = new FormAttachment( 0, 0 );
  fdFields.top = new FormAttachment( wlFields, margin );
  fdFields.right = new FormAttachment( 100, 0 );
  fdFields.bottom = new FormAttachment( 100, 0 );
  wParamFields.setLayoutData( fdFields );

  FormData fdDepComp = new FormData();
  fdDepComp.left = new FormAttachment( 0, 0 );
  fdDepComp.top = new FormAttachment( 0, 0 );
  fdDepComp.right = new FormAttachment( 100, 0 );
  fdDepComp.bottom = new FormAttachment( 100, 0 );
  wParamComp.setLayoutData( fdDepComp );

  wParamComp.layout();
  wParamTab.setControl( wParamComp );

  // ///////////////////////////////////////////////////////////
  // / END OF PARAM TAB
  // ///////////////////////////////////////////////////////////
}
 
Example 13
Source File: SimpleMappingDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void addParametersTab( final MappingParameters parameters ) {

    CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE );
    wParametersTab.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Title" ) );
    wParametersTab.setToolTipText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Tooltip" ) );

    Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE );
    props.setLook( wParametersComposite );

    FormLayout parameterTabLayout = new FormLayout();
    parameterTabLayout.marginWidth = 15;
    parameterTabLayout.marginHeight = 15;
    wParametersComposite.setLayout( parameterTabLayout );

    // Add a checkbox: inherit all variables...
    //
    Button wInheritAll = new Button( wParametersComposite, SWT.CHECK );
    wInheritAll.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.InheritAll" ) );
    props.setLook( wInheritAll );
    FormData fdInheritAll = new FormData();
    fdInheritAll.bottom = new FormAttachment( 100, 0 );
    fdInheritAll.left = new FormAttachment( 0, 0 );
    fdInheritAll.right = new FormAttachment( 100, -30 );
    wInheritAll.setLayoutData( fdInheritAll );
    wInheritAll.setSelection( parameters.isInheritingAllVariables() );

    // Now add a tableview with the 2 columns to specify: input and output
    // fields for the source and target transforms.
    //
    ColumnInfo[] colinfo =
      new ColumnInfo[] {
        new ColumnInfo(
          BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.Variable" ),
          ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
        new ColumnInfo(
          BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.ValueOrField" ),
          ColumnInfo.COLUMN_TYPE_TEXT, false, false ), };
    colinfo[ 1 ].setUsingVariables( true );

    final TableView wMappingParameters =
      new TableView(
        pipelineMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters
        .getVariable().length, false, lsMod, props, false
      );
    props.setLook( wMappingParameters );
    FormData fdMappings = new FormData();
    fdMappings.left = new FormAttachment( 0, 0 );
    fdMappings.right = new FormAttachment( 100, 0 );
    fdMappings.top = new FormAttachment( 0, 0 );
    fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
    wMappingParameters.setLayoutData( fdMappings );
    wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );

    for ( int i = 0; i < parameters.getVariable().length; i++ ) {
      TableItem tableItem = wMappingParameters.table.getItem( i );
      tableItem.setText( 1, parameters.getVariable()[ i ] );
      tableItem.setText( 2, parameters.getInputField()[ i ] );
    }
    wMappingParameters.setRowNums();
    wMappingParameters.optWidth( true );

    FormData fdParametersComposite = new FormData();
    fdParametersComposite.left = new FormAttachment( 0, 0 );
    fdParametersComposite.top = new FormAttachment( 0, 0 );
    fdParametersComposite.right = new FormAttachment( 100, 0 );
    fdParametersComposite.bottom = new FormAttachment( 100, 0 );
    wParametersComposite.setLayoutData( fdParametersComposite );

    wParametersComposite.layout();
    wParametersTab.setControl( wParametersComposite );

    changeList.add( new MappingParametersTab( wMappingParameters, wInheritAll, parameters ) );
  }
 
Example 14
Source File: HopServerDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void addProxyTab() {
  // ////////////////////////
  // START OF POOL TAB///
  // /
  wProxyTab = new CTabItem( wTabFolder, SWT.NONE );
  wProxyTab.setText( BaseMessages.getString( PKG, "HopServerDialog.USER_TAB_PROXY" ) );

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

  wProxyComp = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wProxyComp );
  wProxyComp.setLayout( poolLayout );

  // What's the data tablespace name?
  Label wlProxyHost = new Label( wProxyComp, SWT.RIGHT );
  props.setLook( wlProxyHost );
  wlProxyHost.setText( BaseMessages.getString( PKG, "HopServerDialog.ProxyServerName.Label" ) );
  FormData fdlProxyHost = new FormData();
  fdlProxyHost.top = new FormAttachment( 0, 0 );
  fdlProxyHost.left = new FormAttachment( 0, 0 ); // First one in the left top corner
  fdlProxyHost.right = new FormAttachment( middle, -margin );
  wlProxyHost.setLayoutData( fdlProxyHost );

  wProxyHost = new TextVar( hopServer, wProxyComp, SWT.BORDER | SWT.LEFT | SWT.SINGLE );
  props.setLook( wProxyHost );
  wProxyHost.addModifyListener( lsMod );
  FormData fdProxyHost = new FormData();
  fdProxyHost.top = new FormAttachment( 0, 0 );
  fdProxyHost.left = new FormAttachment( middle, 0 ); // To the right of the label
  fdProxyHost.right = new FormAttachment( 95, 0 );
  wProxyHost.setLayoutData( fdProxyHost );

  // What's the initial pool size
  Label wlProxyPort = new Label( wProxyComp, SWT.RIGHT );
  props.setLook( wlProxyPort );
  wlProxyPort.setText( BaseMessages.getString( PKG, "HopServerDialog.ProxyServerPort.Label" ) );
  FormData fdlProxyPort = new FormData();
  fdlProxyPort.top = new FormAttachment( wProxyHost, margin );
  fdlProxyPort.left = new FormAttachment( 0, 0 ); // First one in the left top corner
  fdlProxyPort.right = new FormAttachment( middle, -margin );
  wlProxyPort.setLayoutData( fdlProxyPort );

  wProxyPort = new TextVar( hopServer, wProxyComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  props.setLook( wProxyPort );
  wProxyPort.addModifyListener( lsMod );
  FormData fdProxyPort = new FormData();
  fdProxyPort.top = new FormAttachment( wProxyHost, margin );
  fdProxyPort.left = new FormAttachment( middle, 0 ); // To the right of the label
  fdProxyPort.right = new FormAttachment( 95, 0 );
  wProxyPort.setLayoutData( fdProxyPort );

  // What's the maximum pool size
  Label wlNonProxyHosts = new Label( wProxyComp, SWT.RIGHT );
  props.setLook( wlNonProxyHosts );
  wlNonProxyHosts.setText( BaseMessages.getString( PKG, "HopServerDialog.IgnoreProxyForHosts.Label" ) );
  FormData fdlNonProxyHosts = new FormData();
  fdlNonProxyHosts.top = new FormAttachment( wProxyPort, margin );
  fdlNonProxyHosts.left = new FormAttachment( 0, 0 ); // First one in the left top corner
  fdlNonProxyHosts.right = new FormAttachment( middle, -margin );
  wlNonProxyHosts.setLayoutData( fdlNonProxyHosts );

  wNonProxyHosts = new TextVar( hopServer, wProxyComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  props.setLook( wNonProxyHosts );
  wNonProxyHosts.addModifyListener( lsMod );
  FormData fdNonProxyHosts = new FormData();
  fdNonProxyHosts.top = new FormAttachment( wProxyPort, margin );
  fdNonProxyHosts.left = new FormAttachment( middle, 0 ); // To the right of the label
  fdNonProxyHosts.right = new FormAttachment( 95, 0 );
  wNonProxyHosts.setLayoutData( fdNonProxyHosts );

  fdProxyComp = new FormData();
  fdProxyComp.left = new FormAttachment( 0, 0 );
  fdProxyComp.top = new FormAttachment( 0, 0 );
  fdProxyComp.right = new FormAttachment( 100, 0 );
  fdProxyComp.bottom = new FormAttachment( 100, 0 );
  wProxyComp.setLayoutData( fdProxyComp );

  wProxyComp.layout();
  wProxyTab.setControl( wProxyComp );
}
 
Example 15
Source File: JobExecutorDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void addResultFilesTab() {
  final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE );
  wTab.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFiles.Title" ) );
  wTab.setToolTipText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFiles.Tooltip" ) );

  ScrolledComposite scrolledComposite = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL );
  scrolledComposite.setLayout( new FillLayout() );

  Composite wInputComposite = new Composite( scrolledComposite, SWT.NONE );
  props.setLook( wInputComposite );

  FormLayout tabLayout = new FormLayout();
  tabLayout.marginWidth = 15;
  tabLayout.marginHeight = 15;
  wInputComposite.setLayout( tabLayout );

  wlResultFilesTarget = new Label( wInputComposite, SWT.RIGHT );
  props.setLook( wlResultFilesTarget );
  wlResultFilesTarget.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFilesTarget.Label" ) );
  FormData fdlResultFilesTarget = new FormData();
  fdlResultFilesTarget.top = new FormAttachment( 0, 0 );
  fdlResultFilesTarget.left = new FormAttachment( 0, 0 ); // First one in the left
  wlResultFilesTarget.setLayoutData( fdlResultFilesTarget );

  wResultFilesTarget = new CCombo( wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  props.setLook( wResultFilesTarget );
  wResultFilesTarget.addModifyListener( lsMod );
  FormData fdResultFilesTarget = new FormData();
  fdResultFilesTarget.width = 250;
  fdResultFilesTarget.top = new FormAttachment( wlResultFilesTarget, 5 );
  fdResultFilesTarget.left = new FormAttachment( 0, 0 ); // To the right
  wResultFilesTarget.setLayoutData( fdResultFilesTarget );

  // ResultFileNameField
  //
  wlResultFileNameField = new Label( wInputComposite, SWT.RIGHT );
  props.setLook( wlResultFileNameField );
  wlResultFileNameField.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFileNameField.Label" ) );
  FormData fdlResultFileNameField = new FormData();
  fdlResultFileNameField.top = new FormAttachment( wResultFilesTarget, 10 );
  fdlResultFileNameField.left = new FormAttachment( 0, 0 ); // First one in the left
  wlResultFileNameField.setLayoutData( fdlResultFileNameField );

  wResultFileNameField = new TextVar( transMeta, wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  props.setLook( wResultFileNameField );
  wResultFileNameField.addModifyListener( lsMod );
  FormData fdResultFileNameField = new FormData();
  fdResultFileNameField.width = 250;
  fdResultFileNameField.top = new FormAttachment( wlResultFileNameField, 5 );
  fdResultFileNameField.left = new FormAttachment( 0, 0 ); // To the right
  wResultFileNameField.setLayoutData( fdResultFileNameField );

  wInputComposite.pack();
  Rectangle bounds = wInputComposite.getBounds();

  scrolledComposite.setContent( wInputComposite );
  scrolledComposite.setExpandHorizontal( true );
  scrolledComposite.setExpandVertical( true );
  scrolledComposite.setMinWidth( bounds.width );
  scrolledComposite.setMinHeight( bounds.height );

  wTab.setControl( scrolledComposite );
  wTabFolder.setSelection( wTab );
}
 
Example 16
Source File: UserDefinedJavaClassDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void addFieldsTab() {
  fieldsTab = new CTabItem( wTabFolder, SWT.NONE );
  fieldsTab.setText( BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Tabs.Fields.Title" ) );
  fieldsTab.setToolTipText( BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Tabs.Fields.TooltipText" ) );

  Composite wBottom = new Composite( wTabFolder, SWT.NONE );
  props.setLook( wBottom );
  fieldsTab.setControl( wBottom );
  FormLayout bottomLayout = new FormLayout();
  bottomLayout.marginWidth = Const.FORM_MARGIN;
  bottomLayout.marginHeight = Const.FORM_MARGIN;
  wBottom.setLayout( bottomLayout );

  Label wlFields = new Label( wBottom, SWT.NONE );
  wlFields.setText( BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Fields.Label" ) );
  props.setLook( wlFields );
  FormData fdlFields = new FormData();
  fdlFields.left = new FormAttachment( 0, 0 );
  fdlFields.top = new FormAttachment( 0, 0 );
  wlFields.setLayoutData( fdlFields );

  wClearResultFields = new Button( wBottom, SWT.CHECK );
  wClearResultFields
    .setText( BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.ClearResultFields.Label" ) );
  props.setLook( wClearResultFields );
  FormData fdClearResultFields = new FormData();
  fdClearResultFields.right = new FormAttachment( 100, 0 );
  fdClearResultFields.top = new FormAttachment( 0, 0 );
  wClearResultFields.setLayoutData( fdClearResultFields );

  final int fieldsRows = input.getFieldInfo().size();

  ColumnInfo[] colinf =
    new ColumnInfo[] {
      new ColumnInfo(
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.ColumnInfo.Filename" ),
        ColumnInfo.COLUMN_TYPE_TEXT, false ),
      new ColumnInfo(
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.ColumnInfo.Type" ),
        ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaFactory.getValueMetaNames() ),
      new ColumnInfo(
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.ColumnInfo.Length" ),
        ColumnInfo.COLUMN_TYPE_TEXT, false ),
      new ColumnInfo(
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.ColumnInfo.Precision" ),
        ColumnInfo.COLUMN_TYPE_TEXT, false ), };

  wFields =
    new TableView(
      transMeta, wBottom, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, fieldsRows, lsMod, props );

  FormData fdFields = new FormData();
  fdFields.left = new FormAttachment( 0, 0 );
  fdFields.top = new FormAttachment( wlFields, margin );
  fdFields.right = new FormAttachment( 100, 0 );
  fdFields.bottom = new FormAttachment( 100, 0 );
  wFields.setLayoutData( fdFields );

  FormData fdBottom = new FormData();
  fdBottom.left = new FormAttachment( 0, 0 );
  fdBottom.top = new FormAttachment( 0, 0 );
  fdBottom.right = new FormAttachment( 100, 0 );
  fdBottom.bottom = new FormAttachment( 100, 0 );
  wBottom.setLayoutData( fdBottom );

}
 
Example 17
Source File: ElasticSearchBulkDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void addSettingsTab() {
  wSettingsTab = new CTabItem( wTabFolder, SWT.NONE );
  wSettingsTab.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.SettingsTab.TabTitle" ) );

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

  Composite wSettingsComp = new Composite( wTabFolder, SWT.NONE );
  wSettingsComp.setLayout( serversLayout );
  props.setLook( wSettingsComp );

  ColumnInfo[] columnsMeta = new ColumnInfo[2];
  columnsMeta[0] =
          new ColumnInfo( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.SettingsTab.Property.Column" ),
                  ColumnInfo.COLUMN_TYPE_TEXT, false );
  columnsMeta[1] =
          new ColumnInfo( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.SettingsTab.Value.Column" ),
                  ColumnInfo.COLUMN_TYPE_TEXT, false );
  columnsMeta[1].setUsingVariables( true );

  wSettings =
          new TableView( transMeta, wSettingsComp, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, columnsMeta, 1, lsMod,
                  props );
  FormData fdServers = new FormData();
  fdServers.left = new FormAttachment( 0, Const.MARGIN );
  fdServers.top = new FormAttachment( 0, Const.MARGIN );
  fdServers.right = new FormAttachment( 100, -Const.MARGIN );
  fdServers.bottom = new FormAttachment( 100, -Const.MARGIN );
  wSettings.setLayoutData( fdServers );

  FormData fdServersComp = new FormData();
  fdServersComp.left = new FormAttachment( 0, 0 );
  fdServersComp.top = new FormAttachment( 0, 0 );
  fdServersComp.right = new FormAttachment( 100, 0 );
  fdServersComp.bottom = new FormAttachment( 100, 0 );
  wSettingsComp.setLayoutData( fdServersComp );

  wSettingsComp.layout();
  wSettingsTab.setControl( wSettingsComp );
}
 
Example 18
Source File: TextFileInputDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void addFiltersTabs() {
  // Filters tab...
  //
  wFilterTab = new CTabItem( wTabFolder, SWT.NONE );
  wFilterTab.setText( BaseMessages.getString( PKG, "TextFileInputDialog.FilterTab.TabTitle" ) );

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

  wFilterComp = new Composite( wTabFolder, SWT.NONE );
  wFilterComp.setLayout( FilterLayout );
  props.setLook( wFilterComp );

  final int FilterRows = input.getFilter().length;

  ColumnInfo[] colinf =
    new ColumnInfo[] { new ColumnInfo( BaseMessages.getString( PKG,
      "TextFileInputDialog.FilterStringColumn.Column" ), ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo(
      BaseMessages.getString( PKG, "TextFileInputDialog.FilterPositionColumn.Column" ),
      ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG,
      "TextFileInputDialog.StopOnFilterColumn.Column" ), ColumnInfo.COLUMN_TYPE_CCOMBO, YES_NO_COMBO ),
      new ColumnInfo( BaseMessages.getString( PKG, "TextFileInputDialog.FilterPositiveColumn.Column" ),
        ColumnInfo.COLUMN_TYPE_CCOMBO, YES_NO_COMBO ) };

  colinf[ 2 ].setToolTip( BaseMessages.getString( PKG, "TextFileInputDialog.StopOnFilterColumn.Tooltip" ) );
  colinf[ 3 ].setToolTip( BaseMessages.getString( PKG, "TextFileInputDialog.FilterPositiveColumn.Tooltip" ) );

  wFilter = new TableView( pipelineMeta, wFilterComp, SWT.FULL_SELECTION | SWT.MULTI, colinf, FilterRows, lsMod, props );

  fdFilter = new FormData();
  fdFilter.left = new FormAttachment( 0, 0 );
  fdFilter.top = new FormAttachment( 0, 0 );
  fdFilter.right = new FormAttachment( 100, 0 );
  fdFilter.bottom = new FormAttachment( 100, 0 );
  wFilter.setLayoutData( fdFilter );

  fdFilterComp = new FormData();
  fdFilterComp.left = new FormAttachment( 0, 0 );
  fdFilterComp.top = new FormAttachment( 0, 0 );
  fdFilterComp.right = new FormAttachment( 100, 0 );
  fdFilterComp.bottom = new FormAttachment( 100, 0 );
  wFilterComp.setLayoutData( fdFilterComp );

  wFilterComp.layout();
  wFilterTab.setControl( wFilterComp );
}
 
Example 19
Source File: ScriptValuesModDialog.java    From hop with Apache License 2.0 4 votes vote down vote up
private void modifyCTabItem( TreeItem tItem, int iModType, String strOption ) {

    switch ( iModType ) {
      case DELETE_ITEM:
        CTabItem dItem = folder.getItem( getCTabPosition( tItem.getText() ) );
        if ( dItem != null ) {
          dItem.dispose();
          input.setChanged();
        }
        break;

      case RENAME_ITEM:
        CTabItem rItem = folder.getItem( getCTabPosition( tItem.getText() ) );
        if ( rItem != null ) {
          rItem.setText( strOption );
          input.setChanged();
          if ( rItem.getImage().equals( imageActiveScript ) ) {
            strActiveScript = strOption;
          } else if ( rItem.getImage().equals( imageActiveStartScript ) ) {
            strActiveStartScript = strOption;
          } else if ( rItem.getImage().equals( imageActiveEndScript ) ) {
            strActiveEndScript = strOption;
          }
        }
        break;
      case SET_ACTIVE_ITEM:
        CTabItem aItem = folder.getItem( getCTabPosition( tItem.getText() ) );
        if ( aItem != null ) {
          input.setChanged();
          strActiveScript = tItem.getText();
          for ( int i = 0; i < folder.getItemCount(); i++ ) {
            if ( folder.getItem( i ).equals( aItem ) ) {
              aItem.setImage( imageActiveScript );
            } else {
              folder.getItem( i ).setImage( imageInactiveScript );
            }
          }
        }
        break;
      default:
        break;
    }

  }
 
Example 20
Source File: StarModelDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void addModelTab() {
  wModelTab = new CTabItem(wTabFolder, SWT.NONE);
  wModelTab.setText(BaseMessages.getString(PKG, "StarModelDialog.ModelTab.Label"));

  Composite wModelComp = new Composite(wTabFolder, SWT.NONE);
  props.setLook(wModelComp);

  FormLayout transLayout = new FormLayout();
  transLayout.marginWidth = Const.MARGIN;
  transLayout.marginHeight = Const.MARGIN;
  wModelComp.setLayout(transLayout);

  // Model name:
  //
  Label wlModelName = new Label(wModelComp, SWT.RIGHT);
  wlModelName.setText(BaseMessages.getString(PKG, "StarModelDialog.ModelName.Label"));
  props.setLook(wlModelName);
  FormData fdlJobname = new FormData();
  fdlJobname.left = new FormAttachment(0, 0);
  fdlJobname.right = new FormAttachment(middle, -margin);
  fdlJobname.top = new FormAttachment(0, margin);
  wlModelName.setLayoutData(fdlJobname);
  wModelName = new Text(wModelComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
  props.setLook(wModelName);
  FormData fdJobname = new FormData();
  fdJobname.left = new FormAttachment(middle, 0);
  fdJobname.top = new FormAttachment(0, margin);
  fdJobname.right = new FormAttachment(100, 0);
  wModelName.setLayoutData(fdJobname);
  Control lastControl = wModelName;

  // Model description
  //
  Label wlModelDescription = new Label(wModelComp, SWT.RIGHT);
  wlModelDescription.setText(BaseMessages.getString(PKG, "StarModelDialog.ModelDescription.Label"));
  props.setLook(wlModelDescription);
  FormData fdlJobFilename = new FormData();
  fdlJobFilename.left = new FormAttachment(0, 0);
  fdlJobFilename.right = new FormAttachment(middle, -margin);
  fdlJobFilename.top = new FormAttachment(lastControl, margin);
  wlModelDescription.setLayoutData(fdlJobFilename);
  wModelDescription = new Text(wModelComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
  props.setLook(wModelDescription);
  FormData fdJobFilename = new FormData();
  fdJobFilename.left = new FormAttachment(middle, 0);
  fdJobFilename.top = new FormAttachment(lastControl, margin);
  fdJobFilename.right = new FormAttachment(100, 0);
  wModelDescription.setLayoutData(fdJobFilename);
  lastControl = wModelDescription;

  canvas = new Canvas(wModelComp, SWT.BORDER);
  FormData fdCanvas = new FormData();
  fdCanvas.left = new FormAttachment(0,0);
  fdCanvas.right = new FormAttachment(100, 0);
  fdCanvas.top = new FormAttachment(lastControl, 3*margin);
  fdCanvas.bottom = new FormAttachment(100, -margin);
  canvas.setLayoutData(fdCanvas);
  canvas.addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent paintEvent) {
      drawLogicalModel(logicalModel, canvas, paintEvent);
    }
  });


  FormData fdModelComp = new FormData();
  fdModelComp.left = new FormAttachment(0, 0);
  fdModelComp.top = new FormAttachment(0, 0);
  fdModelComp.right = new FormAttachment(100, 0);
  fdModelComp.bottom = new FormAttachment(100, 0);

  wModelComp.setLayoutData(fdModelComp);
  wModelTab.setControl(wModelComp);
}