/** * Create the export options specification widgets. * */ @Override protected void createOptionsGroupButtons(Group optionsGroup) { Font font = optionsGroup.getFont(); optionsGroup.setLayout(new GridLayout(2, true)); Composite left = new Composite(optionsGroup, SWT.NONE); left.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false)); left.setLayout(new GridLayout(1, true)); createFileFormatOptions(left, font); // compress... checkbox compressContentsCheckbox = new Button(left, SWT.CHECK | SWT.LEFT); compressContentsCheckbox.setText(DataTransferMessages.ZipExport_compressContents); compressContentsCheckbox.setFont(font); createResolveLinkedResources(left, font); Composite right = new Composite(optionsGroup, SWT.NONE); right.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false)); right.setLayout(new GridLayout(1, true)); createDirectoryStructureOptions(right, font); // initial setup createDirectoryStructureButton.setSelection(true); createSelectionOnlyButton.setSelection(false); compressContentsCheckbox.setSelection(true); }
/** * Create the buttons in the options group. */ @Override protected void createOptionsGroupButtons(Group optionsGroup) { Font font = optionsGroup.getFont(); createOverwriteExisting(optionsGroup, font); createDirectoryStructureOptions(optionsGroup, font); createResolveLinkedResources(optionsGroup, font); }
overwriteExistingResourcesCheckbox.setFont(optionsGroup.getFont()); overwriteExistingResourcesCheckbox.setText(DataTransferMessages.FileImport_overwriteExisting); createTopLevelFolderCheckbox.setFont(optionsGroup.getFont()); createTopLevelFolderCheckbox.setText(DataTransferMessages.FileImport_createTopLevel); createTopLevelFolderCheckbox.setSelection(false); if (!ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) { advancedButton= new Button(optionsGroup, SWT.PUSH); advancedButton.setFont(optionsGroup.getFont()); advancedButton.setText(IDEWorkbenchMessages.showAdvanced); GridData data= setButtonLayoutData(advancedButton);
@Override public Point computeSize( int wHint, int hHint, boolean changed ) { checkWidget(); Point result = super.computeSize( wHint, hHint, changed ); int length = text.length(); if( length != 0 ) { Font font = getFont(); Point stringExtent = TextSizeUtil.stringExtent( font, text ); BoxDimensions headTrimmings = getThemeAdapter().getHeaderTrimmingSize( this ); int headerWidth = stringExtent.x + headTrimmings.left + headTrimmings.right; result.x = Math.max( result.x, headerWidth ); } return result; }
/** * Returns the size of the trimming of the given group control not including * the control's border size. */ public BoxDimensions getTrimmingSize( Group group ) { BoxDimensions margin = getFrameMargin( group ); BoxDimensions padding = getFramePadding( group ); BoxDimensions frameWidth = getCssBorder( "Group-Frame", group ); int top = margin.top + padding.top + frameWidth.top; top = Math.max( top, TextSizeUtil.getCharHeight( group.getFont() ) ); int right = margin.right + padding.right + frameWidth.right; int bottom = margin.bottom + padding.bottom + frameWidth.bottom; int left = margin.left + padding.left + frameWidth.left; return new BoxDimensions( top, right, bottom, left ); }
Composite spacer = SWTFactory.createComposite(group, group.getFont(), 1, 1, GridData.FILL_HORIZONTAL); FieldEditor edit = new BooleanFieldEditor(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED, DebugPreferencesMessages.LaunchingPreferencePage_33, SWT.NONE, spacer); fFieldEditors.add(edit);
Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.CommonTab_4, 5, 2, GridData.FILL_HORIZONTAL); createInputCaptureComponent(group); Composite comp = SWTFactory.createComposite(group, group.getFont(), 5, 5, GridData.FILL_BOTH, 0, 0); fFileOutput = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_6); fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));
public Control createControl(Composite composite) { fGroup= new Group(composite, SWT.NONE); fGroup.setFont(composite.getFont()); fGroup.setLayout(initGridLayout(new GridLayout(2, false), true)); fGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_title); fUseEEJRE.doFillIntoGrid(fGroup, 1); Combo eeComboControl= fEECombo.getComboControl(fGroup); eeComboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); fUseProjectJRE.doFillIntoGrid(fGroup, 1); Combo comboControl= fJRECombo.getComboControl(fGroup); comboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); fUseDefaultJRE.doFillIntoGrid(fGroup, 1); fPreferenceLink= new Link(fGroup, SWT.NONE); fPreferenceLink.setFont(fGroup.getFont()); fPreferenceLink.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_link_description); fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); fPreferenceLink.addSelectionListener(this); updateEnableState(); return fGroup; }
public Control createControl(Composite composite) { fGroup= new Group(composite, SWT.NONE); fGroup.setFont(composite.getFont()); fGroup.setLayout(initGridLayout(new GridLayout(2, false), true)); fGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_title); fUseEEJRE.doFillIntoGrid(fGroup, 1); Combo eeComboControl= fEECombo.getComboControl(fGroup); eeComboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); fUseProjectJRE.doFillIntoGrid(fGroup, 1); Combo comboControl= fJRECombo.getComboControl(fGroup); comboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); fUseDefaultJRE.doFillIntoGrid(fGroup, 1); fPreferenceLink= new Link(fGroup, SWT.NONE); fPreferenceLink.setFont(fGroup.getFont()); fPreferenceLink.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_link_description); fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); fPreferenceLink.addSelectionListener(this); updateEnableState(); return fGroup; }
@SuppressWarnings("synthetic-access") public Control createControl(Composite composite) { this.group = new Group(composite, SWT.NONE); this.group.setFont(composite.getFont()); this.group.setLayout(initGridLayout(new GridLayout(2, false), true)); this.group.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_title); this.useEEJRE.doFillIntoGrid(this.group, 1); final Combo eeComboControl = this.eeCombo.getComboControl(this.group); eeComboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); this.useProjectJRE.doFillIntoGrid(this.group, 1); final Combo comboControl = this.jreCombo.getComboControl(this.group); comboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); this.useDefaultJRE.doFillIntoGrid(this.group, 1); this.preferenceLink = new Link(this.group, SWT.NONE); this.preferenceLink.setFont(this.group.getFont()); this.preferenceLink.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_link_description); this.preferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); this.preferenceLink.addSelectionListener(this); updateEnableState(); return this.group; }
textTriggerSequence.setFont(groupKeySequence.getFont()); gridData = new GridData(); gridData.horizontalSpan = 2;
fPreferenceLink.setFont(fGroup.getFont()); fPreferenceLink.setText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_link_description); fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
fCodeGroup.setText(DebugUIMessages.EditLogicalStructureDialog_7); Composite attributeNameContainer = SWTFactory.createComposite(fCodeGroup, fCodeGroup.getFont(), 2, 1, GridData.FILL_HORIZONTAL); ((GridLayout)attributeNameContainer.getLayout()).marginWidth = 0;
Composite space = SWTFactory.createComposite(group, group.getFont(), 1, 1, GridData.FILL_HORIZONTAL); int minValue; Preferences coreStore= JDIDebugModel.getPreferences();