Package org.eclipse.help.ui
Class RootScopePage
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.preference.PreferencePage
org.eclipse.help.ui.RootScopePage
- All Implemented Interfaces:
- ISearchScopePage,- IDialogPage,- IMessageProvider,- IPreferencePage
Clients that contribute search scope root page to the search engine
 definition must extend this class and implement
 
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.- Since:
- 3.1
- 
Field SummaryFields inherited from interface org.eclipse.jface.dialogs.IMessageProviderERROR, INFORMATION, NONE, WARNING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected final ControlcreateContents(Composite parent) Creates the initial contents of the page and allocates the area for the clients.protected abstract intcreateScopeContents(Composite parent) Abstract method that subclasses must implement in order to provide root page content.protected IEngineDescriptorReturns the descriptor of the engine associated with this page.protected StringReturns the scope set name passed to the page during initialization.voidinit(IEngineDescriptor ed, String scopeSetName) Initializes the search scope page.protected voidInitializes default values of the store to be used when the user presses 'Defaults' button.protected booleanTests whether the search engine has been selected to participate in the search.protected voidmasterValueChanged(boolean value) Called when the value of the master switch has changed.protected voidSets the value of the master switch to the initial value from the extension.booleanStores the value of the master switch in the preference store.Methods inherited from class org.eclipse.jface.preference.PreferencePageapplyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performApply, performCancel, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButtonMethods inherited from class org.eclipse.jface.dialogs.DialogPageconvertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPagecreateControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisibleMethods inherited from interface org.eclipse.jface.preference.IPreferencePagecomputeSize, isValid, okToLeave, performCancel, setContainer, setSize
- 
Constructor Details- 
RootScopePagepublic RootScopePage()The default constructor.
 
- 
- 
Method Details- 
initDescription copied from interface:ISearchScopePageInitializes the search scope page.- Specified by:
- initin interface- ISearchScopePage
- Parameters:
- ed- the descriptor of the engine associated with this page
- scopeSetName- the name of the current scope set that is used to group data shown in this page
 
- 
createContentsCreates the initial contents of the page and allocates the area for the clients. Classes that extend this class should implementcreateScopeContents(Composite)instead.- Specified by:
- createContentsin class- PreferencePage
- Parameters:
- parent- the page parent
- Returns:
- the page client control
 
- 
masterValueChangedprotected void masterValueChanged(boolean value) Called when the value of the master switch has changed. The default implementation disables the scope contents control when the master switch is off. Subclass can override this behaviour.- Parameters:
- value-- trueif the master switch is on,- falseotherwise.
 
- 
getScopeSetNameReturns the scope set name passed to the page during initialization.- Returns:
- the name of the current scope set
 
- 
getEngineDescriptorReturns the descriptor of the engine associated with this page.- Returns:
- the engine descriptor
 
- 
isEngineEnabledprotected boolean isEngineEnabled()Tests whether the search engine has been selected to participate in the search.- Returns:
- trueif the search engine is enabled,- falseotherwise.
 
- 
performOkpublic boolean performOk()Stores the value of the master switch in the preference store. Subclasses may override but must call 'super'.- Specified by:
- performOkin interface- IPreferencePage
- Overrides:
- performOkin class- PreferencePage
- Returns:
- trueif the wizard can be closed,- falseotherwise.
 
- 
performDefaultsprotected void performDefaults()Sets the value of the master switch to the initial value from the extension. Subclasses may override but must call 'super'.- Overrides:
- performDefaultsin class- PreferencePage
 
- 
initializeDefaultsInitializes default values of the store to be used when the user presses 'Defaults' button. Subclasses may override but must call 'super'.- Parameters:
- store- the preference store
 
- 
createScopeContentsAbstract method that subclasses must implement in order to provide root page content. The parent usesGridLayoutto position and size the widgets. Widgets created in this method should useGridDatato 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. - Parameters:
- parent- the page parent
- Returns:
- number of columns required by the client content
 
 
-