|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.window.Window org.eclipse.jface.dialogs.Dialog org.eclipse.jface.dialogs.IconAndMessageDialog org.eclipse.emf.common.ui.dialogs.DiagnosticDialog
public class DiagnosticDialog
A dialog to display one Diagnostic
object to the user. If a diagnostic
contains additional detailed information then a Details button is automatically
supplied, which shows or hides an details viewer when pressed by the user.
Diagnostic
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
---|
Window.IExceptionHandler |
Field Summary |
---|
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog |
---|
imageLabel, message, messageLabel |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
---|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
Fields inherited from class org.eclipse.jface.window.Window |
---|
CANCEL, OK |
Constructor Summary | |
---|---|
DiagnosticDialog(Shell parentShell,
java.lang.String dialogTitle,
java.lang.String message,
Diagnostic diagnostic,
int severityMask)
Creates an diagnostic dialog. |
Method Summary | |
---|---|
protected void |
buttonPressed(int id)
Handles the pressing of the OK or Details button in this dialog. |
boolean |
close()
|
protected void |
configureShell(Shell shell)
|
protected void |
createButtonsForButtonBar(Composite parent)
|
protected void |
createDetailsButton(Composite parent)
Create the details button if it should be included. |
protected DiagnosticComposite |
createDiagnosticComposite(Composite parent)
Create the diagnostic composite. |
protected void |
createDialogAndButtonArea(Composite parent)
|
protected Control |
createDialogArea(Composite parent)
This implementation of the Dialog framework method creates
and lays out a composite. |
protected Image |
getImage()
|
DiagnosticComposite.TextProvider |
getTextProvider()
|
int |
open()
Extends Window.open() . |
static int |
open(Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
Diagnostic diagnostic)
Opens a diagnostic dialog to display the given diagnostic. |
static int |
open(Shell parentShell,
java.lang.String title,
java.lang.String message,
Diagnostic diagnostic,
int displayMask)
Opens an diagnostic dialog to display the given diagnostic. |
static int |
openProblem(Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
Diagnostic diagnostic)
Opens a diagnostic dialog to display the given diagnostic. |
protected void |
setDiagnostic(Diagnostic diagnostic)
Set the diagnostic displayed by this diagnostic dialog to the given diagnostic. |
void |
setTextProvider(DiagnosticComposite.TextProvider textProvider)
|
protected static boolean |
shouldDisplay(Diagnostic diagnostic,
int mask)
Returns whether the given diagnostic object should be displayed. |
protected boolean |
shouldShowDetailsButton()
Return whether the Details button should be included. |
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog |
---|
createButtonBar, createContents, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiagnosticDialog(Shell parentShell, java.lang.String dialogTitle, java.lang.String message, Diagnostic diagnostic, int severityMask)
Normally one should use open
to create and open one
of these. This constructor is useful only if the diagnostic object being
displayed contains child items
parentShell
- the shell under which to create this dialogdialogTitle
- the title to use for this dialog, or null
to
indicate that the default title should be usedmessage
- the message to show in this dialog, or null
to
indicate that the diagnostic's message should be shown as the
primary messagediagnostic
- the diagnostic to show to the userseverityMask
- the mask to use to filter the displaying of child items, as
per DiagnosticComposite.severityMatches(Diagnostic, int)
DiagnosticComposite.severityMatches(Diagnostic, int)
Method Detail |
---|
public static int open(Shell parent, java.lang.String dialogTitle, java.lang.String message, Diagnostic diagnostic)
parent
- the parent shell of the dialog, or null
if nonedialogTitle
- the title to use for this dialog, or null
to
indicate that the default title should be usedmessage
- the message to show in this dialog, or null
to
indicate that the diagnostic's message should be shown as the
primary messagediagnostic
- the diagnostic to show to the user
Dialog.OK
if the OK
button was pressed, or Dialog.CANCEL
if this
dialog's close window decoration or the ESC key was used.public static int openProblem(Shell parent, java.lang.String dialogTitle, java.lang.String message, Diagnostic diagnostic)
parent
- the parent shell of the dialog, or null
if nonedialogTitle
- the title to use for this dialog, or null
to
indicate that the default title should be usedmessage
- the message to show in this dialog, or null
to
indicate that the diagnostic's message should be shown as the
primary messagediagnostic
- the diagnostic to show to the user
Dialog.OK
if the OK
button was pressed, or Dialog.CANCEL
if this
dialog's close window decoration or the ESC key was used.public static int open(Shell parentShell, java.lang.String title, java.lang.String message, Diagnostic diagnostic, int displayMask)
parentShell
- the parent shell of the dialog, or null
if nonetitle
- the title to use for this dialog, or null
to
indicate that the default title should be usedmessage
- the message to show in this dialog, or null
to
indicate that the diagnostic's message should be shown as the
primary messagediagnostic
- the diagnostic to show to the userdisplayMask
- the mask to use to filter the displaying of child items, as
per DiagnosticComposite.severityMatches(Diagnostic, int)
Dialog.OK
if the OK
button was pressed, or Dialog.CANCEL
if this
dialog's close window decoration or the ESC key was used.DiagnosticComposite.severityMatches(Diagnostic, int)
protected static boolean shouldDisplay(Diagnostic diagnostic, int mask)
diagnostic
- a diagnostic objectmask
- a mask as per DiagnosticComposite.severityMatches(Diagnostic, int)
true
if the given diagnostic should be displayed, and
false
otherwiseDiagnosticComposite.severityMatches(Diagnostic, int)
public void setTextProvider(DiagnosticComposite.TextProvider textProvider)
public DiagnosticComposite.TextProvider getTextProvider()
protected void buttonPressed(int id)
buttonPressed
in class Dialog
protected void configureShell(Shell shell)
configureShell
in class Window
protected void createButtonsForButtonBar(Composite parent)
createButtonsForButtonBar
in class Dialog
protected void createDetailsButton(Composite parent)
parent
- the parent compositeprotected Control createDialogArea(Composite parent)
Dialog
framework method creates
and lays out a composite. Subclasses that require a different dialog
area may either override this method, or call the super
implementation and add controls to the created composite.
createDialogArea
in class Dialog
protected void createDialogAndButtonArea(Composite parent)
createDialogAndButtonArea
in class IconAndMessageDialog
protected Image getImage()
getImage
in class IconAndMessageDialog
protected DiagnosticComposite createDiagnosticComposite(Composite parent)
parent
- the parent composite
public int open()
Window.open()
. Opens an diagnostic dialog to display
the diagnostic. If you specified a mask to filter the displaying of these
children, the diagnostic dialog will only be displayed if there is at least
one child diagnostic matching the mask.
open
in class Window
public boolean close()
close
in class Dialog
protected boolean shouldShowDetailsButton()
protected final void setDiagnostic(Diagnostic diagnostic)
diagnostic
- the diagnostic to be displayed in the diagnostic composite
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |