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

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.jface.dialogs
Class IconAndMessageDialog

java.lang.Object
  extended by 

org.eclipse.jface.window.Window
      extended by 

org.eclipse.jface.dialogs.Dialog
          extended by 
org.eclipse.jface.dialogs.IconAndMessageDialog
All Implemented Interfaces:
IShellProvider
Direct Known Subclasses:
ErrorDialog, MessageDialog, ProgressMonitorDialog

public abstract class IconAndMessageDialog
extends Dialog

The IconAndMessageDialog is the abstract superclass of dialogs that have an icon and a message as the first two widgets. In this dialog the icon and message are direct children of the shell in order that they can be read by accessibility tools more easily.

Note: Clients are expected to call createMessageArea(Composite), otherwise neither the icon nor the message will appear.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window. Window
Window.IExceptionHandler
 
Field Summary
protected   Label imageLabel
          Return the label for the image.
protected   String message
          Message (a localized string).
protected   Label messageLabel
          Message label is the label the message is shown on.
 
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
IconAndMessageDialog ( Shell parentShell)
          Constructor for IconAndMessageDialog.
 
Method Summary
protected   Control createButtonBar ( Composite parent)
          Creates and returns the contents of this dialog's button bar.
protected   Control createContents ( Composite parent)
          The Dialog implementation of this Window method creates and lays out the top level composite for the dialog, and determines the appropriate horizontal and vertical dialog units based on the font size.
protected  void createDialogAndButtonArea ( Composite parent)
          Create the dialog area and the button bar for the receiver.
protected   Control createMessageArea ( Composite composite)
          Create the area the message will be shown in.
  Image getErrorImage ()
          Return the Image to be used when displaying an error.
protected abstract   Image getImage ()
          Returns the image to display beside the message in this dialog.
  Image getInfoImage ()
          Return the Image to be used when displaying information.
protected  int getMessageLabelStyle ()
          Returns the style for the message label.
  Image getQuestionImage ()
          Return the Image to be used when displaying a question.
  Image getWarningImage ()
          Return the Image to be used when displaying a warning.
 
Methods inherited from class org.eclipse.jface.dialogs. Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window. Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

protected 
String message
Message (a localized string).


messageLabel

protected 
Label messageLabel
Message label is the label the message is shown on.


imageLabel

protected 
Label imageLabel
Return the label for the image.

Constructor Detail

IconAndMessageDialog

public IconAndMessageDialog(
Shell parentShell)
Constructor for IconAndMessageDialog.

Parameters:
parentShell - the parent shell, or null to create a top-level shell
Method Detail

createMessageArea

protected 
Control createMessageArea(
Composite composite)
Create the area the message will be shown in.

The parent composite is assumed to use GridLayout as its layout manager, since the parent is typically the composite created in Dialog.createDialogArea(org.eclipse.swt.widgets.Composite).

Note: Clients are expected to call this method, otherwise neither the icon nor the message will appear.

Parameters:
composite - The composite to parent from.
Returns:
Control

getMessageLabelStyle

protected int getMessageLabelStyle()
Returns the style for the message label.

Returns:
the style for the message label
Since:
3.0

createButtonBar

protected 
Control createButtonBar(
Composite parent)
Description copied from class: Dialog
Creates and returns the contents of this dialog's button bar.

The Dialog implementation of this framework method lays out a button bar and calls the createButtonsForButtonBar framework method to populate it. Subclasses may override.

The returned control's layout data must be an instance of GridData.

Overrides:
createButtonBar in class Dialog
Parameters:
parent - the parent composite to contain the button bar
Returns:
the button bar control

getImage

protected abstract 
Image getImage()
Returns the image to display beside the message in this dialog.

Subclasses may override.

Returns:
the image to display beside the message
Since:
2.0

createContents

protected 
Control createContents(
Composite parent)
Description copied from class: Dialog
The Dialog implementation of this Window method creates and lays out the top level composite for the dialog, and determines the appropriate horizontal and vertical dialog units based on the font size. It then calls the createDialogArea and createButtonBar methods to create the dialog area and button bar, respectively. Overriding createDialogArea and createButtonBar are recommended rather than overriding this method.

Overrides:
createContents in class Dialog
Parameters:
parent - the parent composite for the controls in this window. The type of layout used is determined by getLayout()
Returns:
the control that will be returned by subsequent calls to getContents()

createDialogAndButtonArea

protected void createDialogAndButtonArea(
Composite parent)
Create the dialog area and the button bar for the receiver.

Parameters:
parent -

getErrorImage

public 
Image getErrorImage()
Return the Image to be used when displaying an error.

Returns:
image the error image

getWarningImage

public 
Image getWarningImage()
Return the Image to be used when displaying a warning.

Returns:
image the warning image

getInfoImage

public 
Image getInfoImage()
Return the Image to be used when displaying information.

Returns:
image the information image

getQuestionImage

public 
Image getQuestionImage()
Return the Image to be used when displaying a question.

Returns:
image the question image

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