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 TitleAreaDialog

java.lang.Object
  extended by 

org.eclipse.jface.window.Window
      extended by 

org.eclipse.jface.dialogs.Dialog
          extended by 

org.eclipse.jface.dialogs.TrayDialog
              extended by 
org.eclipse.jface.dialogs.TitleAreaDialog
All Implemented Interfaces:
IShellProvider
Direct Known Subclasses:
SaveAsDialog, SourceLookupDialog, WizardDialog

public class TitleAreaDialog
extends TrayDialog

A dialog that has a title area for displaying a title and an image as well as a common area for displaying a description, a message, or an error message.

This dialog class may be subclassed.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window. Window
Window.IExceptionHandler
 
Field Summary
static  String DLG_IMG_TITLE_BANNER
          Image registry key for banner image (value "dialog_title_banner_image").
static  String DLG_IMG_TITLE_ERROR
          Image registry key for error message image.
static  String INFO_MESSAGE
          Deprecated.   
static  String WARNING_MESSAGE
          Deprecated.   
 
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
TitleAreaDialog ( Shell parentShell)
          Instantiate a new title area dialog.
 
Method Summary
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   Control createDialogArea ( Composite parent)
          Creates and returns the contents of the upper part of this dialog (above the button bar).
protected   Point getInitialSize ()
          The TitleAreaDialog implementation of this Window methods returns an initial size which is at least some reasonable minimum.
protected   Composite getTitleArea ()
          Deprecated.   
protected   Label getTitleImageLabel ()
          Returns the title image label.
 void setErrorMessage ( String newErrorMessage)
          Display the given error message.
 void setMessage ( String newMessage)
          Set the message text.
 void setMessage ( String newMessage, int newType)
          Sets the message for this dialog with an indication of what type of message it is.
 void setTitle ( String newTitle)
          Sets the title to be shown in the title area of this dialog.
 void setTitleAreaColor ( RGB color)
          Sets the title bar color for this dialog.
 void setTitleImage ( Image newTitleImage)
          Sets the title image to be shown in the title area of this dialog.
 
Methods inherited from class org.eclipse.jface.dialogs. TrayDialog
close, closeTray, createButtonBar, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs. Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, 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, 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

DLG_IMG_TITLE_ERROR

public static final 
String DLG_IMG_TITLE_ERROR
Image registry key for error message image.

See Also:
Constant Field Values

DLG_IMG_TITLE_BANNER

public static final 
String DLG_IMG_TITLE_BANNER
Image registry key for banner image (value "dialog_title_banner_image").

See Also:
Constant Field Values

INFO_MESSAGE

public static final 
String INFO_MESSAGE
Deprecated. 
Message type constant used to display an info icon with the message.

Since:
2.0
See Also:
Constant Field Values

WARNING_MESSAGE

public static final 
String WARNING_MESSAGE
Deprecated. 
Message type constant used to display a warning icon with the message.

Since:
2.0
See Also:
Constant Field Values
Constructor Detail

TitleAreaDialog

public TitleAreaDialog(
Shell parentShell)
Instantiate a new title area dialog.

Parameters:
parentShell - the parent SWT shell
Method Detail

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()

createDialogArea

protected 
Control createDialogArea(
Composite parent)
Creates and returns the contents of the upper part of this dialog (above the button bar).

The Dialog implementation of this framework method creates and returns a new Composite with no margins and spacing. Subclasses should override.

Overrides:
createDialogArea in class Dialog
Parameters:
parent - The parent composite to contain the dialog area
Returns:
the dialog area control

getInitialSize

protected 
Point getInitialSize()
The TitleAreaDialog implementation of this Window methods returns an initial size which is at least some reasonable minimum.

Overrides:
getInitialSize in class Dialog
Returns:
the initial size of the dialog
See Also:
Dialog.getDialogBoundsSettings(), Dialog.getDialogBoundsStrategy()

getTitleArea

protected 
Composite getTitleArea()
Deprecated. 

Retained for backward compatibility. Returns the title area composite. There is no composite in this implementation so the shell is returned.

Returns:
Composite

getTitleImageLabel

protected 
Label getTitleImageLabel()
Returns the title image label.

Returns:
the title image label

setErrorMessage

public void setErrorMessage(
String newErrorMessage)
Display the given error message. The currently displayed message is saved and will be redisplayed when the error message is set to null.

Parameters:
newErrorMessage - the newErrorMessage to display or null

setMessage

public void setMessage(
String newMessage)
Set the message text. If the message line currently displays an error, the message is saved and will be redisplayed when the error message is set to null.

Shortcut for setMessage(newMessage, IMessageProvider.NONE)

This method should be called after the dialog has been opened as it updates the message label immediately.

Parameters:
newMessage - the message, or null to clear the message

setMessage

public void setMessage(
String newMessage,
                       int newType)
Sets the message for this dialog with an indication of what type of message it is.

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.

Parameters:
newMessage - the message, or null to clear the message
newType - the message type
Since:
2.0

setTitle

public void setTitle(
String newTitle)
Sets the title to be shown in the title area of this dialog.

Parameters:
newTitle - the title show

setTitleAreaColor

public void setTitleAreaColor(
RGB color)
Sets the title bar color for this dialog.

Parameters:
color - the title bar color

setTitleImage

public void setTitleImage(
Image newTitleImage)
Sets the title image to be shown in the title area of this dialog.

Parameters:
newTitleImage - the title image to be shown

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