Java Code Examples for org.eclipse.swt.widgets.Group#setText()
The following examples show how to use
org.eclipse.swt.widgets.Group#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: BibtexMergeDialog.java From slr-toolkit with Eclipse Public License 1.0 | 6 votes |
private void buildFilesPart(Composite container) { GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.horizontalSpan = 1; gridData.verticalSpan = 1; Group group = new Group(container, SWT.SHADOW_NONE); group.setText("Files to merge"); group.setLayout(new FillLayout()); group.setLayoutData(gridData); Label label = new Label(group, SWT.NONE); label.setText(mergeData.getResourceList().stream() .map(resource -> resource.getURI().toString() + ":\t" + resource.getContents().size() + " entries") .collect(Collectors.joining("\n"))); }
Example 2
Source File: ApplicationLayoutLegalPanel.java From XPagesExtensionLibrary with Apache License 2.0 | 6 votes |
@Override protected void createLeftContents(Composite parent) { super.createLeftContents(parent); // set up the data node, add listener to refresh tree in case "children" is edited // using right tree. ExtLibPanelUtil.initDataNode(parent, null, EXT_LIB_ATTR_CONFIGURATION); FacesRegistry reg = getExtraData().getDesignerProject().getFacesRegistry(); Default def = ExtLibRegistryUtil.getDefaultValue(reg, EXT_LIB_ATTR_CONFIGURATION, ConfigurationLegal.ATTR_LEGAL, String.valueOf(true)); createDCCheckboxComputed(ConfigurationLegal.ATTR_LEGAL, def.trueValue(), def.falseValue(), def.toBoolean(), "Show area for legal text", null).setLayoutData(createControlGDNoWidth(2)); // $NLX-ApplicationLayoutLegalPanel.Showareaforlegaltext-1$ // text was here... Composite p = getCurrentParent(); Group group = new Group(p, SWT.NONE); setCurrentParent(group); group.setLayout(createChildLayout(2)); group.setText("Legal"); // $NLX-ApplicationLayoutLegalPanel.Legal-1$ group.setLayoutData(createControlGDNoWidth(1)); new CommonConfigurationAttributesPanel(getExtraData(), getCurrentParent(), ATTR_LOGO, ATTR_LOGO_ALT, ATTR_LOGO_WIDTH, ATTR_LOGO_HEIGHT, ATTR_STYLE, ATTR_CLASS); setCurrentParent(p); }
Example 3
Source File: ModulaSearchPage.java From xds-ide with Eclipse Public License 1.0 | 6 votes |
private ArrayList<Button> createGroup(Composite parent, int columns, String groupLabel, String[] buttonLabels, int[] buttonData, int defaultSelected) { ArrayList<Button> buttons = new ArrayList<Button>(); Group group = new Group(parent, SWT.NONE); group.setLayout(new GridLayout(columns, true)); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText(groupLabel); for (int i = 0; i < buttonLabels.length; i++) { if (buttonLabels[i] != null) { Button b = new Button(group, SWT.RADIO); b.setData((Integer)buttonData[i]); b.setText(buttonLabels[i]); b.setSelection(i == defaultSelected); buttons.add(b); } else { new Label(group, SWT.NORMAL); // empty place } } return buttons; }
Example 4
Source File: SeriesLabelSheet.java From birt with Eclipse Public License 1.0 | 6 votes |
protected void createOutline( Composite cmpLeft, boolean bEnableUI ) { grpOutline = new Group( cmpLeft, SWT.NONE ); GridData gdGOutline = new GridData( GridData.FILL_HORIZONTAL ); grpOutline.setLayoutData( gdGOutline ); grpOutline.setText( Messages.getString( "LabelAttributesComposite.Lbl.Outline" ) ); //$NON-NLS-1$ grpOutline.setLayout( new FillLayout( ) ); grpOutline.setEnabled( bEnableUI ); int iStyles = LineAttributesComposite.ENABLE_WIDTH | LineAttributesComposite.ENABLE_STYLES | LineAttributesComposite.ENABLE_VISIBILITY | LineAttributesComposite.ENABLE_COLOR; iStyles |= getContext( ).getUIFactory( ).supportAutoUI( ) ? LineAttributesComposite.ENABLE_AUTO_COLOR : iStyles; liacOutline = new LineAttributesComposite( grpOutline, SWT.NONE, iStyles, getContext( ), getSeriesForProcessing( ).getLabel( ).getOutline( ), defSeries.getLabel( ).getOutline( ) ); liacOutline.addListener( this ); liacOutline.setAttributesEnabled( bEnableUI ); }
Example 5
Source File: FormatterConfigurationBlock.java From typescript.java with MIT License | 6 votes |
/** * Create editor options. * * @param parent */ private void createEditorOptions(Composite parent) { Group group = new Group(parent, SWT.NONE); group.setText(TypeScriptUIMessages.FormatterConfigurationBlock_editorOptions_group_label); GridLayout layout = new GridLayout(); layout.numColumns = 3; group.setLayout(layout); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Convert tabs to spaces addCheckBox(group, TypeScriptUIMessages.FormatterPreferencePage_editorOptions_convertTabsToSpaces, PREF_EDITOR_OPTIONS_CONVERT_TABS_TO_SPACES, new String[] { "true", "false" }, 0); // Indent size addTextField(group, TypeScriptUIMessages.FormatterPreferencePage_editorOptions_indentSize, PREF_EDITOR_OPTIONS_INDENT_SIZE, 0, 0); // Tab size addTextField(group, TypeScriptUIMessages.FormatterPreferencePage_editorOptions_tabSize, PREF_EDITOR_OPTIONS_TAB_SIZE, 0, 0); }
Example 6
Source File: NetworkPreferencePage.java From saros with GNU General Public License v2.0 | 6 votes |
private Group createStunServerGroup(Composite parent) { Group group = new Group(parent, SWT.NONE); group.setText(Messages.NetworkPreferencePage_stun_server); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; group.setLayout(gridLayout); group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); Label ipAddressLabel = new Label(group, SWT.CENTER); ipAddressLabel.setText(Messages.NetworkPreferencePage_adress); ipAddressLabel.setToolTipText(Messages.NetworkPreferencePage_adress_tooltip); stunIPAddressText = new Text(group, SWT.SINGLE | SWT.BORDER); stunIPAddressText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); Label portLabel = new Label(group, SWT.CENTER); portLabel.setText(Messages.NetworkPreferencePage_port); portLabel.setToolTipText(Messages.NetworkPreferencePage_port_tooltip); stunPortText = new Text(group, SWT.SINGLE | SWT.BORDER); stunPortText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); return group; }
Example 7
Source File: ExportTracePackageWizardPage.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
private void createOptionsGroup(Composite parent) { Group optionsGroup = new Group(parent, SWT.NONE); optionsGroup.setLayout(new RowLayout(SWT.VERTICAL)); optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); optionsGroup.setText(Messages.ExportTracePackageWizardPage_Options); SelectionAdapter listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { updateWithFilePathSelection(); } }; fZipFormatButton = new Button(optionsGroup, SWT.RADIO | SWT.LEFT); fZipFormatButton.setText(Messages.ExportTracePackageWizardPage_SaveInZipFormat); fZipFormatButton.setSelection(true); fZipFormatButton.addSelectionListener(listener); fTargzFormatButton = new Button(optionsGroup, SWT.RADIO | SWT.LEFT); fTargzFormatButton.setText(Messages.ExportTracePackageWizardPage_SaveInTarFormat); fTargzFormatButton.setSelection(false); fTargzFormatButton.addSelectionListener(listener); fCompressContentsCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT); fCompressContentsCheckbox.setText(Messages.ExportTracePackageWizardPage_CompressContents); fCompressContentsCheckbox.setSelection(true); fCompressContentsCheckbox.addSelectionListener(listener); }
Example 8
Source File: KontaktExtDialog.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
public ExtInfoTable(Composite parent, String[] f) { super(parent, SWT.NONE); fieldDefinitions = f; Group params = new Group(parent, SWT.NONE); params.setText(Messages.KontaktExtDialog_pleaseENterDetails); params.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false)); params.setLayout(new GridLayout(2, false)); savedParent = params; }
Example 9
Source File: IoPreferencePage.java From olca-app with Mozilla Public License 2.0 | 5 votes |
private void createIlcdOtherContents(Composite parent) { Group section = new Group(parent, SWT.SHADOW_OUT); section.setText(M.ILCDOtherSettings); ComboFieldEditor langEditor = new ComboFieldEditor( IoPreference.ILCD_LANG, M.Language, getLanguages(), section); addField(langEditor); UI.gridLayout(section, 2); UI.gridData(section, true, false); }
Example 10
Source File: PluginConfigManageDialog.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * 创建快捷键面板 * @param tparent * ; */ private void createShortcutKeyGoup(Composite tparent) { Group group = new Group(tparent, SWT.None); group.setText(Messages.getString("dialog.PluginConfigManageDialog.group")); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(group); GridLayoutFactory.swtDefaults().numColumns(2).applyTo(group); Label keyLbl = new Label(group, SWT.NONE); keyLbl.setText(Messages.getString("dialog.PluginConfigManageDialog.keyLbl")); keyTxt = new Text(group, SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(keyTxt); fKeySequenceText = new KeySequenceText(keyTxt); fKeySequenceText.setKeyStrokeLimit(4); fKeySequenceText.addPropertyChangeListener(new IPropertyChangeListener() { public final void propertyChange(final PropertyChangeEvent event) { if (!event.getOldValue().equals(event.getNewValue())) { final KeySequence keySequence = fKeySequenceText.getKeySequence(); if (!keySequence.isComplete()) { return; } keyTxt.setSelection(keyTxt.getTextLimit()); } } }); }
Example 11
Source File: PatternImageEditorDialog.java From birt with Eclipse Public License 1.0 | 5 votes |
private void createPatternGroup( Composite parent ) { Group group = new Group( parent, SWT.NONE ); group.setText( Messages.getString( "PatternImageEditorDialog.Group.Pattern" ) ); //$NON-NLS-1$ group.setLayout( new GridLayout( ) ); new BitmapGallery( group, context ); }
Example 12
Source File: OpenNameAndVersionForDiagramDialog.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createProcessesNameAndVersion(final Composite res, final DataBindingContext dbc) { final Group poolGroup = new Group(res, SWT.NONE); poolGroup.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).grab(true, false).create()); poolGroup.setLayout(GridLayoutFactory.fillDefaults().margins(10, 10).create()); poolGroup.setText(Messages.pools); for (final ProcessesNameVersion pnv : pools) { createPNVComposite(poolGroup, pnv, dbc); } }
Example 13
Source File: ProjectSettingLanguagePage.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * Create contents of the preference page. * @param parent */ @Override public Control createContents(Composite parent) { Composite container = new Composite(parent, SWT.NULL); container.setLayout(new GridLayout(1, false)); // source language control Group sourceLanguageGrp = new Group(container, SWT.NONE); sourceLanguageGrp.setLayout(new GridLayout(1, false)); sourceLanguageGrp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); sourceLanguageGrp.setText(Messages.getString("projectsetting.ProjectSettingLanguagePage.sourceLanguageGrp")); srcLangComboViewer = new TableComboViewer(sourceLanguageGrp, SWT.READ_ONLY | SWT.BORDER); TableCombo tableCombo = srcLangComboViewer.getTableCombo(); // set options. tableCombo.setShowTableLines(false); tableCombo.setShowTableHeader(false); tableCombo.setDisplayColumnIndex(-1); tableCombo.setShowImageWithinSelection(true); tableCombo.setShowColorWithinSelection(false); tableCombo.setShowFontWithinSelection(false); tableCombo.setVisibleItemCount(20); srcLangComboViewer.getTableCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); srcLangComboViewer.setLabelProvider(new LanguageLabelProvider()); srcLangComboViewer.setContentProvider(new ArrayContentProvider()); srcLangComboViewer.setInput(languages); srcLangComboViewer.setComparer(elementComparer); initDataBindings(); // end source language // target language control Group targetLanguageGrp = new Group(container, SWT.NONE); targetLanguageGrp.setLayout(new GridLayout(3, false)); targetLanguageGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1)); targetLanguageGrp.setText(Messages.getString("projectsetting.ProjectSettingLanguagePage.targetLanguageGrp")); targetLangControl.createControl(targetLanguageGrp); parent.computeSize(SWT.DEFAULT, SWT.DEFAULT); return container; }
Example 14
Source File: TestDataDialog.java From ermasterr with Apache License 2.0 | 5 votes |
private void createSelectedTableTable(final Composite composite) { final GridData gridData = new GridData(); gridData.verticalSpan = 2; gridData.grabExcessVerticalSpace = true; gridData.verticalAlignment = GridData.FILL; final GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; final Group group = new Group(composite, SWT.NONE); group.setText(ResourceString.getResourceString("label.testdata.table.list")); group.setLayout(gridLayout); group.setLayoutData(gridData); final GridData tableGridData = new GridData(); tableGridData.grabExcessVerticalSpace = true; tableGridData.verticalAlignment = GridData.FILL; tableGridData.widthHint = 300; tableGridData.verticalSpan = 2; selectedTableTable = new Table(group, SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI); selectedTableTable.setHeaderVisible(false); selectedTableTable.setLayoutData(tableGridData); selectedTableTable.setLinesVisible(false); final TableColumn tableColumn = new TableColumn(selectedTableTable, SWT.CENTER); tableColumn.setWidth(200); tableColumn.setText(ResourceString.getResourceString("label.testdata.table.name")); final TableColumn numColumn = new TableColumn(selectedTableTable, SWT.CENTER); numColumn.setWidth(80); numColumn.setText(ResourceString.getResourceString("label.testdata.table.test.num")); }
Example 15
Source File: RuleDialog.java From LogViewer with Eclipse Public License 2.0 | 4 votes |
public Control createDialogArea(Composite parent) { Composite pageComponent = new Composite(parent,SWT.NULL); GridLayout layout0 = new GridLayout(); layout0.numColumns = 1; layout0.makeColumnsEqualWidth = true; layout0.marginWidth = 5; layout0.marginHeight = 4; pageComponent.setLayout(layout0); GridData data0 = new GridData(GridData.FILL_HORIZONTAL); pageComponent.setLayoutData(data0); pageComponent.setFont(parent.getFont()); // define group1 Group pageGroup1 = new Group(pageComponent, SWT.SHADOW_ETCHED_IN); pageGroup1.setText(LogViewerPlugin.getResourceString("preferences.ruleseditor.dialog.lineselection.title")); GridLayout layout1 = new GridLayout(); layout1.numColumns = 2; layout1.makeColumnsEqualWidth = true; layout1.marginWidth = 5; layout1.marginHeight = 4; pageGroup1.setLayout(layout1); GridData data1 = new GridData(GridData.FILL_HORIZONTAL); pageGroup1.setLayoutData(data1); pageGroup1.setFont(parent.getFont()); // create priority valueText // createPriorityText(pageComponent); // create activity checkbox createEnabledCheckBox(pageGroup1); // create rule type combo createRuleCombo(pageGroup1); // create input valueText field createValueTextField(pageGroup1); // create case insensitive checkbox createCaseInsensitiveCheckBox(pageGroup1); // create match mode combo createMatchModeCombo(pageGroup1); // define group2 Group pageGroup2 = new Group(pageComponent, SWT.SHADOW_ETCHED_IN); pageGroup2.setText(LogViewerPlugin.getResourceString("preferences.ruleseditor.dialog.actions.title")); GridLayout layout2 = new GridLayout(); layout2.numColumns = 1; layout2.makeColumnsEqualWidth = true; layout2.marginWidth = 5; layout2.marginHeight = 4; pageGroup2.setLayout(layout2); GridData data2 = new GridData(GridData.FILL_HORIZONTAL); pageGroup2.setLayoutData(data2); pageGroup2.setFont(parent.getFont()); // define group2.1 Group pageGroup21 = new Group(pageGroup2, SWT.SHADOW_ETCHED_IN); pageGroup21.setText(LogViewerPlugin.getResourceString("preferences.ruleseditor.dialog.highlighting.title")); GridLayout layout21 = new GridLayout(); layout21.numColumns = 2; layout21.makeColumnsEqualWidth = true; layout21.marginWidth = 5; layout21.marginHeight = 4; pageGroup21.setLayout(layout21); GridData data21 = new GridData(GridData.FILL_HORIZONTAL); pageGroup21.setLayoutData(data21); pageGroup21.setFont(parent.getFont()); // enabled createColoringEnabledCheckBox(pageGroup21); // create background color button createBackgroundColorSelector(pageGroup21); // create foreground color button createForegroundColorSelector(pageGroup21); // define group2.2 /* Group pageGroup22 = new Group(pageGroup2, SWT.SHADOW_ETCHED_IN); pageGroup22.setText("Filter"); GridLayout layout22 = new GridLayout(); layout22.numColumns = 2; layout22.makeColumnsEqualWidth = true; layout22.marginWidth = 5; layout22.marginHeight = 4; pageGroup22.setLayout(layout22); GridData data22 = new GridData(GridData.FILL_HORIZONTAL); pageGroup22.setLayoutData(data22); pageGroup22.setFont(parent.getFont()); */ //if (edit) { // send event to refresh matchMode Event event = new Event(); event.item = null; ruleTypeCombo.notifyListeners(SWT.Selection, event); //} return pageComponent; }
Example 16
Source File: TBDatabasePage.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
@Override protected Control createContents(Composite parent) { // TODO Auto-generated method stub Composite tparent = new Composite(parent, SWT.NONE); tparent.setLayout(new GridLayout()); tparent.setLayoutData(new GridData(GridData.FILL_BOTH)); // 添加术语匹配是否忽略大小写 { Group commonGroup1 = new Group(tparent, SWT.NONE); commonGroup1.setLayout(new GridLayout()); commonGroup1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); commonGroup1.setText(Messages.getString("preference.TBDatabasePage.commontitle")); HsImageLabel imageLbale1 = new HsImageLabel(Messages.getString("preference.TBDatabasePage.commonsearchterm"), Activator.getImageDescriptor("images/preference/tb/tb_update_32.png")); Composite comp1 = imageLbale1.createControl(commonGroup1); btnCaseSensitive = new Button(comp1, SWT.CHECK); btnCaseSensitive.setText(Messages.getString("preference.TBDatabasePage.commonCasesensitive")); btnCaseSensitive.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); imageLbale1.computeSize(); } Group commonGroup = new Group(tparent, SWT.NONE); commonGroup.setLayout(new GridLayout()); commonGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); commonGroup.setText(Messages.getString("preference.TBDatabasePage.commonGroup")); HsImageLabel imageLbale = new HsImageLabel(Messages.getString("preference.TBDatabasePage.imageLbale"), Activator.getImageDescriptor("images/preference/tb/tb_update_32.png")); Composite comp = imageLbale.createControl(commonGroup); btnAlwaysAdd = new Button(comp, SWT.RADIO); btnAlwaysAdd.setText(Messages.getString("preference.TBDatabasePage.btnAlwaysAdd")); btnAlwaysAdd.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btnRepeatOverwrite = new Button(comp, SWT.RADIO); btnRepeatOverwrite.setText(Messages.getString("preference.TBDatabasePage.btnRepeatOverwrite")); btnRepeatOverwrite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btnRepeatMerge = new Button(comp, SWT.RADIO); btnRepeatMerge.setText(Messages.getString("preference.TBDatabasePage.btnRepeatMerge")); btnRepeatMerge.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btnRepeatIgnore = new Button(comp, SWT.RADIO); btnRepeatIgnore.setText(Messages.getString("preference.TBDatabasePage.btnRepeatIgnore")); btnRepeatIgnore.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parent.pack(); imageLbale.computeSize(); int intUpdateTB = preferenceStore.getInt(TBPreferenceConstants.TB_UPDATE); setInitValues(intUpdateTB); return parent; }
Example 17
Source File: BirtWebProjectWizardConfigurationPage.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * Create Configuration Page * * @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl( Composite parent ) { Composite composite = new Composite( parent, SWT.NULL ); composite.setFont( parent.getFont( ) ); initializeDialogUnits( parent ); composite.setLayout( new GridLayout( ) ); composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); // create folder configuration group Group paths = new Group( composite, SWT.NULL ); paths.setLayout( new GridLayout( ) ); paths.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); paths.setText( BirtWTPMessages.BIRTConfiguration_group_paths ); paths.setEnabled( true ); // Initialize UI Utility UIUtil uit = new UIUtil( properties ); // create resource folder setting group this.txtResourceFolder = uit.createResourceFolderGroup( paths ); // create working folder setting group this.txtWorkingFolder = uit.createWorkingFolderGroup( paths ); // create document folder setting group this.txtDocumentFolder = uit.createDocumentFolderGroup( paths ); // create image folder setting group this.txtImageFolder = uit.createImageFolderGroup( paths ); // create scriptlib folder setting group this.txtScriptlibFolder = uit.createScriptLibFolderGroup( paths ); // create log folder setting group this.txtLogFolder = uit.createLogFolderGroup( paths ); // create other configuration group Group others = new Group( composite, SWT.NULL ); others.setLayout( new GridLayout( ) ); others.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); others.setText( BirtWTPMessages.BIRTConfiguration_group_others ); others.setEnabled( true ); // create ifaccess only setting group this.btAccessOnly = uit.createAccessOnlyGroup( others ); // create log level setting group this.cbLogLevel = uit.createLogLevelGroup( others ); // create print server setting group this.cbPrintServer = uit.createPrintServerGroup( others ); // create max rows setting group this.txtMaxRows = uit.createMaxRowsGroup( others ); // create max cube fetching row levels setting group this.txtMaxRowLevels = uit.createMaxRowLevelsGroup( others ); // create max cube fetching column levels setting group this.txtMaxColumnLevels = uit.createMaxColumnLevelsGroup( others ); // create max cube memory size setting group this.txtCubeMemorySize = uit.createCubeMemorySizeGroup( others ); // initialize page properties map initializeProperties( ); setControl( composite ); IWizardContainer container = getContainer( ); if ( container instanceof IPageChangeProvider ) { IPageChangeProvider pageChangeProvider = (IPageChangeProvider) container; pageChangeProvider .addPageChangedListener( new WizardPageChangedListener( this ) ); } }
Example 18
Source File: TopicSelection.java From hop with Apache License 2.0 | 4 votes |
private void layoutUI() { FormLayout topicSelectionLayout = new FormLayout(); this.setLayout( topicSelectionLayout ); wTopicGroup = new Group( this, SWT.SHADOW_ETCHED_IN ); props.setLook( wTopicGroup ); wTopicGroup.setText( topicGroupLabel ); FormLayout topicGroupLayout = new FormLayout(); topicGroupLayout.marginHeight = 15; topicGroupLayout.marginWidth = 15; wTopicGroup.setLayout( topicGroupLayout ); FormData fdTopicGroup = new FormData(); fdTopicGroup.left = new FormAttachment( 0, 0 ); fdTopicGroup.top = new FormAttachment( 0, 10 ); fdTopicGroup.right = new FormAttachment( 100, 0 ); fdTopicGroup.bottom = new FormAttachment( 100, 0 ); wTopicGroup.setLayoutData( fdTopicGroup ); wTopicFromText = new Button( wTopicGroup, SWT.RADIO ); wTopicFromField = new Button( wTopicGroup, SWT.RADIO ); props.setLook( wTopicFromText ); props.setLook( wTopicFromField ); SelectionAdapter selectionListener = new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent selectionEvent ) { super.widgetSelected( selectionEvent ); setTopicWidgetVisibility( wTopicFromField ); } }; wTopicFromField.addSelectionListener( selectionListener ); wTopicFromText.addSelectionListener( selectionListener ); wTopicFromField.setSelection( topicInField ); wTopicFromText.setSelection( !topicInField ); wTopicFromText.setText( textTopicRadioLabel ); wTopicFromField.setText( fieldTopicRadioLabel ); FormData specifyTopicLayout = new FormData(); specifyTopicLayout.left = new FormAttachment( 0, 0 ); specifyTopicLayout.top = new FormAttachment( 0, 0 ); wTopicFromText.setLayoutData( specifyTopicLayout ); FormData fdTopicComesFromField = new FormData(); fdTopicComesFromField.left = new FormAttachment( 0, 0 ); fdTopicComesFromField.top = new FormAttachment( wTopicFromText, 5 ); wTopicFromField.setLayoutData( fdTopicComesFromField ); wTopicFromField.addSelectionListener( selectionListener ); wTopicFromText.addSelectionListener( selectionListener ); Label separator = new Label( wTopicGroup, SWT.SEPARATOR | SWT.VERTICAL ); FormData fdSeparator = new FormData(); fdSeparator.top = new FormAttachment( 0, 0 ); fdSeparator.left = new FormAttachment( wTopicFromField, 15 ); fdSeparator.bottom = new FormAttachment( 100, 0 ); separator.setLayoutData( fdSeparator ); FormData fdTopicEntry = new FormData(); fdTopicEntry.top = new FormAttachment( 0, 0 ); fdTopicEntry.left = new FormAttachment( separator, 15 ); fdTopicEntry.right = new FormAttachment( 100, 0 ); wlTopic = new Label( wTopicGroup, SWT.LEFT ); wlTopic.setLayoutData( fdTopicEntry ); props.setLook( wlTopic ); FormData formData = new FormData(); formData.top = new FormAttachment( wlTopic, 5 ); formData.left = new FormAttachment( separator, 15 ); formData.right = new FormAttachment( 100, 0 ); wTopicText = new TextVar( pipelineMeta, wTopicGroup, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); wTopicField = createFieldDropDown( wTopicGroup, props, transformMeta, formData ); wTopicText.setLayoutData( formData ); wTopicField.setLayoutData( formData ); setTopicWidgetVisibility( wTopicFromField ); wTopicText.addModifyListener( lsMod ); wTopicField.addModifyListener( lsMod ); }
Example 19
Source File: ExportRTFDilaog.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
protected Control createDialogArea(Composite parent) { Composite tparent = (Composite) super.createDialogArea(parent); GridLayoutFactory.swtDefaults().extendedMargins(5, 5, 0, 0).numColumns(1).applyTo(tparent); GridDataFactory.fillDefaults().hint(600, 420).grab(true, true).applyTo(tparent); Group grpExport = new Group(tparent, SWT.None); grpExport.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); grpExport.setLayout(new GridLayout()); grpExport.setText(Messages.getString(Messages.DIALOG_EXPORT_GROUP)); HsImageLabel imageLabel = new HsImageLabel( Messages.getString(Messages.DIALOG_EXPORT_INFO), Activator.getImageDescriptor(RTFConstants.EXPORT_GROUP_IMAGE_PATH)); Composite cmp = imageLabel.createControl(grpExport); cmp.setLayout(new GridLayout()); Composite cmpTemp = (Composite) imageLabel.getControl(); cmpTemp.setLayoutData(new GridData(GridData.FILL_BOTH)); Composite cmpContent = new Composite(cmpTemp, SWT.None); cmpContent.setLayout(new GridLayout(3, false)); GridData data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 2; cmpContent.setLayoutData(data); new Label(cmpContent, SWT.None).setText(Messages.getString(Messages.DIALOG_EXPORT_XLIFF)); txtXLIFFPath = new Text(cmpContent, SWT.BORDER); txtXLIFFPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); txtXLIFFPath.setEditable(false); if (strXliffRelativePath != null) { txtXLIFFPath.setText(strXliffRelativePath); } btnBrowseXLIFF = new Button(cmpContent, SWT.None); btnBrowseXLIFF.setText(Messages.getString(Messages.DIALOG_EXPORT_XLIFF_BROWSE)); btnStatus = new Button(cmpContent, SWT.CHECK); btnStatus.setText(Messages.getString(Messages.DIALOG_EXPORT_STATUS)); btnStatus.setSelection(true); GridDataFactory.fillDefaults().span(3, 1).applyTo(btnStatus); btnComment = new Button(cmpContent, SWT.CHECK); btnComment.setText(Messages.getString(Messages.DIALOG_EXPORT_COMMENT)); GridDataFactory.fillDefaults().span(3, 1).applyTo(btnComment); Group groupFilter = new Group(tparent, SWT.None); groupFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); groupFilter.setLayout(new GridLayout(2, false)); groupFilter.setText(Messages.getString("dialog.ExportRTFDilaog.groupFilter")); btnExclude = new Button(groupFilter, SWT.RADIO); btnExclude.setText(Messages.getString("dialog.ExportRTFDilaog.btnExclude")); btnExclude.setSelection(true); btnOnlyExport = new Button(groupFilter, SWT.RADIO); btnOnlyExport.setText(Messages.getString("dialog.ExportRTFDilaog.btnOnlyExport")); Composite cmpFilter = new Composite(tparent, SWT.None); GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false).spacing(30, 5).applyTo(cmpFilter); cmpFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); groupExclude = new Group(cmpFilter, SWT.None); groupExclude.setLayout(new GridLayout()); groupExclude.setLayoutData(new GridData(GridData.FILL_BOTH)); groupExclude.setText(Messages.getString("dialog.ExportRTFDilaog.groupExclude")); btnExcludeLocked = new Button(groupExclude, SWT.CHECK); btnExcludeLocked.setText(Messages.getString("dialog.ExportRTFDilaog.btnExcludeLocked")); btnExcludeLocked.setSelection(true); btnExclude101 = new Button(groupExclude, SWT.CHECK); btnExclude101.setText(Messages.getString("dialog.ExportRTFDilaog.btnExclude101")); btnExclude100 = new Button(groupExclude, SWT.CHECK); btnExclude100.setText(Messages.getString("dialog.ExportRTFDilaog.btnExclude100")); groupOnlyExport = new Group(cmpFilter, SWT.None); groupOnlyExport.setLayoutData(new GridData(GridData.FILL_BOTH)); groupOnlyExport.setLayout(new GridLayout()); groupOnlyExport.setText(Messages.getString("dialog.ExportRTFDilaog.groupOnlyExport")); btnOnlyExportNote = new Button(groupOnlyExport, SWT.RADIO); btnOnlyExportNote.setText(Messages.getString("dialog.ExportRTFDilaog.btnOnlyExportNote")); btnOnlyExportNote.setSelection(true); btnOnlyExportNote.setEnabled(false); btnOnlyExportReview = new Button(groupOnlyExport, SWT.RADIO); btnOnlyExportReview.setText(Messages.getString("dialog.ExportRTFDilaog.btnOnlyExportReview")); btnOnlyExportReview.setEnabled(false); groupOnlyExport.setEnabled(false); Composite cmpRTF = new Composite(tparent, SWT.None); GridDataFactory.fillDefaults().applyTo(cmpRTF); cmpRTF.setLayout(new GridLayout(3, false)); new Label(cmpRTF, SWT.None).setText(Messages.getString(Messages.DIALOG_EXPORT_PATH_RTF)); txtRTFPath = new Text(cmpRTF, SWT.BORDER); txtRTFPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); txtRTFPath.setEditable(false); btnBrowseRTF = new Button(cmpRTF, SWT.None); btnBrowseRTF.setText(Messages.getString(Messages.DIALOG_EXPORT_RTF_BROWSE)); for (IProject project : root.getProjects()) { lstProject.add(project.getLocation().toOSString()); } initListener(); imageLabel.computeSize(); initRtfPath(); return parent; }
Example 20
Source File: PromptParameterDialog.java From birt with Eclipse Public License 1.0 | 4 votes |
private void createParameterGroup( Composite composite ) { final Group group2 = new Group( composite, SWT.NONE ); group2.setLayout( new GridLayout( ) ); group2.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true, 1, 8 ) );// GridData.FILL_BOTH)); group2.setText( Messages.getString( "PromptParameterDialog.parameterGroup.title" ) ); Label label1 = new Label( group2, SWT.NONE ); label1.setText( Messages.getString( "PromptParameterDialog.parameterGroup.label" ) ); TreeViewer viewer2 = new TreeViewer( group2, SWT.FULL_SELECTION ); Tree tableTree2 = viewer2.getTree( ); GridData gd = new GridData( GridData.FILL_BOTH ); tableTree2.setLayoutData( gd ); tableTree2.setHeaderVisible( true ); tableTree2.setLinesVisible( true ); TreeViewerColumn tvc21 = new TreeViewerColumn( viewer2, SWT.NONE ); tvc21.getColumn( ) .setText( Messages.getString( "PromptParameterDialog.parameterGroup.nameColumn" ) ); //$NON-NLS-1$ tvc21.getColumn( ).setWidth( 200 ); tvc21.setLabelProvider( new NameLabelProvider( selectedStatusMap ) ); tvc21.setEditingSupport( new ParameterEditingSupport( viewer2, selectedStatusMap ) ); TreeViewerColumn tvc22 = new TreeViewerColumn( viewer2, SWT.NONE ); tvc22.getColumn( ) .setText( Messages.getString( "PromptParameterDialog.parameterGroup.previousValue" ) ); //$NON-NLS-1$ tvc22.getColumn( ).setWidth( 200 ); tvc22.setLabelProvider( new PreviousValueLabelProvider( ) ); TreeViewerColumn tvc23 = new TreeViewerColumn( viewer2, SWT.NONE ); tvc23.getColumn( ) .setText( Messages.getString( "PromptParameterDialog.parameterGroup.revisedValue" ) ); //$NON-NLS-1$ tvc23.getColumn( ).setWidth( 200 ); tvc23.setLabelProvider( new RevisedValueLabelProvider( ) ); viewer2.setContentProvider( new ParameterContentProvider( ) ); viewer2.setInput( ( (IAmbiguousOption) input ).getAmbiguousParameters( ) ); viewer2.expandAll( ); }