Java Code Examples for org.eclipse.swt.widgets.TabFolder#setLayoutData()

The following examples show how to use org.eclipse.swt.widgets.TabFolder#setLayoutData() . 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: AddMessageEventWizardPage.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
private void createTableFolder(final Composite composite) {
    final TabFolder messageAndCorrelationFolder = new TabFolder(composite,
            SWT.NONE);
    messageAndCorrelationFolder.setLayout(GridLayoutFactory.fillDefaults()
            .create());
    messageAndCorrelationFolder.setLayoutData(GridDataFactory
            .fillDefaults().grab(true, true).span(2, 1).create());

    final TabItem messageContentTableItem = new TabItem(
            messageAndCorrelationFolder, SWT.NONE);
    messageContentTableItem.setText(Messages.addMessageContent);
    final Composite messageContentComposite = new Composite(
            messageAndCorrelationFolder, SWT.NONE);
    createMessageContentComposite(messageContentComposite);
    messageContentTableItem.setControl(messageContentComposite);

    final TabItem correlationTableItem = new TabItem(
            messageAndCorrelationFolder, SWT.NONE);
    correlationTableItem.setText(Messages.correlation);
    final Composite correlationComposite = new Composite(
            messageAndCorrelationFolder, SWT.NONE);
    createcorrelationComposite(correlationComposite);
    correlationTableItem.setControl(correlationComposite);

}
 
Example 2
Source File: PyCodeFormatterPage.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
private void createTabs(Composite p) {
    tabFolder = new TabFolder(p, SWT.None);
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.verticalAlignment = SWT.BEGINNING;
    gd.grabExcessVerticalSpace = false;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 2;
    tabFolder.setLayoutData(gd);

    tabItemSpacing = new TabItem(tabFolder, SWT.NONE);
    tabItemSpacing.setText("Spacing");
    spacingParent = new Composite(tabFolder, SWT.NONE);
    tabItemSpacing.setControl(spacingParent);

    tabItemBlankLines = new TabItem(tabFolder, SWT.NONE);
    tabItemBlankLines.setText("Blank lines");
    blankLinesParent = new Composite(tabFolder, SWT.NONE);
    tabItemBlankLines.setControl(blankLinesParent);

    tabItemComments = new TabItem(tabFolder, SWT.NONE);
    tabItemComments.setText("Comments");
    commentsParent = new Composite(tabFolder, SWT.NONE);
    tabItemComments.setControl(commentsParent);
}
 
Example 3
Source File: UpdaterDialog.java    From developer-studio with Apache License 2.0 6 votes vote down vote up
private TabFolder createLeftContainerTabFolder(Composite leftContainer) {
	GridData tabGridData = new GridData();
	tabGridData.horizontalAlignment = GridData.FILL;
	tabGridData.verticalAlignment = GridData.FILL;
	tabGridData.horizontalSpan = 3;
	tabGridData.verticalSpan = 7;
	tabGridData.grabExcessVerticalSpace = true;
	tabGridData.heightHint = 600;
	tabGridData.widthHint = 700;

	final TabFolder tabFolder = new TabFolder(leftContainer, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL);
	tabFolder.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent event) {
			if (tabFolder.getSelection()[0].getText().equals(ALL_FEATURES_TAB_TITLE)) {
				installBtn.setEnabled(!selectedFeatures.isEmpty());
			} else if (tabFolder.getSelection()[0].getText().equals(UPDATES_TAB_TITLE)) {
				installBtn.setEnabled(!selectedUpdates.isEmpty());
			}
		}
	});
	tabFolder.setLayoutData(tabGridData);
	tabFolder.setSize(400, 420);
	return tabFolder;
}
 
Example 4
Source File: SpellPage.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected Control createContents(Composite parent) {
	isInit = true;
	Composite tParent = new Composite(parent, SWT.BORDER);
	tParent.setLayoutData(new GridData(GridData.FILL_BOTH));
	tParent.setLayout(new GridLayout());
	
	addSpellInstalGroup(tParent);
	
	tabFolder = new TabFolder(tParent, SWT.NONE);
	tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
	
	hunspellTabItem = new TabItem(tabFolder, SWT.NONE);
	hunspellTabItem.setText(Messages.getString("qa.preference.SpellPage.hunspellTab"));
	
	aspellTabItem = new TabItem(tabFolder, SWT.NONE);
	aspellTabItem.setText(Messages.getString("qa.preference.SpellPage.aspellTab"));
	
	createHunspellCmp();
	createAspellCmp();
	
	initData();
	return parent;
}
 
Example 5
Source File: TemplateCustomPropertiesPage.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public void createControl(Composite parent) {

    final Composite container = new Composite(parent, parent.getStyle());
    setControl(container);
    container.setLayout(new GridLayout(1, false));

    final TabFolder tabFolder = new TabFolder(container, SWT.BORDER);
    tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    final CheckboxTableViewer tokenViewer = addTokenTabItem(tabFolder, registry, properties);
    addNSURITabItem(tabFolder, tokenViewer, properties);
    addServicesTabItem(tabFolder, tokenViewer, properties);
    if (!M2DocUtils.VERSION.equals(properties.getM2DocVersion())) {
        setMessage("M2Doc version mismatch: template version is " + properties.getM2DocVersion()
            + " and current M2Doc version is " + M2DocUtils.VERSION, IMessageProvider.WARNING);
    } else {
        setMessage("Select services and packages");
    }
}
 
Example 6
Source File: AbstractTabbedDialog.java    From ermasterr with Apache License 2.0 6 votes vote down vote up
protected void createTabFolder(final Composite parent) {
    final GridData gridData = new GridData();
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    gridData.verticalAlignment = GridData.FILL;
    gridData.horizontalAlignment = GridData.FILL;

    tabFolder = new TabFolder(parent, SWT.NONE);
    tabFolder.setLayoutData(gridData);

    tabWrapperList = createTabWrapperList(tabFolder);

    for (final ValidatableTabWrapper tab : tabWrapperList) {
        tab.init();
    }

    ListenerAppender.addTabListener(tabFolder, tabWrapperList);

    tabWrapperList.get(0).setInitFocus();
}
 
Example 7
Source File: SearchDialog.java    From ermasterr with Apache License 2.0 6 votes vote down vote up
private void initialize(final Composite parent) {
    keywordCombo = CompositeFactory.createCombo(null, parent, "label.search.keyword", 1);

    replaceCombo = CompositeFactory.createCombo(null, parent, "label.search.replace.word", 1);

    final GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalSpan = 2;
    gridData.grabExcessHorizontalSpace = true;

    tabFolder = new TabFolder(parent, SWT.NONE);
    tabFolder.setLayoutData(gridData);

    createRegionGroup(tabFolder);
    createResultGroup(tabFolder);

    selectAllCheckBox(true);
}
 
Example 8
Source File: TabDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Creates and returns the contents of the upper part of this dialog (above
 * the button bar).
 * <p>
 * The <code>TabDialog</code> overrides this framework method to create and
 * return a new <code>Composite</code> with an empty tab folder.
 * </p>
 * 
 * @param parent
 *            the parent composite to contain the dialog area
 * @return the dialog area control
 */
protected Control createDialogArea( Composite parent )
{
	Composite composite = (Composite) super.createDialogArea( parent );
	TabFolder tabFolder = new TabFolder( composite, SWT.TOP );
	tabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	addTabPages( ); // add pages
	for ( Iterator<TabPage> iterator = tabList.iterator( ); iterator.hasNext( ); )
	{
		TabPage page = iterator.next( );
		TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
		tabItem.setControl( page.createControl( tabFolder ) );
		tabItem.setText( page.getName( ) );
	}
	return composite;
}
 
Example 9
Source File: ClassPathsPageHelper.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
private void createTabFolderArea( Composite composite )
{
	Composite tabArea = new Composite( composite, SWT.NONE );
	GridLayout layout = new GridLayout( 1, false );
	layout.marginWidth = 10;
	tabArea.setLayout( layout );
	GridData gd = new GridData( GridData.FILL_BOTH );
	tabArea.setLayoutData( gd );
	
	tabFolder = new TabFolder( tabArea, SWT.TOP );
	tabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	runtimePage = new POJOClassTabFolderPage( this,
			getApplResourceDir( ) );
	runtimePage.setPrompMessage( Messages.getString( "DataSource.POJOClassTabFolderPage.promptLabel.runtime" ) ); //$NON-NLS-1$
	TabItem runtimeTab = runtimePage.createContents( tabFolder );
	runtimeTab.setText( Messages.getString( "DataSource.POJOClasses.tab.runtime" ) ); //$NON-NLS-1$

	designtimePage = new POJOClassTabFolderPage( this,
			getApplResourceDir( ) );
	designtimePage.setPrompMessage( Messages.getString( "DataSource.POJOClassTabFolderPage.promptLabel.designtime" ) ); //$NON-NLS-1$
	TabItem designTimeTab = designtimePage.createContents( tabFolder );
	designTimeTab.setText( Messages.getString( "DataSource.POJOClasses.tab.designTime" ) ); //$NON-NLS-1$

	runtimePage.setFriendPage( designtimePage );
	designtimePage.setFriendPage( runtimePage );

	initControlValues( );
}
 
Example 10
Source File: TmxEditor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
public void createContent(TmxEditorViewer viewPart, Composite container) {
	this.parentComposite = container;
	this.viewPart = viewPart;
	GridLayout containerGdLt = new GridLayout(1, true);
	containerGdLt.marginWidth = 0;
	containerGdLt.marginHeight = 0;
	containerGdLt.verticalSpacing = 5;
	containerGdLt.marginTop = 0;
	containerGdLt.marginLeft = 0;
	containerGdLt.marginRight = 0;
	container.setLayout(containerGdLt);

	// tab 设置,分为数据查询以及品质检查
	TabFolder tab = new TabFolder(container, SWT.NONE);
	tab.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	TabItem editorItm = new TabItem(tab, SWT.NONE);
	editorItm.setText(Messages.getString("tmxeditor.filter.editor"));

	TabItem qaItm = new TabItem(tab, SWT.NONE);
	qaItm.setText(Messages.getString("tmxeditor.filter.qa"));

	Composite editorCmp = new Composite(tab, SWT.NONE);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(editorCmp);
	GridLayoutFactory.fillDefaults().numColumns(2).applyTo(editorCmp);
	createEditorArea(editorCmp);
	editorItm.setControl(editorCmp);

	Composite qaCmp = new Composite(tab, SWT.NONE);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(qaCmp);
	GridLayoutFactory.fillDefaults().numColumns(2).applyTo(qaCmp);
	createQaArea(qaCmp);
	qaItm.setControl(qaCmp);

	// create nattable composite
	Composite nattableComposite = new Composite(container, SWT.NONE);
	nattableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
	createNattable(nattableComposite, srcLangCode, tgtLangCode);
}
 
Example 11
Source File: FormatterModifyDialog.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected Control createDialogArea(Composite parent)
{
	final Composite composite = (Composite) super.createDialogArea(parent);

	Composite nameComposite = new Composite(composite, SWT.NONE);
	nameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
	nameComposite.setLayout(new GridLayout(3, false));

	fProfileNameField = new StringDialogField();
	fProfileNameField.setLabelText(FormatterMessages.FormatterModifyDialog_profileName);
	if (profile != null)
	{
		fProfileNameField.setText(profile.getName());
	}
	fProfileNameField.getLabelControl(nameComposite)
			.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
	fProfileNameField.getTextControl(nameComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	fProfileNameField.setDialogFieldListener(new IDialogFieldListener()
	{
		public void dialogFieldChanged(DialogField field)
		{
			validate();
		}
	});

	fSaveButton = createButton(nameComposite, SAVE_BUTTON_ID, FormatterMessages.FormatterModifyDialog_export, false);

	fTabFolder = new TabFolder(composite, SWT.NONE);
	fTabFolder.setFont(composite.getFont());
	fTabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	addPages();
	controlManager.initialize();
	return composite;
}
 
Example 12
Source File: EditboxPreferencePage.java    From gama with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected Control createContents(final Composite parent) {
	noDefaultAndApplyButton();

	final Composite c = new Composite(parent, SWT.NONE);
	c.setLayout(new GridLayout(1, false));
	final Link link = new Link(c, SWT.NONE);
	link.setText("Turn off current line highlighting <A>here</A>.");
	final FontData[] fontData = link.getFont().getFontData();
	for (final FontData fd : fontData) {
		fd.setHeight(10);
		fd.setStyle(SWT.BOLD);
	}
	link.setFont(new Font(getShell().getDisplay(), fontData));
	link.addSelectionListener(new SelectionAdapter() {

		@Override
		public void widgetSelected(final SelectionEvent e) {
			final IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
			container.openPage("org.eclipse.ui.preferencePages.GeneralTextEditor", null);
		}
	});

	folder = new TabFolder(c, SWT.NONE);
	folder.setLayoutData(new GridData(GridData.FILL_BOTH));
	final TabItem ti = new TabItem(folder, SWT.NONE);
	ti.setText("Themes");
	ti.setControl(createCategoryControl(folder));
	folder.pack();
	return c;
}
 
Example 13
Source File: FindbugsPropertyPage.java    From spotbugs with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void createConfigurationTabFolder(Composite composite) {
    tabFolder = new TabFolder(composite, SWT.TOP);
    GridData layoutData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL
            | GridData.GRAB_VERTICAL);
    layoutData.verticalIndent = -5;
    tabFolder.setLayoutData(layoutData);

    reportConfigurationTab = createReportConfigurationTab(tabFolder);
    filterFilesTab = createFilterFilesTab(tabFolder);
    workspaceSettingsTab = createWorkspaceSettings(tabFolder);
    detectorTab = createDetectorConfigurationTab(tabFolder);
}
 
Example 14
Source File: VariableAndOptionPage.java    From M2Doc with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void createControl(Composite parent) {

    final Composite container = new Composite(parent, parent.getStyle());
    setControl(container);
    container.setLayout(new GridLayout(1, false));

    final TabFolder tabFolder = new TabFolder(container, SWT.BORDER);
    tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    final TabItem variableTabItem = new TabItem(tabFolder, tabFolder.getStyle());
    variableTabItem.setText("Variables");
    final Composite variableContainer = new Composite(tabFolder, tabFolder.getStyle());
    variableTabItem.setControl(variableContainer);
    variablesTable = createVariablesTable(generation, variableContainer, adapterFactory,
            templateCustomPropertiesProvider);
    generationListener.setVariablesViewer(variablesTable);
    createVariablesButonComposite(generation, variableContainer, variablesTable);

    final TabItem optionTabItem = new TabItem(tabFolder, tabFolder.getStyle());
    optionTabItem.setText("Options (expert)");
    final Composite optionContainer = new Composite(tabFolder, tabFolder.getStyle());
    optionTabItem.setControl(optionContainer);
    optionContainer.setLayout(new GridLayout(2, false));
    optionsTable = createOptionsTable(generation, optionContainer);
    generationListener.setOptionsViewer(optionsTable);
    createOptionsButonComposite(generation, optionContainer, optionsTable);
    initializeGenerationVariableDefinition(generation);
}
 
Example 15
Source File: LanguageConfigurationInfoWidget.java    From tm4e with Eclipse Public License 1.0 5 votes vote down vote up
private void createUI(Composite ancestor) {
	TabFolder folder = new TabFolder(ancestor, SWT.NONE);

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	folder.setLayoutData(gd);

	createCommentsTab(folder);
	createBracketsTab(folder);
	createAutoClosingPairsTab(folder);
	createSurroundingPairsTab(folder);
	createFoldingTab(folder);
	createWordPatternTab(folder);
	createOnEnterRulesTab(folder);
}
 
Example 16
Source File: GrammarPreferencePage.java    From tm4e with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Create detail grammar content which is filled when a grammar is selected in
 * the grammar list.
 * 
 * @param parent
 */
private void createGrammarDetailContent(Composite parent) {
	TabFolder folder = new TabFolder(parent, SWT.NONE);

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	folder.setLayoutData(gd);

	createGeneralTab(folder);
	createContentTypeTab(folder);
	createThemeTab(folder);
	createInjectionTab(folder);
}
 
Example 17
Source File: EventHistorySearchDialog.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected Control createDialogArea ( final Composite parent )
{
    // initialize header area
    setTitle ( Messages.search_for_events );
    setMessage ( Messages.search_for_events_description );
    // setHelpAvailable ( true );

    // initialize content
    final Composite rootComposite = (Composite)super.createDialogArea ( parent );

    String filterString = ""; //$NON-NLS-1$
    if ( this.initialFilter != null && this.initialFilter.second != null )
    {
        filterString = this.initialFilter.second;
    }

    final TabFolder tabFolder = new TabFolder ( rootComposite, SWT.NONE );

    // create tabs
    for ( final FilterTab tab : getFilterTabs () )
    {
        final TabItem tabItem = new TabItem ( tabFolder, SWT.NONE );
        tabItem.setText ( tab.getName () );
        tabItem.setControl ( tab.createControl ( tabFolder, this, SWT.NONE, filterString ) );
    }

    final GridData layoutData = new GridData ();
    layoutData.horizontalAlignment = GridData.FILL;
    layoutData.grabExcessHorizontalSpace = true;
    layoutData.verticalAlignment = GridData.FILL;
    layoutData.grabExcessVerticalSpace = true;
    tabFolder.setLayoutData ( layoutData );

    selectInitialFilterPage ( tabFolder );

    return rootComposite;
}
 
Example 18
Source File: GroupDialog.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Creates sorting and filter table area
 * 
 * @param parent
 *            the parent composite
 */
private void createFilterSortingArea( Composite parent )
{
	Group group = new Group( parent, SWT.NONE );
	group.setText( GROUP_DLG_GROUP_FILTER_SORTING );
	group.setLayout( new GridLayout( ) );
	group.setLayoutData( GridDataFactory.fillDefaults( )
			.grab( true, true )
			.minSize( 500, 250 )
			.create( ) );
	ArrayList list = new ArrayList( 1 );
	list.add( inputGroup );

	TabFolder tab = new TabFolder( group, SWT.TOP );
	tab.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	// TODO:remove databinding page by cnfree on 4.28.2006
	/*
	 * TabItem bindingItem = new TabItem( tab, SWT.NONE ); FormPage
	 * bindingPage = new DataSetColumnBindingsFormPage( tab, new
	 * DataSetColumnBindingsFormHandleProvider( ) ); bindingPage.setInput(
	 * list ); bindingItem.setText( TAB_BINDING ); bindingItem.setControl(
	 * bindingPage );
	 */

	TabItem filterItem = new TabItem( tab, SWT.NONE );
	FormPage filterPage = new FormPage( tab,
			FormPage.FULL_FUNCTION_HORIZONTAL,
			new FilterHandleProvider( ) {

				public int[] getColumnWidths( )
				{
					return new int[]{
							200, 100, 100, 100
					};
				}
				
				@Override
				public boolean isEditGroup() {
					
					return editGroup();
				}
			},
			true );
	filterPage.setInput( list );
	filterItem.setText( TAB_FILTER );
	filterItem.setControl( filterPage );
	checkReadOnlyControl( IGroupElementModel.FILTER_PROP, filterPage );

	final TabItem sortItem = new TabItem( tab, SWT.NONE );
	FormPage sortPage = new FormPage( tab,
			FormPage.FULL_FUNCTION_HORIZONTAL,
			new SortingHandleProvider( ) {

				public int[] getColumnWidths( )
				{
					return new int[]{
							200, 100, 100, 100
					};
				}
			},
			true );

	sortPage.setInput( list );
	sortItem.setText( TAB_SORTING );
	sortItem.setControl( sortPage );
	checkReadOnlyControl( IGroupElementModel.SORT_PROP, sortPage );

}
 
Example 19
Source File: MergeScriptView.java    From MergeProcessor with Apache License 2.0 4 votes vote down vote up
/**
 * @param parent a widget which will be the parent of the new instance (cannot
 *               be null)
 * @param style  the style of widget to construct
 */
public MergeScriptView(Composite parent, int style) {
	super(parent, style);
	setLayout(new GridLayout(2, false));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Path);

	textMergeScriptPath = new Text(this, SWT.BORDER);
	textMergeScriptPath.setEditable(false);
	textMergeScriptPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Status);

	textStatus = new Text(this, SWT.BORDER);
	textStatus.setEditable(false);
	textStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Date);

	textDate = new Text(this, SWT.BORDER);
	textDate.setEditable(false);
	textDate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_RevisionRange);

	textRevisionRange = new Text(this, SWT.BORDER);
	textRevisionRange.setEditable(false);
	textRevisionRange.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_SourceBranch);

	textSourceBranch = new Text(this, SWT.BORDER);
	textSourceBranch.setEditable(false);
	textSourceBranch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Label label = new Label(this, SWT.NONE);
	label.setText(Messages.MergeScriptDialog_TargetBranch);

	textTargetBranch = new Text(this, SWT.NONE); // TODO Change To Combo back if target branch change works again
	textTargetBranch.setEditable(false);
	textTargetBranch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	labelNeededFiles = new Label(this, SWT.NONE);
	labelNeededFiles.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
	labelNeededFiles.setText(Messages.MergeScriptDialog_NeededFiles);

	textNeededFiles = new Text(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	textNeededFiles.setEditable(false);
	GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).hint(SWT.DEFAULT, 50)
			.applyTo(textNeededFiles);

	buttonShowChanges = new Button(this, SWT.NONE);
	buttonShowChanges.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
	buttonShowChanges.setText(Messages.MergeScriptDialog_ShowChanges);

	final TabFolder tabFolder = new TabFolder(this, SWT.NONE);
	tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

	final TabItem tabContent = new TabItem(tabFolder, SWT.NONE);
	tabContent.setText(Messages.MergeScriptView_tbtmNewItem_text);

	textContent = new StyledText(tabFolder, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	tabContent.setControl(textContent);
	textContent.setEditable(false);

	tabRenaming = new TabItem(tabFolder, SWT.NONE);
	tabRenaming.setText(Messages.MergeScriptView_tbtmNewItem_1_text);

	renamingView = new RenamingView(tabFolder, SWT.NONE);
	tabRenaming.setControl(renamingView);

	buttonClose = new Button(this, SWT.NONE);
	buttonClose.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
	buttonClose.setText(Messages.MergeScriptDialog_Close);
}
 
Example 20
Source File: ConditionComposite.java    From elexis-3-core with Eclipse Public License 1.0 4 votes vote down vote up
public ConditionComposite(ConditionCategory category, Composite parent, int style){
	super(parent, style);
	setLayout(new GridLayout(1, false));
	
	this.category = category;
	condition = Optional.empty();
	
	statusViewer = new ComboViewer(this);
	statusViewer.setContentProvider(new ArrayContentProvider());
	statusViewer.setInput(ConditionStatus.values());
	statusViewer.setLabelProvider(new LabelProvider() {
		@Override
		public String getText(Object element){
			if (element instanceof ConditionStatus) {
				return ((ConditionStatus) element).getLocalized();
			}
			return super.getText(element);
		}
	});
	
	startTxt = new Text(this, SWT.BORDER);
	startTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	startTxt.setMessage("Beginn Datum oder Beschreibung");
	
	endTxt = new Text(this, SWT.BORDER);
	endTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	endTxt.setMessage("Ende Datum oder Beschreibung");
	
	textOrCodingFolder = new TabFolder(this, SWT.NONE);
	
	TabItem textItem = new TabItem(textOrCodingFolder, SWT.NONE, 0);
	textItem.setText("Text");
	textTxt = new Text(textOrCodingFolder, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	textItem.setControl(textTxt);
	
	TabItem codingItem = new TabItem(textOrCodingFolder, SWT.NONE, 1);
	codingItem.setText("Kodierung");
	codingComposite = new CodingListComposite(textOrCodingFolder, SWT.NONE);
	codingComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	codingItem.setControl(codingComposite);
	
	GridData folderGd = new GridData(GridData.FILL_BOTH);
	textOrCodingFolder.setLayoutData(folderGd);

	notesComposite = new NoteListComposite(this, SWT.NONE);
	notesComposite.showTitle(true);
	notesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	initDataBinding();
}