|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.preference.PreferencePage
org.eclipse.equinox.p2.ui.RepositoryManipulationPage
public class RepositoryManipulationPage
Page that allows users to update, add, remove, import, and export repositories. This page can be hosted inside a preference dialog or inside its own dialog. When hosting this page inside a non-preference dialog, some of the dialog methods will likely have to call page methods. The following snippet shows how to host this page inside a TitleAreaDialog.
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();
Field Summary |
---|
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
---|
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
---|---|
RepositoryManipulationPage()
Create a repository manipulation page that will display the repositories available to the user. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.jface.preference.PreferencePage |
---|
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 |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
---|
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.preference.IPreferencePage |
---|
computeSize, isValid, okToLeave, performCancel, setContainer, setSize |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
---|
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible |
Constructor Detail |
---|
public RepositoryManipulationPage()
Method Detail |
---|
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 composite
public 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
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.