Java Code Examples for org.eclipse.swt.widgets.Group#setLayout()
The following examples show how to use
org.eclipse.swt.widgets.Group#setLayout() .
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: ThemePreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); Group group = new Group(composite, SWT.SHADOW_IN); group.setLayout(new GridLayout()); group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); createThemeListControls(group); createGlobalColorControls(group); createTokenEditTable(group); createFontArea(composite); createInvasivePrefArea(composite); setTheme(getThemeManager().getCurrentTheme().getName()); return composite; }
Example 2
Source File: DeployRequiredControl.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public DeployRequiredControl(Composite parent, AbstractBdmFormPage formPage, GridData gridData) { super(parent, SWT.NONE); setLayout(GridLayoutFactory.fillDefaults().create()); setLayoutData(gridData); formPage.getToolkit().adapt(this); Group group = new Group(this, SWT.NONE); group.setLayout(GridLayoutFactory.fillDefaults().create()); group.setLayoutData(GridDataFactory.fillDefaults().create()); CLabel label = new CLabel(group, SWT.WRAP); label.setLayoutData(GridDataFactory.fillDefaults().create()); label.setText(Messages.bdmDeployRequired); label.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING)); boolean show = formPage.getEditorContribution().observeDeployRequired().getValue(); gridData.exclude = !show; setVisible(show); }
Example 3
Source File: IndexDialog.java From erflute with Apache License 2.0 | 6 votes |
private void createGroup(Composite composite) { final GridLayout gridLayout4 = new GridLayout(); gridLayout4.verticalSpacing = 5; gridLayout4.marginHeight = 10; final GridData gridData6 = new GridData(); gridData6.widthHint = 150; gridData6.heightHint = 150; final GridData gridData3 = new GridData(); gridData3.verticalSpan = 2; gridData3.horizontalAlignment = GridData.BEGINNING; final Group group = new Group(composite, SWT.NONE); group.setLayoutData(gridData3); group.setLayout(gridLayout4); group.setText(DisplayMessages.getMessage("label.all.column.list")); allColumnList = new org.eclipse.swt.widgets.List(group, SWT.BORDER | SWT.V_SCROLL); allColumnList.setLayoutData(gridData6); }
Example 4
Source File: RelationshipDialog.java From erflute with Apache License 2.0 | 6 votes |
private void createParentMandatoryGroup(Group parent) { final GridLayout gridLayout = new GridLayout(); gridLayout.marginHeight = 10; final GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; final Group group = new Group(parent, SWT.NONE); group.setLayout(gridLayout); group.setLayoutData(gridData); group.setText(DisplayMessages.getMessage("label.mandatory")); parentCardinalityCombo = new Combo(group, SWT.NONE); parentCardinalityCombo.setLayoutData(gridData); parentCardinalityCombo.setVisibleItemCount(5); parentCardinalityCombo.add("1"); parentCardinalityCombo.add("0..1"); }
Example 5
Source File: ExcelPreferencePage.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { Composite tparent = new Composite(parent, SWT.NONE); tparent.setLayout(new GridLayout()); tparent.setLayoutData(new GridData(GridData.FILL_BOTH)); Group groupCommon = new Group(tparent, SWT.NONE); groupCommon.setLayout(new GridLayout()); groupCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); groupCommon.setText(Messages.getString("preference.ExcelPreferencePage.groupCommon")); HsImageLabel imageLabel = new HsImageLabel( Messages.getString("preference.ExcelPreferencePage.imageLabel"), Activator.getImageDescriptor(Constants.PREFERENCE_EXCEL_32)); Composite cmpCommon = imageLabel.createControl(groupCommon); cmpCommon.setLayout(new GridLayout()); cmpCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btnRedFont = new Button(cmpCommon, SWT.CHECK); btnRedFont.setText(Messages.getString("preference.ExcelPreferencePage.btnRedFont")); GridDataFactory.fillDefaults().applyTo(btnRedFont); imageLabel.computeSize(); btnRedFont.setSelection(preferenceStore.getBoolean(Constants.EXCEL_FILTER)); return parent; }
Example 6
Source File: DefaultedPipelineOptionsComponent.java From google-cloud-eclipse with Apache License 2.0 | 6 votes |
@VisibleForTesting DefaultedPipelineOptionsComponent(Composite parent, Object layoutData, MessageTarget messageTarget, DataflowPreferences preferences, RunOptionsDefaultsComponent defaultOptions) { this.preferences = preferences; customValues = new HashMap<>(); defaultsGroup = new Group(parent, SWT.NULL); int numColumns = 3; defaultsGroup.setLayout(new GridLayout(numColumns, false)); defaultsGroup.setLayoutData(layoutData); useDefaultsButton = new Button(defaultsGroup, SWT.CHECK); useDefaultsButton.setText("Use &default Dataflow options"); useDefaultsButton.setSelection(true); useDefaultsButton.addSelectionListener(new SetInputsEnabledOppositeButtonSelectionListener()); useDefaultsButton.addSelectionListener(new SetInputValuesToDefaultOrCustomSelectionListener()); useDefaultsButton.setLayoutData( new GridData(SWT.BEGINNING, SWT.CENTER, true, false, numColumns, 1)); this.defaultOptions = defaultOptions == null ? new RunOptionsDefaultsComponent(defaultsGroup, numColumns, messageTarget, preferences) : defaultOptions; }
Example 7
Source File: NewJavaProjectWizardPageOne.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public Control createControl(Composite composite) { Group workingSetGroup= new Group(composite, SWT.NONE); workingSetGroup.setFont(composite.getFont()); workingSetGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_WorkingSets_group); workingSetGroup.setLayout(new GridLayout(1, false)); fWorkingSetBlock.createContent(workingSetGroup); return workingSetGroup; }
Example 8
Source File: PersonalizationPreferencePage.java From saros with GNU General Public License v2.0 | 5 votes |
private void createVisibleInformationGroup(Composite parent) { final Group group = new Group(parent, SWT.NONE); group.setText(Messages.PersonalizationPreferencePage_visible_information_group_text); group.setLayout(new GridLayout(1, false)); group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); showBalloonNotifications = new Button(group, SWT.CHECK); showBalloonNotifications.setText( Messages.PersonalizationPreferencePage_enable_balloon_notifications); showBalloonNotifications.setSelection( preferenceStore.getBoolean(EclipsePreferenceConstants.ENABLE_BALLOON_NOTIFICATION)); showContributionAnnotation = new Button(group, SWT.CHECK); showContributionAnnotation.setText( Messages.PersonalizationPreferencePage_enable_contribution_annotation); showContributionAnnotation.setToolTipText( Messages.PersonalizationPreferencePage_show_contribution_annotations_tooltip); showContributionAnnotation.setSelection( preferenceStore.getBoolean(EclipsePreferenceConstants.SHOW_CONTRIBUTION_ANNOTATIONS)); showSelectionFillUpAnnotation = new Button(group, SWT.CHECK); showSelectionFillUpAnnotation.setText( Messages.PersonalizationPreferencePage_enable_selectionfillup_annotation); showSelectionFillUpAnnotation.setToolTipText( Messages.PersonalizationPreferencePage_show_selectionfillup_annotations_tooltip); showSelectionFillUpAnnotation.setSelection( preferenceStore.getBoolean(EclipsePreferenceConstants.SHOW_SELECTIONFILLUP_ANNOTATIONS)); }
Example 9
Source File: CommunicationPreferencePage.java From saros with GNU General Public License v2.0 | 5 votes |
@Override protected void createFieldEditors() { chatGroup = new Group(getFieldEditorParent(), SWT.NONE); chatGroup.setText("Settings for Chat"); chatGroup.setLayout(new GridLayout(2, false)); GridData chatGridData = new GridData(SWT.FILL, SWT.CENTER, true, false); chatGridData.horizontalSpan = 2; chatGroup.setLayoutData(chatGridData); useIRCStyleChatLayout = new BooleanFieldEditor( EclipsePreferenceConstants.USE_IRC_STYLE_CHAT_LAYOUT, "Use IRC style for chats", chatGroup); Composite chatServerGroup = new Composite(chatGroup, SWT.NONE); chatServerGroup.setLayout(new GridLayout(2, false)); chatServerGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); chatserver = new StringFieldEditor( EclipsePreferenceConstants.CUSTOM_MUC_SERVICE, "Custom chatserver: ", chatServerGroup); useCustomChatServer = new BooleanFieldEditor( EclipsePreferenceConstants.FORCE_CUSTOM_MUC_SERVICE, "Always use custom chatserver", chatGroup); skypeName = new StringFieldEditor( PreferenceConstants.SKYPE_USERNAME, "Skype name:", getFieldEditorParent()); addField(useIRCStyleChatLayout); addField(chatserver); addField(useCustomChatServer); addField(skypeName); }
Example 10
Source File: ImportRTFDialog.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite tparent = (Composite) super.createDialogArea(parent); GridLayoutFactory.swtDefaults().extendedMargins(2, 2, 0, 0).numColumns(3).equalWidth(false).applyTo(tparent); GridDataFactory.fillDefaults().hint(510, 120).grab(true, true).applyTo(tparent); Group groupXLIFF = new Group(tparent, SWT.None); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; groupXLIFF.setLayoutData(data); groupXLIFF.setLayout(new GridLayout(3, false)); groupXLIFF.setText(Messages.getString("dialog.ImportRTFDialog.groupXLIFF")); Label lblXLIFF = new Label(groupXLIFF, SWT.None); lblXLIFF.setText(Messages.getString(Messages.DIALOG_IMPORT_XLIFF)); // GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).grab(false, false).applyTo(lblXLIFF); txtXLIFFPath = new Text(groupXLIFF, SWT.BORDER); txtXLIFFPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); txtXLIFFPath.setEditable(false); if (strXliffRelativePath != null) { txtXLIFFPath.setText(strXliffRelativePath); } btnBrowseXLIFF = new Button(groupXLIFF, SWT.None); btnBrowseXLIFF.setText(Messages.getString(Messages.DIALOG_IMPORT_XLIFF_BROWSE)); Label lblRTF = new Label(tparent, SWT.None); lblRTF.setText(Messages.getString(Messages.DIALOG_IMPORT_RTF)); GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).grab(false, false).applyTo(lblRTF); txtRTFPath = new Text(tparent, SWT.BORDER); txtRTFPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); txtRTFPath.setEditable(false); btnBrowseRTF = new Button(tparent, SWT.None); btnBrowseRTF.setText(Messages.getString(Messages.DIALOG_IMPORT_RTF_BROWSE)); for (IProject project : root.getProjects()) { lstProject.add(project.getLocation().toOSString()); } initListener(); initRtfPath(); return tparent; }
Example 11
Source File: JavadocStandardWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createBasicOptionsGroup(Composite composite) { fTitleButton= createButton(composite, SWT.CHECK, JavadocExportMessages.JavadocStandardWizardPage_titlebutton_label, createGridData(1)); fTitleText= createText(composite, SWT.SINGLE | SWT.BORDER, null, createGridData(GridData.FILL_HORIZONTAL, 3, 0)); SWTUtil.setAccessibilityText(fTitleText, JavadocExportMessages.JavadocStandardWizardPage_titlebutton_description); String text= fStore.getTitle(); if (!text.equals("")) { //$NON-NLS-1$ fTitleText.setText(text); fTitleButton.setSelection(true); } else fTitleText.setEnabled(false); fBasicOptionsGroup= new Group(composite, SWT.SHADOW_ETCHED_IN); fBasicOptionsGroup.setLayout(createGridLayout(1)); fBasicOptionsGroup.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 2, 0)); fBasicOptionsGroup.setText(JavadocExportMessages.JavadocStandardWizardPage_basicgroup_label); new FlaggedButton(fBasicOptionsGroup, JavadocExportMessages.JavadocStandardWizardPage_usebutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.USE, true); new FlaggedButton(fBasicOptionsGroup, JavadocExportMessages.JavadocStandardWizardPage_hierarchybutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NOTREE, false); new FlaggedButton(fBasicOptionsGroup, JavadocExportMessages.JavadocStandardWizardPage_navigartorbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NONAVBAR, false); fIndexCheck= new FlaggedButton(fBasicOptionsGroup, JavadocExportMessages.JavadocStandardWizardPage_indexbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NOINDEX, false); fSeperatedIndexCheck= new FlaggedButton(fBasicOptionsGroup, JavadocExportMessages.JavadocStandardWizardPage_seperateindexbutton_label, createGridData(GridData.GRAB_HORIZONTAL, 1, LayoutUtil.getIndent()), fStore.SPLITINDEX, true); fSeperatedIndexCheck.getButton().setEnabled(fIndexCheck.getButton().getSelection()); fIndexCheck.getButton().addSelectionListener(new ToggleSelectionAdapter(new Control[] { fSeperatedIndexCheck.getButton()})); fTitleButton.addSelectionListener(new ToggleSelectionAdapter(new Control[] { fTitleText })); }
Example 12
Source File: RoutePropertiesEditionPartImpl.java From eip-designer with Apache License 2.0 | 5 votes |
/** * */ protected Composite createPropertiesGroup(Composite parent) { Group propertiesGroup = new Group(parent, SWT.NONE); propertiesGroup.setText(EipMessages.RoutePropertiesEditionPart_PropertiesGroupLabel); GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL); propertiesGroupData.horizontalSpan = 3; propertiesGroup.setLayoutData(propertiesGroupData); GridLayout propertiesGroupLayout = new GridLayout(); propertiesGroupLayout.numColumns = 3; propertiesGroup.setLayout(propertiesGroupLayout); return propertiesGroup; }
Example 13
Source File: BorderPreferencePage.java From birt with Eclipse Public License 1.0 | 5 votes |
private Group createGroupControl( Composite parent, String labelText, int horizontalSpan, int numColumns ) { Group gp = new Group( parent, 0 ); gp.setText( labelText ); GridData gdata = new GridData( GridData.FILL_HORIZONTAL ); // gdata.heightHint = 125; gdata.horizontalSpan = horizontalSpan; gp.setLayoutData( gdata ); gp.setLayout( new GridLayout( numColumns, false ) ); return gp; }
Example 14
Source File: EquivalentPage.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
@Override protected Control createContents(Composite parent) { isInit = true; Composite tparent = new Composite(parent, SWT.NONE); tparent.setLayout(new GridLayout()); tparent.setLayoutData(new GridData(GridData.FILL_BOTH)); Group group = new Group(tparent, SWT.NONE); group.setText(Messages.getString("preference.EquivalentPage.group")); group.setLayout(new GridLayout(1, false)); GridData groupData = new GridData(GridData.FILL_BOTH); groupData.widthHint = 500; groupData.heightHint = 460; group.setLayoutData(groupData); String tip = Messages.getString("preference.EquivalentPage.equiImgLbl"); HsImageLabel equiImgLbl = new HsImageLabel(tip, Activator.getImageDescriptor(ImageConstant.PREFERENCE_FA_equivalent)); equiCmp = equiImgLbl.createControl(group); equiCmp.setLayout(new GridLayout()); equiCmp.setLayoutData(new GridData(GridData.FILL_BOTH)); equiImgLbl.computeSize(); // 设置重复文本段的加权系统 createRepeatCmp(); // 内部匹配加权系数 createEqui(equiCmp); createMatchEqui(preferenceStore.getString(QAConstant.FA_PREF_equivalent)); // scroll.setSize(scroll.computeSize(SWT.DEFAULT, SWT.DEFAULT)); return parent; }
Example 15
Source File: JointDataSetPage.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * create left composite for page * * @param composite */ private void createLeftGroup( Composite composite ) { leftGroup = new Group( composite, SWT.NONE ); leftGroup.setLayout( new FormLayout( ) ); leftGroup.setLayoutData( new GridData( GridData.FILL_BOTH ) ); FormData data = new FormData( ); data.top = new FormAttachment( 0, 5 ); data.left = new FormAttachment( 0, 5 ); data.right = new FormAttachment( 100, -5 ); data.bottom = new FormAttachment( 10, -5 ); leftDataSetChooser = new ComboViewer( leftGroup, SWT.DROP_DOWN | SWT.READ_ONLY ); leftDataSetChooser.getCombo( ).setLayoutData( data ); DataSetComboProvider provider = new DataSetComboProvider( ); leftDataSetChooser.setContentProvider( provider ); leftDataSetChooser.setLabelProvider( provider ); leftDataSetChooser.setInput( dataSetList ); leftDataSetChooser.addSelectionChangedListener( this ); data = new FormData( ); data.top = new FormAttachment( leftDataSetChooser.getCombo( ), 10 ); data.left = new FormAttachment( 0, 5 ); data.right = new FormAttachment( 100, -5 ); data.bottom = new FormAttachment( 100, -5 ); leftColumnList = new ListViewer( leftGroup, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER ); leftColumnList.getControl( ).setLayoutData( data ); ColumnProvider colProvider = new ColumnProvider( ); leftColumnList.setContentProvider( colProvider ); leftColumnList.setLabelProvider( colProvider ); leftColumnList.addSelectionChangedListener( this ); }
Example 16
Source File: PromptSupportSnippet.java From nebula with Eclipse Public License 2.0 | 4 votes |
private static void createCombo(final Group group) { group.setLayout(new GridLayout(2, false)); group.setText("Combo widget"); final Label lbl0 = new Label(group, SWT.NONE); lbl0.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl0.setText("No prompt :"); final Combo combo0 = new Combo(group, SWT.BORDER); combo0.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); final Label lbl1 = new Label(group, SWT.NONE); lbl1.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl1.setText("Simple text prompt :"); final Combo combo1 = new Combo(group, SWT.BORDER); combo1.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); PromptSupport.setPrompt("Type anything you want", combo1); final Label lbl2 = new Label(group, SWT.NONE); lbl2.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl2.setText("Other style (bold) :"); final Combo combo2 = new Combo(group, SWT.BORDER); combo2.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); PromptSupport.setPrompt("Type anything you want in bold", combo2); PromptSupport.setFontStyle(SWT.BOLD, combo2); final Label lbl3 = new Label(group, SWT.NONE); lbl3.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl3.setText("Behaviour highlight :"); final Combo combo3 = new Combo(group, SWT.BORDER); combo3.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); PromptSupport.setPrompt("Type anything you want", combo3); PromptSupport.setFocusBehavior(FocusBehavior.HIGHLIGHT_PROMPT, combo3); final Label lbl4 = new Label(group, SWT.NONE); lbl4.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl4.setText("Change colors :"); final Combo combo4 = new Combo(group, SWT.BORDER); combo4.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); PromptSupport.setPrompt("Type anything you want", combo4); PromptSupport.setForeground(combo4.getDisplay().getSystemColor(SWT.COLOR_YELLOW), combo4); PromptSupport.setBackground(combo4.getDisplay().getSystemColor(SWT.COLOR_BLACK), combo4); final Label lbl5 = new Label(group, SWT.NONE); lbl5.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); lbl5.setText("Change when widget is initialized :"); final Combo combo5 = new Combo(group, SWT.BORDER); combo5.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); combo5.setText("Remove what is typed..."); combo5.setBackground(combo4.getDisplay().getSystemColor(SWT.COLOR_BLACK)); combo5.setForeground(combo4.getDisplay().getSystemColor(SWT.COLOR_YELLOW)); PromptSupport.setPrompt("Type anything you want", combo5); PromptSupport.setForeground(combo4.getDisplay().getSystemColor(SWT.COLOR_DARK_BLUE), combo5); PromptSupport.setBackground(combo4.getDisplay().getSystemColor(SWT.COLOR_WHITE), combo5); }
Example 17
Source File: ChartMakerDialog.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
private void createSeriesCreatorGroup(GridData genericFillGridData) { GridLayout creatorLayout = new GridLayout(); creatorLayout.numColumns = 2; creatorLayout.makeColumnsEqualWidth = true; Group creatorGroup = new Group(fComposite, SWT.BORDER); creatorGroup.setText(Messages.ChartMakerDialog_SeriesCreator); creatorGroup.setLayout(creatorLayout); creatorGroup.setLayoutData(genericFillGridData); GridData creatorLabelGridData = new GridData(); creatorLabelGridData.horizontalAlignment = SWT.CENTER; creatorLabelGridData.verticalAlignment = SWT.BOTTOM; /* Top labels */ Label creatorLabelX = new Label(creatorGroup, SWT.NONE); creatorLabelX.setText(Messages.ChartMakerDialog_XAxis); creatorLabelX.setLayoutData(creatorLabelGridData); Label creatorLabelY = new Label(creatorGroup, SWT.NONE); creatorLabelY.setText(Messages.ChartMakerDialog_YAxis); creatorLabelY.setLayoutData(creatorLabelGridData); /* X axis table */ TableViewerColumn creatorXColumn = new TableViewerColumn(fSelectionXTable, SWT.NONE); creatorXColumn.getColumn().setResizable(false); creatorXColumn.setLabelProvider(new DataDescriptorLabelProvider()); TableColumnLayout creatorXLayout = new TableColumnLayout(); creatorXLayout.setColumnData(creatorXColumn.getColumn(), new ColumnWeightData(100)); Composite creatorXComposite = new Composite(creatorGroup, SWT.NONE); creatorXComposite.setLayout(creatorXLayout); creatorXComposite.setLayoutData(genericFillGridData); fSelectionXTable.getTable().setParent(creatorXComposite); fSelectionXTable.setContentProvider(ArrayContentProvider.getInstance()); fSelectionXTable.setInput(fDataProvider.getDataDescriptors()); fSelectionXTable.setFilters(new ViewerFilter[] { new CreatorXFilter() }); fSelectionXTable.addSelectionChangedListener(new CreatorXSelectedEvent()); /* Y axis table */ TableViewerColumn creatorYColumn = new TableViewerColumn(fSelectionYTable, SWT.NONE); creatorYColumn.getColumn().setResizable(false); creatorYColumn.setLabelProvider(new DataDescriptorLabelProvider()); TableColumnLayout creatorYLayout = new TableColumnLayout(); creatorYLayout.setColumnData(creatorYColumn.getColumn(), new ColumnWeightData(100)); Composite creatorYComposite = new Composite(creatorGroup, SWT.NONE); creatorYComposite.setLayout(creatorYLayout); creatorYComposite.setLayoutData(genericFillGridData); fSelectionYTable.getTable().setParent(creatorYComposite); fSelectionYTable.setContentProvider(ArrayContentProvider.getInstance()); fSelectionYTable.setInput(fDataProvider.getDataDescriptors()); fSelectionYTable.setFilters(new ViewerFilter[] { new CreatorYFilter() }); fSelectionYTable.addCheckStateListener(new CreatorYSelectedEvent()); /* Selected series warning */ fWarningLabel.setParent(creatorGroup); fWarningLabel.setText(Messages.ChartMakerDialog_SelectionRestrictionWarning); fWarningLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); fWarningLabel.setVisible(false); /* Add button */ GridData creatorButtonGridData = new GridData(); creatorButtonGridData.horizontalAlignment = SWT.RIGHT; creatorButtonGridData.widthHint = 30; creatorButtonGridData.heightHint = 30; Image addImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD); fAddButton.setParent(creatorGroup); fAddButton.setLayoutData(creatorButtonGridData); fAddButton.setImage(addImage); fAddButton.addListener(SWT.Selection, new AddButtonClickedEvent()); }
Example 18
Source File: BidiGUIUtility.java From birt with Eclipse Public License 1.0 | 4 votes |
public Group addBiDiFormatFrame( Composite mainComposite, String biDiFormatOption, BidiFormat bidiFormat ) { Group externalBiDiFormatFrame = new Group( mainComposite, SWT.NONE ); externalBiDiFormatFrame.setLayout( new GridLayout( ) ); GridData data = new GridData( GridData.FILL_HORIZONTAL ); data.horizontalSpan = 2; data.verticalSpan = 5; data.verticalIndent = 5; boolean isMetadataSetting = EXTERNAL_SYSTEM_METADATA_SETTING.equalsIgnoreCase( biDiFormatOption ); if ( isMetadataSetting ) { externalBiDiFormatFrame.setText( Messages.getString( "metadata.bidiframe.title" ) ); //$NON-NLS-1$ } else { externalBiDiFormatFrame.setText( Messages.getString( "content.bidiframe.title" ) ); //$NON-NLS-1$ } externalBiDiFormatFrame.setLayoutData( data ); externalBiDiFormatFrame.setEnabled( true ); GridData innerFrameGridData = new GridData( GridData.FILL_HORIZONTAL ); innerFrameGridData.grabExcessHorizontalSpace = true; innerFrameGridData.horizontalSpan = 1; innerFrameGridData.horizontalAlignment = GridData.FILL; innerFrameGridData.verticalIndent = 5; innerFrameGridData.minimumWidth = SWT.DEFAULT; GridLayout innerFrameLayout = new GridLayout( ); innerFrameLayout.numColumns = 2; innerFrameLayout.marginWidth = 5; innerFrameLayout.marginHeight = 10; // bidi_acgc added start GridData arabicGridData = new GridData( ); arabicGridData.grabExcessHorizontalSpace = true; arabicGridData.horizontalSpan = 2; arabicGridData.horizontalAlignment = GridData.FILL; arabicGridData.verticalIndent = 5; GridLayout arabicInnerFrameLayout = new GridLayout( ); arabicInnerFrameLayout.numColumns = 2; arabicInnerFrameLayout.marginWidth = 1; arabicInnerFrameLayout.marginHeight = 15; arabicInnerFrameLayout.horizontalSpacing = 1; // bidi_acgc added end externalBiDiFormatFrame.setLayout( innerFrameLayout ); // create ordering scheme setting field createOrderSchemaField( bidiFormat, externalBiDiFormatFrame, innerFrameGridData, isMetadataSetting ); // create text direction setting field createTextDirectionField( bidiFormat, externalBiDiFormatFrame, innerFrameGridData, isMetadataSetting ); // create system swap setting field createSystemSwapSettingField( bidiFormat, externalBiDiFormatFrame, innerFrameGridData, isMetadataSetting ); createContentSettingArea( bidiFormat, externalBiDiFormatFrame, innerFrameGridData, arabicGridData, arabicInnerFrameLayout, isMetadataSetting ); return externalBiDiFormatFrame; }
Example 19
Source File: MatchLocations.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private void createTypeMatchLocationsControls(Composite contents) { Group group= new Group(contents, SWT.NONE); group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 2)); group.setLayout(new GridLayout(1, false)); group.setText(SearchMessages.MatchLocations_declaration_group_label); createButton(group, SearchMessages.MatchLocations_imports_label, IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE); createButton(group, SearchMessages.MatchLocations_super_types_label, IJavaSearchConstants.SUPERTYPE_TYPE_REFERENCE); addSeparator(group); createButton(group, SearchMessages.MatchLocations_annotations_label , IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE); addSeparator(group); createButton(group, SearchMessages.MatchLocations_field_types_label, IJavaSearchConstants.FIELD_DECLARATION_TYPE_REFERENCE); createButton(group, SearchMessages.MatchLocations_local_types_label, IJavaSearchConstants.LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE); addSeparator(group); createButton(group, SearchMessages.MatchLocations_method_types_label, IJavaSearchConstants.RETURN_TYPE_REFERENCE); createButton(group, SearchMessages.MatchLocations_parameter_types_label, IJavaSearchConstants.PARAMETER_DECLARATION_TYPE_REFERENCE); createButton(group, SearchMessages.MatchLocations_thrown_exceptions_label, IJavaSearchConstants.THROWS_CLAUSE_TYPE_REFERENCE); Group ptGroup= new Group(contents, SWT.NONE); ptGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); ptGroup.setLayout(new GridLayout(1, false)); ptGroup.setText(SearchMessages.MatchLocations_in_parameterized_types_group_label); createButton(ptGroup, SearchMessages.MatchLocations_type_parameter_bounds_label, IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE); createButton(ptGroup, SearchMessages.MatchLocations_wildcard_bounds_label, IJavaSearchConstants.WILDCARD_BOUND_TYPE_REFERENCE); createButton(ptGroup, SearchMessages.MatchLocations_type_arguments_label, IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE); Group statementGroup= new Group(contents, SWT.NONE); statementGroup.setLayoutData(new GridData(SWT.FILL, SWT.END, true, false)); statementGroup.setLayout(new GridLayout(1, false)); statementGroup.setText(SearchMessages.MatchLocations_expression_group_label); createButton(statementGroup, SearchMessages.MatchLocations_casts_label, IJavaSearchConstants.CAST_TYPE_REFERENCE); createButton(statementGroup, SearchMessages.MatchLocations_catch_clauses_label, IJavaSearchConstants.CATCH_TYPE_REFERENCE); addSeparator(statementGroup); createButton(statementGroup, SearchMessages.MatchLocations_class_instance_label, IJavaSearchConstants.CLASS_INSTANCE_CREATION_TYPE_REFERENCE); createButton(statementGroup, SearchMessages.MatchLocations_instanceof_label, IJavaSearchConstants.INSTANCEOF_TYPE_REFERENCE); }
Example 20
Source File: ViewerConfigDialog.java From texlipse with Eclipse Public License 1.0 | 4 votes |
public DDEGroup(Composite parent, String name, String toolTip) { super(parent, SWT.NONE); setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); ((GridData)getLayoutData()).horizontalSpan = 2; setLayout( new GridLayout()); Group group = new Group(this, SWT.SHADOW_IN); group.setText(name); group.setToolTipText(toolTip); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setLayout(new GridLayout(4, false)); Label ddeCommandLabel = new Label(group, SWT.LEFT); ddeCommandLabel.setText(TexlipsePlugin.getResourceString("preferenceViewerDDECommandLabel")); ddeCommandLabel.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDECommandTooltip")); ddeCommandLabel.setLayoutData(new GridData()); command = new Text(group, SWT.SINGLE | SWT.BORDER); command.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDECommandTooltip")); command.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); ((GridData) command.getLayoutData()).horizontalSpan = 3; Label ddeServerLabel = new Label(group, SWT.LEFT); ddeServerLabel.setText(TexlipsePlugin.getResourceString("preferenceViewerDDEServerLabel")); ddeServerLabel.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDEServerTooltip")); ddeServerLabel.setLayoutData(new GridData()); server = new Text(group, SWT.SINGLE | SWT.BORDER); server.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDEServerTooltip")); server.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label ddeTopicLabel = new Label(group, SWT.LEFT); ddeTopicLabel.setText(TexlipsePlugin.getResourceString("preferenceViewerDDETopicLabel")); ddeTopicLabel.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDETopicTooltip")); ddeTopicLabel.setLayoutData(new GridData()); topic = new Text(group, SWT.SINGLE | SWT.BORDER); topic.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerDDETopicTooltip")); topic.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); setVisible(false); }