|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.dialogs.DialogPage
Abstract base implementation of a dialog page. All dialog pages are subclasses of this one.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
|---|
ERROR, INFORMATION, NONE, WARNING |
| Constructor Summary | |
|---|---|
protected |
DialogPage()
Creates a new empty dialog page. |
protected |
DialogPage(String title)
Creates a new dialog page with the given title. |
protected |
DialogPage(String title,
ImageDescriptor image)
Creates a new dialog page with the given title and image. |
| Method Summary | |
|---|---|
protected int |
convertHeightInCharsToPixels(int chars)
Returns the number of pixels corresponding to the height of the given number of characters. |
protected int |
convertHorizontalDLUsToPixels(int dlus)
Returns the number of pixels corresponding to the given number of horizontal dialog units. |
protected int |
convertVerticalDLUsToPixels(int dlus)
Returns the number of pixels corresponding to the given number of vertical dialog units. |
protected int |
convertWidthInCharsToPixels(int chars)
Returns the number of pixels corresponding to the width of the given number of characters. |
void |
dispose()
The DialogPage implementation of an
IDialogPage method does nothing. |
Control |
getControl()
Returns the top level control for this dialog page. |
String |
getDescription()
Returns this dialog page's description text. |
protected String |
getDialogFontName()
Returns the symbolic font name used by dialog pages. |
String |
getErrorMessage()
Returns the current error message for this dialog page. |
protected Font |
getFont()
Returns the default font to use for this dialog page. |
Image |
getImage()
Returns this dialog page's image. |
String |
getMessage()
Returns the current message for this wizard page. |
int |
getMessageType()
Returns a value indicating if the message is a an information message, a warning message, or an error message. |
Shell |
getShell()
Returns this dialog page's shell. |
String |
getTitle()
Returns this dialog page's title. |
protected String |
getToolTipText(int widgetId)
Deprecated. |
protected void |
initializeDialogUnits(Control testControl)
Initializes the computation of horizontal and vertical dialog units based on the size of current font. |
protected boolean |
isControlCreated()
Tests whether this page's UI content has already been created. |
void |
performHelp()
This default implementation of an IDialogPage method does
nothing. |
protected GridData |
setButtonLayoutData(Button button)
Sets the GridData on the specified button to be one that
is spaced for the current dialog page units. |
protected void |
setControl(Control newControl)
Set the control for the receiver. |
void |
setDescription(String description)
Sets this dialog page's description text. |
void |
setErrorMessage(String newMessage)
Sets or clears the error message for this page. |
void |
setImageDescriptor(ImageDescriptor desc)
Sets this dialog page's image. |
void |
setMessage(String newMessage)
Sets or clears the message for this page. |
void |
setMessage(String newMessage,
int newType)
Sets the message for this page with an indication of what type of message it is. |
void |
setTitle(String title)
The DialogPage implementation of this
IDialogPage method remembers the title in an internal
state variable. |
void |
setVisible(boolean visible)
The DialogPage implementation of this
IDialogPage method sets the control to the given
visibility state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
|---|
createControl |
| Constructor Detail |
protected DialogPage()
protected DialogPage(String title)
title - the title of this dialog page, or null if none
protected DialogPage(String title,
ImageDescriptor image)
title - the title of this dialog page, or null if noneimage - the image for this dialog page, or null if none| Method Detail |
protected int convertHeightInCharsToPixels(int chars)
This method may only be called after initializeDialogUnits
has been called.
Clients may call this framework method, but should not override it.
chars - the number of characters
protected int convertHorizontalDLUsToPixels(int dlus)
This method may only be called after initializeDialogUnits
has been called.
Clients may call this framework method, but should not override it.
dlus - the number of horizontal dialog units
protected int convertVerticalDLUsToPixels(int dlus)
This method may only be called after initializeDialogUnits
has been called.
Clients may call this framework method, but should not override it.
dlus - the number of vertical dialog units
protected int convertWidthInCharsToPixels(int chars)
This method may only be called after initializeDialogUnits
has been called.
Clients may call this framework method, but should not override it.
chars - the number of characters
public void dispose()
DialogPage implementation of an
IDialogPage method does nothing. Subclasses may extend.
dispose in interface IDialogPagepublic Control getControl()
getControl in interface IDialogPagepublic String getDescription()
IDialogPage
getDescription in interface IDialogPagenull if noneprotected String getDialogFontName()
public String getErrorMessage()
IDialogPagenull to 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.
getErrorMessage in interface IDialogPagenull if noneprotected Font getFont()
public Image getImage()
IDialogPage
getImage in interface IDialogPagenull
if nonepublic String getMessage()
IDialogPageA message provides instruction or information to the user, as opposed to an error message which should describe some error state.
getMessage in interface IDialogPagenull if nonepublic int getMessageType()
IMessageProvider
Returns one of NONE,INFORMATION,
WARNING, or ERROR.
getMessageType in interface IMessageProviderpublic Shell getShell()
getControl().getShell(). This method may only be called
after the page's control has been created.
public String getTitle()
IDialogPage
getTitle in interface IDialogPagenull if noneprotected final String getToolTipText(int widgetId)
The default implementation of this framework method does nothing and
returns null. Subclasses may override.
widgetId - the id of the widget for which hover help is requested
null if noneprotected void initializeDialogUnits(Control testControl)
This method must be called before any of the dialog unit based conversion methods are called.
testControl - a control from which to obtain the current fontprotected GridData setButtonLayoutData(Button button)
GridData on the specified button to be one that
is spaced for the current dialog page units. The method
initializeDialogUnits must be called once before calling
this method for the first time.
button - the button to set the GridData
GridData set on the specified buttonprotected boolean isControlCreated()
true if the control has been created, and
false if notpublic void performHelp()
IDialogPage method does
nothing. Subclasses should override to take some action in response to a
help request.
performHelp in interface IDialogPageprotected void setControl(Control newControl)
newControl - public void setDescription(String description)
IDialogPage
setDescription in interface IDialogPagedescription - the description text for this dialog
page, or null if nonepublic void setErrorMessage(String newMessage)
newMessage - the message, or null to clear the error messagepublic void setImageDescriptor(ImageDescriptor desc)
IDialogPage
setImageDescriptor in interface IDialogPagedesc - the image for this dialog page,
or null if nonepublic void setMessage(String newMessage)
This is a shortcut for setMessage(newMesasge, NONE)
newMessage - the message, or null to clear the message
public void setMessage(String newMessage,
int newType)
The valid message types are one of NONE,
INFORMATION,WARNING, or
ERROR.
Note that for backward compatibility, a message of type
ERROR is different than an error message (set using
setErrorMessage). 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.
newMessage - the message, or null to clear the messagenewType - the message typepublic void setTitle(String title)
DialogPage implementation of this
IDialogPage method remembers the title in an internal
state variable. Subclasses may extend.
setTitle in interface IDialogPagetitle - the title of this dialog page,
or null if nonepublic void setVisible(boolean visible)
DialogPage implementation of this
IDialogPage method sets the control to the given
visibility state. Subclasses may extend.
setVisible in interface IDialogPagevisible - true to make this page visible,
and false to hide it
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.