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 248562 Details for
Bug 121057
[jres] 'Execution Environments' preference page not updated after JRE addition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Addition of only Apply button in Preference Page
Bug 121057 - JFace.patch (text/plain), 3.12 KB, created by
Sarika Sinha
on 2014-11-11 03:32:08 EST
(
hide
)
Description:
Addition of only Apply button in Preference Page
Filename:
MIME Type:
Creator:
Sarika Sinha
Created:
2014-11-11 03:32:08 EST
Size:
3.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >diff --git src/org/eclipse/jface/preference/PreferencePage.java src/org/eclipse/jface/preference/PreferencePage.java >index 102f8e6..16864ea 100644 >--- src/org/eclipse/jface/preference/PreferencePage.java >+++ src/org/eclipse/jface/preference/PreferencePage.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2013 IBM Corporation and others. >+ * Copyright (c) 2000, 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -79,6 +79,14 @@ > * @see #noDefaultAndApplyButton > */ > private boolean createDefaultAndApplyButton = true; >+ >+ /** >+ * Whether this page has the standard Apply button; <code>false</code> by >+ * default. >+ * >+ * @see #noApplyButton >+ */ >+ private boolean createApplyButton = false; > > /** > * Standard Defaults button, or <code>null</code> if none. >@@ -286,7 +294,27 @@ > }); > applyButton.setEnabled(isValid()); > applyDialogFont(buttonBar); >- } else { >+ } else if (createApplyButton) { >+ layout.numColumns = layout.numColumns + 1; >+ String label = JFaceResources.getString("apply"); //$NON-NLS-1$ >+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); >+ applyButton = new Button(buttonBar, SWT.PUSH); >+ applyButton.setText(label); >+ Dialog.applyDialogFont(applyButton); >+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); >+ Point minButtonSize = applyButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); >+ data.widthHint = Math.max(widthHint, minButtonSize.x); >+ applyButton.setLayoutData(data); >+ applyButton.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ performApply(); >+ } >+ }); >+ applyButton.setEnabled(isValid()); >+ applyDialogFont(buttonBar); >+ >+ } else { > /* Check if there are any other buttons on the button bar. > * If not, throw away the button bar composite. Otherwise > * there is an unusually large button bar. >@@ -412,11 +440,26 @@ > } > > /** >- * The <code>PreferencePage</code> implementation of this >- * <code>IPreferencePage</code> method returns <code>true</code> >- * if the page is valid. >- * @see IPreferencePage#okToLeave() >- */ >+ * Enable creation of the standard Apply button for this page. >+ * <p> >+ * Subclasses wishing a preference page with this button should call >+ * this framework method before the page's control has been created. >+ * </p> >+ * >+ * @since 3.11 >+ */ >+ protected void createApplyButton() { >+ createApplyButton = true; >+ createDefaultAndApplyButton = false; >+ } >+ >+ /** >+ * The <code>PreferencePage</code> implementation of this >+ * <code>IPreferencePage</code> method returns <code>true</code> if the page >+ * is valid. >+ * >+ * @see IPreferencePage#okToLeave() >+ */ > @Override > public boolean okToLeave() { > return isValid();
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 121057
:
248562
|
248563
|
248564
|
248892
|
248893
|
248894
|
249124
|
249125
|
249126
|
249127
|
249277
|
249279
|
249458
|
249512