private Control createUI_60_HrZone(final Composite parent) { final Composite container = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(container); GridLayoutFactory.swtDefaults().extendedMargins(5, 5, 10, 5).numColumns(1).applyTo(container); { final PreferenceLinkArea prefLink = new PreferenceLinkArea( container, SWT.NONE, PrefPagePeople.ID, Messages.Compute_HrZone_Link, (IWorkbenchPreferenceContainer) getContainer(), new PrefPagePeopleData(PrefPagePeople.PREF_DATA_SELECT_HR_ZONES, null)); GridDataFactory .fillDefaults()// .grab(true, false) .hint(DEFAULT_DESCRIPTION_WIDTH, SWT.DEFAULT) .applyTo(prefLink.getControl()); } return container; }
private void createLinkArea( Composite parent ) { IPreferenceNode node = getPreferenceNode( WBROWSER_PAGE_ID ); if ( node != null ) { PreferenceLinkArea linkArea = new PreferenceLinkArea( parent, SWT.WRAP, WBROWSER_PAGE_ID, Messages.getString( "designer.preview.preference.browser.extbrowser.link" ), //$NON-NLS-1$ (IWorkbenchPreferenceContainer) getContainer( ), null ); GridData data = new GridData( GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL ); linkArea.getControl( ).setLayoutData( data ); } }
private void addRelatedLink(Composite parent, String pageId, String message) { PreferenceLinkArea contentTypeArea = new PreferenceLinkArea(parent, SWT.NONE, pageId, message, (IWorkbenchPreferenceContainer) getContainer(), null); GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); contentTypeArea.getControl().setLayoutData(data); }
protected void createPrefLink(Composite composite, String message, final String prefPageId, final Object data) { PreferenceLinkArea area = new PreferenceLinkArea(composite, SWT.NONE, prefPageId, message, getPreferenceContainer(), data); area.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); }
private void createLink(final Composite parent, final String text, String target) { final PreferenceLinkArea link = new PreferenceLinkArea(parent, SWT.NONE, target, text, (IWorkbenchPreferenceContainer) getContainer(), null); link.getControl().setLayoutData(new GridData()); }
public static PreferenceLinkArea createPreferenceLink(IWorkbenchPreferenceContainer container, Composite parent, String pageId, String text) { final PreferenceLinkArea area = new PreferenceLinkArea(parent, SWT.NONE, pageId, text, container, null); return area; }