Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 57323 Details for
Bug 154100
Platform level proxy settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
source code for proxy preference page
ProxyPreferencePage.java (text/plain), 5.55 KB, created by
Eugene Kuleshov
on 2007-01-23 02:14:01 EST
(
hide
)
Description:
source code for proxy preference page
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2007-01-23 02:14:01 EST
Size:
5.55 KB
patch
obsolete
> >package test.preferences; > >import org.eclipse.jface.preference.PreferencePage; >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.SashForm; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Control; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableColumn; >import org.eclipse.swt.widgets.TableItem; >import org.eclipse.swt.widgets.Text; >import org.eclipse.ui.IWorkbench; >import org.eclipse.ui.IWorkbenchPreferencePage; > >import test.Activator; > >public class ProxyPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { > > private Text noProxyForText; > private Table table; > private Text proxyConfigurationUrlText; > > public ProxyPreferencePage() { > super("Proxy Preferences"); > setPreferenceStore(Activator.getDefault().getPreferenceStore()); > } > > /* > * (non-Javadoc) > * > * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) > */ > public void init(IWorkbench workbench) { > } > > protected Control createContents(Composite parent) { > Composite composite = new Composite(parent, SWT.NONE); > GridLayout layout = new GridLayout(); > layout.numColumns = 2; > layout.marginRight = 5; > layout.marginTop = 5; > layout.marginWidth = 0; > composite.setLayout(layout); > GridData data = new GridData(GridData.FILL); > data.grabExcessHorizontalSpace = true; > composite.setLayoutData(data); > > final Button directConnectionToButton = new Button(composite, SWT.RADIO); > directConnectionToButton.setLayoutData(new GridData()); > directConnectionToButton.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { > } > }); > directConnectionToButton.setText("Direct connection to the Internet"); > new Label(composite, SWT.NONE); > > final Button manualProxyConfigurationButton = new Button(composite, SWT.RADIO); > manualProxyConfigurationButton.setText("Manual proxy configuration:"); > new Label(composite, SWT.NONE); > > final Composite manualProxyConfigurationComposite = new Composite(composite, SWT.NONE); > final GridLayout gridLayout = new GridLayout(); > gridLayout.marginWidth = 0; > gridLayout.marginHeight = 0; > manualProxyConfigurationComposite.setLayout(gridLayout); > manualProxyConfigurationComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 2, 1)); > > final Button useSameProxyButton = new Button(manualProxyConfigurationComposite, SWT.CHECK); > final GridData gridData_2 = new GridData(); > gridData_2.horizontalIndent = 15; > useSameProxyButton.setLayoutData(gridData_2); > useSameProxyButton.setText("Use the same proxy server for all protocols"); > > final SashForm sashForm = new SashForm(manualProxyConfigurationComposite, SWT.VERTICAL); > final GridData gridData_1 = new GridData(SWT.FILL, SWT.FILL, true, true); > gridData_1.horizontalIndent = 15; > sashForm.setLayoutData(gridData_1); > > table = new Table(sashForm, SWT.BORDER); > table.setLinesVisible(true); > table.setHeaderVisible(true); > > final TableColumn newColumnTableColumn = new TableColumn(table, SWT.NONE); > newColumnTableColumn.setWidth(100); > newColumnTableColumn.setText("Type"); > > final TableColumn newColumnTableColumn_1 = new TableColumn(table, SWT.NONE); > newColumnTableColumn_1.setWidth(100); > newColumnTableColumn_1.setText("Host"); > > final TableColumn newColumnTableColumn_2 = new TableColumn(table, SWT.NONE); > newColumnTableColumn_2.setWidth(100); > newColumnTableColumn_2.setText("Port"); > > final TableItem newItemTableItem = new TableItem(table, SWT.BORDER); > newItemTableItem.setText(0, "HTTP"); > newItemTableItem.setText(2, "8080"); > newItemTableItem.setText(1, "localhost"); > > final TableItem newItemTableItem_2 = new TableItem(table, SWT.BORDER); > newItemTableItem_2.setText(0, "SOCKS"); > newItemTableItem_2.setText(1, "localhost"); > newItemTableItem_2.setText(2, "3128"); > > final Composite composite_1 = new Composite(sashForm, SWT.NONE); > final GridLayout gridLayout_1 = new GridLayout(); > gridLayout_1.marginTop = 5; > gridLayout_1.marginWidth = 0; > gridLayout_1.marginHeight = 0; > composite_1.setLayout(gridLayout_1); > > final Label noProxyForLabel = new Label(composite_1, SWT.NONE); > noProxyForLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); > noProxyForLabel.setText("No proxy for:"); > > noProxyForText = new Text(composite_1, SWT.MULTI | SWT.BORDER); > noProxyForText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > sashForm.setWeights(new int[] {127, 95 }); > > final Button autodetectButton = new Button(composite, SWT.RADIO); > autodetectButton.setLayoutData(new GridData()); > autodetectButton.setText("Auto-detect proxy settings"); > new Label(composite, SWT.NONE); > > final Button automaticProxyConfigurationButton = new Button(composite, SWT.RADIO); > automaticProxyConfigurationButton.setText("Automatic proxy configuration URL:"); > new Label(composite, SWT.NONE); > > proxyConfigurationUrlText = new Text(composite, SWT.BORDER); > final GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); > gridData.horizontalIndent = 17; > proxyConfigurationUrlText.setLayoutData(gridData); > > final Button reloadButton = new Button(composite, SWT.NONE); > reloadButton.setText("Reload"); > > return composite; > } > >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 154100
:
57322
| 57323 |
57823
|
57825
|
57854
|
57855
|
57894
|
57897
|
58137
|
58140
|
59190
|
60292
|
60293