Class DialogPage
- All Implemented Interfaces:
- IDialogPage,- IMessageProvider
- Direct Known Subclasses:
- InstallationPage,- PreferencePage,- WizardPage
- 
Field SummaryFields inherited from interface org.eclipse.jface.dialogs.IMessageProviderERROR, INFORMATION, NONE, WARNING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCreates a new empty dialog page.protectedDialogPage(String title) Creates a new dialog page with the given title.protectedDialogPage(String title, ImageDescriptor image) Creates a new dialog page with the given title and image.
- 
Method SummaryModifier and TypeMethodDescriptionprotected intconvertHeightInCharsToPixels(int chars) Returns the number of pixels corresponding to the height of the given number of characters.protected intconvertHorizontalDLUsToPixels(int dlus) Returns the number of pixels corresponding to the given number of horizontal dialog units.protected intconvertVerticalDLUsToPixels(int dlus) Returns the number of pixels corresponding to the given number of vertical dialog units.protected intconvertWidthInCharsToPixels(int chars) Returns the number of pixels corresponding to the width of the given number of characters.voiddispose()TheDialogPageimplementation of thisIDialogPagemethod disposes of the page image if it has one.Returns the top level control for this dialog page.Returns this dialog page's description text.protected StringReturns the symbolic font name used by dialog pages.Returns the current error message for this dialog page.protected FontgetFont()Returns the default font to use for this dialog page.getImage()Returns this dialog page's image.Returns the current message for this wizard page.intReturns a value indicating if the message is a an information message, a warning message, or an error message.getShell()Returns this dialog page's shell.getTitle()Returns this dialog page's title.protected final StringgetToolTipText(int widgetId) Deprecated.protected voidinitializeDialogUnits(Control testControl) Initializes the computation of horizontal and vertical dialog units based on the size of current font.protected booleanTests whether this page's UI content has already been created.voidThis default implementation of anIDialogPagemethod does nothing.protected GridDatasetButtonLayoutData(Button button) Sets theGridDataon the specified button to be one that is spaced for the current dialog page units.protected voidsetControl(Control newControl) Set the control for the receiver.voidsetDescription(String description) Sets this dialog page's description text.voidsetErrorMessage(String newMessage) Sets or clears the error message for this page.voidSets this dialog page's image.voidsetMessage(String newMessage) Sets or clears the message for this page.voidsetMessage(String newMessage, int newType) Sets the message for this page with an indication of what type of message it is.voidTheDialogPageimplementation of thisIDialogPagemethod remembers the title in an internal state variable.voidsetVisible(boolean visible) TheDialogPageimplementation of thisIDialogPagemethod sets the control to the given visibility state.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPagecreateControl
- 
Constructor Details- 
DialogPageprotected DialogPage()Creates a new empty dialog page.
- 
DialogPageCreates a new dialog page with the given title.- Parameters:
- title- the title of this dialog page, or- nullif none
 
- 
DialogPageCreates a new dialog page with the given title and image.- Parameters:
- title- the title of this dialog page, or- nullif none
- image- the image for this dialog page, or- nullif none
 
 
- 
- 
Method Details- 
convertHeightInCharsToPixelsprotected int convertHeightInCharsToPixels(int chars) Returns the number of pixels corresponding to the height of the given number of characters.This method may only be called after initializeDialogUnitshas been called.Clients may call this framework method, but should not override it. - Parameters:
- chars- the number of characters
- Returns:
- the number of pixels
 
- 
convertHorizontalDLUsToPixelsprotected int convertHorizontalDLUsToPixels(int dlus) Returns the number of pixels corresponding to the given number of horizontal dialog units.This method may only be called after initializeDialogUnitshas been called.Clients may call this framework method, but should not override it. - Parameters:
- dlus- the number of horizontal dialog units
- Returns:
- the number of pixels
 
- 
convertVerticalDLUsToPixelsprotected int convertVerticalDLUsToPixels(int dlus) Returns the number of pixels corresponding to the given number of vertical dialog units.This method may only be called after initializeDialogUnitshas been called.Clients may call this framework method, but should not override it. - Parameters:
- dlus- the number of vertical dialog units
- Returns:
- the number of pixels
 
- 
convertWidthInCharsToPixelsprotected int convertWidthInCharsToPixels(int chars) Returns the number of pixels corresponding to the width of the given number of characters.This method may only be called after initializeDialogUnitshas been called.Clients may call this framework method, but should not override it. - Parameters:
- chars- the number of characters
- Returns:
- the number of pixels
 
- 
disposepublic void dispose()TheDialogPageimplementation of thisIDialogPagemethod disposes of the page image if it has one. Subclasses may extend.- Specified by:
- disposein interface- IDialogPage
 
- 
getControlReturns the top level control for this dialog page.- Specified by:
- getControlin interface- IDialogPage
- Returns:
- the top level control
 
- 
getDescriptionDescription copied from interface:IDialogPageReturns this dialog page's description text.- Specified by:
- getDescriptionin interface- IDialogPage
- Returns:
- the description text for this dialog page,
  or nullif none
 
- 
getDialogFontNameReturns the symbolic font name used by dialog pages.- Returns:
- the symbolic font name
 
- 
getErrorMessageDescription copied from interface:IDialogPageReturns the current error message for this dialog page. May benullto indicate no error message.An error message should describe some error state, as opposed to a message which may simply provide instruction or information to the user. - Specified by:
- getErrorMessagein interface- IDialogPage
- Returns:
- the error message, or nullif none
 
- 
getFontReturns the default font to use for this dialog page.- Returns:
- the font
 
- 
getImageDescription copied from interface:IDialogPageReturns this dialog page's image.- Specified by:
- getImagein interface- IDialogPage
- Returns:
- the image for this dialog page, or nullif none
 
- 
getMessageDescription copied from interface:IDialogPageReturns the current message for this wizard page.A message provides instruction or information to the user, as opposed to an error message which should describe some error state. - Specified by:
- getMessagein interface- IDialogPage
- Specified by:
- getMessagein interface- IMessageProvider
- Returns:
- the message, or nullif none
 
- 
getMessageTypepublic int getMessageType()Description copied from interface:IMessageProviderReturns a value indicating if the message is a an information message, a warning message, or an error message.Returns one of NONE,INFORMATION,WARNING, orERROR.- Specified by:
- getMessageTypein interface- IMessageProvider
- Returns:
- the message type
 
- 
getShellReturns this dialog page's shell. Convenience method forgetControl().getShell(). This method may only be called after the page's control has been created.- Returns:
- the shell
 
- 
getTitleDescription copied from interface:IDialogPageReturns this dialog page's title.- Specified by:
- getTitlein interface- IDialogPage
- Returns:
- the title of this dialog page,
  or nullif none
 
- 
getToolTipTextDeprecated.Returns the tool tip text for the widget with the given id.The default implementation of this framework method does nothing and returns null. Subclasses may override.- Parameters:
- widgetId- the id of the widget for which hover help is requested
- Returns:
- the tool tip text, or nullif none
 
- 
initializeDialogUnitsInitializes the computation of horizontal and vertical dialog units based on the size of current font.This method must be called before any of the dialog unit based conversion methods are called. - Parameters:
- testControl- a control from which to obtain the current font
 
- 
setButtonLayoutDataSets theGridDataon the specified button to be one that is spaced for the current dialog page units. The methodinitializeDialogUnitsmust be called once before calling this method for the first time.- Parameters:
- button- the button to set the- GridData
- Returns:
- the GridDataset on the specified button
 
- 
isControlCreatedprotected boolean isControlCreated()Tests whether this page's UI content has already been created.- Returns:
- trueif the control has been created, and- falseif not
 
- 
performHelppublic void performHelp()This default implementation of anIDialogPagemethod does nothing. Subclasses should override to take some action in response to a help request.- Specified by:
- performHelpin interface- IDialogPage
 
- 
setControlSet the control for the receiver.- Parameters:
- newControl- control to set
 
- 
setDescriptionDescription copied from interface:IDialogPageSets this dialog page's description text.- Specified by:
- setDescriptionin interface- IDialogPage
- Parameters:
- description- the description text for this dialog page, or- nullif none
 
- 
setErrorMessageSets or clears the error message for this page.- Parameters:
- newMessage- the message, or- nullto clear the error message
 
- 
setImageDescriptorDescription copied from interface:IDialogPageSets this dialog page's image.- Specified by:
- setImageDescriptorin interface- IDialogPage
- Parameters:
- desc- the image for this dialog page, or- nullif none
 
- 
setMessageSets or clears the message for this page.This is a shortcut for setMessage(newMesasge, NONE)- Parameters:
- newMessage- the message, or- nullto clear the message
 
- 
setMessageSets the message for this page with an indication of what type of message it is.The valid message types are one of NONE,INFORMATION,WARNING, orERROR.Note that for backward compatibility, a message of type ERRORis different than an error message (set usingsetErrorMessage). An error message overrides the current message until the error message is cleared. This method replaces the current message and does not affect the error message.- Parameters:
- newMessage- the message, or- nullto clear the message
- newType- the message type
- Since:
- 2.0
 
- 
setTitleTheDialogPageimplementation of thisIDialogPagemethod remembers the title in an internal state variable. Subclasses may extend.- Specified by:
- setTitlein interface- IDialogPage
- Parameters:
- title- the title of this dialog page, or- nullif none
 
- 
setVisiblepublic void setVisible(boolean visible) TheDialogPageimplementation of thisIDialogPagemethod sets the control to the given visibility state. Subclasses may extend.- Specified by:
- setVisiblein interface- IDialogPage
- Parameters:
- visible-- trueto make this page visible, and- falseto hide it
 
 
-