public abstract class RootScopePage extends PreferencePage implements ISearchScopePage
createScopeContents
method. The page will come preset with the
engine name, image and description, as well as the master switch that turns
the engine on or off. When the engine master switch is set to false, all the
children in the client composite will be disabled.ERROR, INFORMATION, NONE, WARNING
Constructor and Description |
---|
RootScopePage()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Control |
createContents(Composite parent)
Creates the initial contents of the page and allocates the area for the
clients.
|
protected abstract int |
createScopeContents(Composite parent)
Abstract method that subclasses must implement in order to provide root
page content.
|
protected IEngineDescriptor |
getEngineDescriptor()
Returns the descriptor of the engine associated with this page.
|
protected String |
getScopeSetName()
Returns the scope set name passed to the page during initialization.
|
void |
init(IEngineDescriptor ed,
String scopeSetName)
Initializes the search scope page.
|
protected void |
initializeDefaults(IPreferenceStore store)
Initializes default values of the store to be used when the user presses
'Defaults' button.
|
protected boolean |
isEngineEnabled()
Tests whether the search engine has been selected to participate in the
search.
|
protected void |
masterValueChanged(boolean value)
Called when the value of the master switch has changed.
|
protected void |
performDefaults()
Sets the value of the master switch to the initial value from the
extension.
|
boolean |
performOk()
Stores the value of the master switch in the preference store.
|
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performCancel, 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 void init(IEngineDescriptor ed, String scopeSetName)
ISearchScopePage
init
in interface ISearchScopePage
ed
- the descriptor of the engine associated with this pagescopeSetName
- the name of the current scope set that is used to group data
shown in this pageprotected final Control createContents(Composite parent)
createScopeContents(Composite)
instead.createContents
in class PreferencePage
parent
- the page parentprotected void masterValueChanged(boolean value)
value
- true
if the master switch is on,
false
otherwise.protected String getScopeSetName()
protected IEngineDescriptor getEngineDescriptor()
protected boolean isEngineEnabled()
true
if the search engine is enabled, false
otherwise.public boolean performOk()
performOk
in interface IPreferencePage
performOk
in class PreferencePage
true
if the wizard can be closed,
false
otherwise.protected void performDefaults()
performDefaults
in class PreferencePage
protected void initializeDefaults(IPreferenceStore store)
store
- the preference storeprotected abstract int createScopeContents(Composite parent)
GridLayout
to position and
size the widgets. Widgets created in this method should use
GridData
to configure the way they fit in the overall
page.
The common widgets created by this page will set number of columns they need for themselves only. Clients that implement this method should return the required number of columns so that the root page widgets can be adjusted if more columns are needed than initially set.
parent
- the page parent
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.