Eclipse Platform
Release 3.2

org.eclipse.jface.dialogs
Class ImageAndMessageArea

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.jface.dialogs.ImageAndMessageArea
All Implemented Interfaces:
Drawable

public class ImageAndMessageArea
extends Composite

Instances of this class provide a message area to display a message and an associated image.

Since:
3.2 This class is not intended to be extended by clients.

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
ImageAndMessageArea(Composite parent, int style)
          Constructs a new ImageAndMessageArea with an empty decorated field.
 
Method Summary
 void setBackground(Color bg)
          Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
 void setFont(Font font)
          Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
 void setImage(Image image)
          Adds an image to decorated field to be shown in the message area.
 void setText(String text)
          Sets the text in the decorated field which will be displayed in the message area.
 void setToolTipText(String text)
          Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageAndMessageArea

public ImageAndMessageArea(Composite parent,
                           int style)
Constructs a new ImageAndMessageArea with an empty decorated field. Calls to setText(String text) and setImage(Image image) are required in order to fill the message area. Also, the instance will be invisible when initially created.

The style bit SWT.WRAP should be used if a larger message area is desired.

Parameters:
parent - the parent composite
style - the SWT style bits. Using SWT.WRAP will create a larger message area.
Method Detail

setBackground

public void setBackground(Color bg)
Description copied from class: Control
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.

Overrides:
setBackground in class Control
Parameters:
bg - the new color (or null)

setText

public void setText(String text)
Sets the text in the decorated field which will be displayed in the message area.

Parameters:
text - the text to be displayed in the message area
See Also:
Text.setText(String string)

setImage

public void setImage(Image image)
Adds an image to decorated field to be shown in the message area.

Parameters:
image - desired image to be shown in the ImageAndMessageArea

setFont

public void setFont(Font font)
Description copied from class: Control
Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.

Overrides:
setFont in class Control
Parameters:
font - the new font (or null)

setToolTipText

public void setToolTipText(String text)
Description copied from class: Control
Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.

Overrides:
setToolTipText in class Control
Parameters:
text - the new tool tip text (or null)

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.