/** * Create Network group * * @param parent parent composite */ @SuppressWarnings("unchecked") private void createNetworkGroup(Composite parent) { // Makes the network preferences dialog manager PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager(); IPreferenceNode networkNode = null; for (IPreferenceNode node : (List<IPreferenceNode>) manager.getElements(PreferenceManager.PRE_ORDER)) { if (node.getId().equals(PROXY_PREFERENCE_PAGE_ID)) { networkNode = node; break; } } prefMan = new PreferenceManager(); if (networkNode != null) { prefMan.addToRoot(networkNode); } Link downloadText = new Link(parent, SWT.WRAP); downloadText.addSelectionListener( new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { // Do nothing } public void widgetSelected(SelectionEvent e) { openNetworkPreferencesPage(); } }); String linkText = Messages.bind(Messages.NetworkLinkText, Messages.NetworkLinkText, Messages.NetworkLinkLink); downloadText.setText(linkText); downloadText.update(); GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); downloadText.setLayoutData(gridData); }
private void setStatus(String text, Font font) { updateStatusLabel.setText(text); updateStatusLabel.setFont(font); updateStatusLabel.update(); }