public class RepositoryManipulationPage extends PreferencePage implements IWorkbenchPreferencePage, ICopyable
TitleAreaDialog dialog = new TitleAreaDialog(shell) { RepositoryManipulationPage page; protected Control createDialogArea(Composite parent) { page = new RepositoryManipulationPage(); page.setProvisioningUI(ProvisioningUI.getDefaultUI()); page.createControl(parent); this.setTitle("Software Sites"); this.setMessage("The enabled sites will be searched for software. Disabled sites are ignored."); return page.getControl(); } protected void okPressed() { if (page.performOk()) super.okPressed(); } protected void cancelPressed() { if (page.performCancel()) super.cancelPressed(); } }; dialog.open();
ERROR, INFORMATION, NONE, WARNING
Constructor and Description |
---|
RepositoryManipulationPage()
Create a repository manipulation page that will display the repositories
available to the user.
|
Modifier and Type | Method and Description |
---|---|
void |
copyToClipboard(Control activeControl)
Copy text related to the active control to the clipboard.
|
protected Control |
createContents(Composite parent)
Creates and returns the SWT control for the customized body
of this preference page under the given parent composite.
|
void |
init(IWorkbench workbench)
Initializes this preference page for the given workbench.
|
boolean |
performOk()
Notifies that the OK button of this page's container has been pressed.
|
void |
setProvisioningUI(ProvisioningUI ui)
Set the provisioning UI that provides the session, policy, and other
services for the UI.
|
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performCancel, performDefaults, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
computeSize, isValid, okToLeave, performCancel, setContainer, setSize
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
public RepositoryManipulationPage()
public void setProvisioningUI(ProvisioningUI ui)
ui
- the provisioning UI to use for this page.protected Control createContents(Composite parent)
PreferencePage
This framework method must be implemented by concrete subclasses. Any
subclass returning a Composite
object whose Layout
has default margins (for example, a GridLayout
) are expected to
set the margins of this Layout
to 0 pixels.
createContents
in class PreferencePage
parent
- the parent compositepublic boolean performOk()
IPreferencePage
performOk
in interface IPreferencePage
performOk
in class PreferencePage
false
to abort the container's OK
processing and true
to allow the OK to happenpublic void init(IWorkbench workbench)
IWorkbenchPreferencePage
This method is called automatically as the preference page is being created and initialized. Clients must not call this method.
init
in interface IWorkbenchPreferencePage
workbench
- the workbenchpublic void copyToClipboard(Control activeControl)
ICopyable
copyToClipboard
in interface ICopyable
activeControl
- the active control
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.