Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.help.ui
Class RootScopePage


java.lang.Object
  extended by 

org.eclipse.jface.dialogs.DialogPage
      extended by 

org.eclipse.jface.preference.PreferencePage
          extended by 
org.eclipse.help.ui.RootScopePage
All Implemented Interfaces:
ISearchScopePage, IDialogPage, IMessageProvider, IPreferencePage

public abstract class RootScopePage
extends PreferencePage
implements ISearchScopePage

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 Summary
 
Fields inherited from interface org.eclipse.jface.dialogs. IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
RootScopePage ()
          The default constructor.
 
Method Summary
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.
 
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, 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

RootScopePage

public RootScopePage()
The default constructor.

Method Detail

init

public void init(
IEngineDescriptor ed,
                 
String scopeSetName)
Description copied from interface: ISearchScopePage
Initializes the search scope page.

Specified by:
init in 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

createContents

protected final 
Control createContents(
Composite parent)
Creates the initial contents of the page and allocates the area for the clients. Classes that extend this class should implement createScopeContents(Composite) instead.

Specified by:
createContents in class PreferencePage
Parameters:
parent - the page parent
Returns:
the page client control

masterValueChanged

protected 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 - true if the master switch is on, false otherwise.

getScopeSetName

protected 
String getScopeSetName()
Returns the scope set name passed to the page during initialization.

Returns:
the name of the current scope set

getEngineDescriptor

protected 
IEngineDescriptor getEngineDescriptor()
Returns the descriptor of the engine associated with this page.

Returns:
the engine descriptor

isEngineEnabled

protected boolean isEngineEnabled()
Tests whether the search engine has been selected to participate in the search.

Returns:
true if the search engine is enabled, false otherwise.

performOk

public boolean performOk()
Stores the value of the master switch in the preference store. Subclasses may override but must call 'super'.

Specified by:
performOk in interface IPreferencePage
Overrides:
performOk in class PreferencePage
Returns:
true if the wizard can be closed, false otherwise.

performDefaults

protected void performDefaults()
Sets the value of the master switch to the initial value from the extension. Subclasses may override but must call 'super'.

Overrides:
performDefaults in class PreferencePage

initializeDefaults

protected void initializeDefaults(
IPreferenceStore store)
Initializes 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

createScopeContents

protected abstract int createScopeContents(
Composite parent)
Abstract method that subclasses must implement in order to provide root page content. The parent uses 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.

Parameters:
parent - the page parent
Returns:
number of columns required by the client content

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire