IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.rcp.wizard
Class DialogComposite

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by com.ibm.btt.rcp.wizard.DialogComposite
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
TitileAreaDialogComposite

public class DialogComposite
extends org.eclipse.swt.widgets.Composite


Field Summary
 org.eclipse.swt.widgets.Control buttonBar
          The button bar; null until dialog is layed out.
protected  org.eclipse.swt.widgets.Control dialogArea
          The dialog area; null until dialog is layed out.
static java.lang.String INN_DLG_IMG_HELP
          Image registry key for help image (value "dialog_help_image").
static java.lang.String INN_DLG_IMG_MESSAGE_ERROR
          Image registry key for info message image (value "dialog_message_error_image").
static java.lang.String INN_DLG_IMG_MESSAGE_INFO
          Image registry key for info message image (value "dialog_messasge_info_image").
static java.lang.String INN_DLG_IMG_MESSAGE_WARNING
          Image registry key for info message image (value "dialog_messasge_warning_image").
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
DialogComposite(org.eclipse.swt.widgets.Composite parent, int style)
           
 
Method Summary
static void applyDialogFont(org.eclipse.swt.widgets.Control control)
          Applies the dialog font to all controls that currently have the default font.
protected  void buttonPressed(int buttonId)
          Notifies that this dialog's button with the given id has been pressed.
static int convertHorizontalDLUsToPixels(org.eclipse.swt.graphics.FontMetrics fontMetrics, int dlus)
          Returns the number of pixels corresponding to the given number of horizontal dialog units.
protected  int convertHorizontalDLUsToPixels(int dlus)
           
static int convertVerticalDLUsToPixels(org.eclipse.swt.graphics.FontMetrics fontMetrics, int dlus)
          Returns the number of pixels corresponding to the given number of vertical dialog units.
protected  int convertVerticalDLUsToPixels(int dlus)
           
protected  org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent, int id, java.lang.String label, boolean defaultButton)
           
protected  org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
           
protected  void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected static boolean dialogFontIsDefault()
          Return whether or not the dialog font is currently the same as the default font.
protected  org.eclipse.swt.widgets.Button getButton(int id)
           
protected  org.eclipse.swt.widgets.Control getButtonBar()
           
protected  org.eclipse.swt.widgets.Control getDialogArea()
           
protected  void initializeDialogUnits(org.eclipse.swt.widgets.Control control)
           
protected  void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
          Set the layout data of the button to a GridData with appropriate heights and widths.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, 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, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INN_DLG_IMG_MESSAGE_INFO

public static final java.lang.String INN_DLG_IMG_MESSAGE_INFO
Image registry key for info message image (value "dialog_messasge_info_image").

Since:
2.0
See Also:
Constant Field Values

INN_DLG_IMG_MESSAGE_WARNING

public static final java.lang.String INN_DLG_IMG_MESSAGE_WARNING
Image registry key for info message image (value "dialog_messasge_warning_image").

Since:
2.0
See Also:
Constant Field Values

INN_DLG_IMG_MESSAGE_ERROR

public static final java.lang.String INN_DLG_IMG_MESSAGE_ERROR
Image registry key for info message image (value "dialog_message_error_image").

Since:
2.0
See Also:
Constant Field Values

INN_DLG_IMG_HELP

public static final java.lang.String INN_DLG_IMG_HELP
Image registry key for help image (value "dialog_help_image").

Since:
3.2
See Also:
Constant Field Values

dialogArea

protected org.eclipse.swt.widgets.Control dialogArea
The dialog area; null until dialog is layed out.


buttonBar

public org.eclipse.swt.widgets.Control buttonBar
The button bar; null until dialog is layed out.

Constructor Detail

DialogComposite

public DialogComposite(org.eclipse.swt.widgets.Composite parent,
                       int style)
Method Detail

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)

createButtonBar

protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)

createButtonsForButtonBar

protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)

createButton

protected org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
                                                      int id,
                                                      java.lang.String label,
                                                      boolean defaultButton)

initializeDialogUnits

protected void initializeDialogUnits(org.eclipse.swt.widgets.Control control)

applyDialogFont

public static void applyDialogFont(org.eclipse.swt.widgets.Control control)
Applies the dialog font to all controls that currently have the default font.

Parameters:
control - the control to apply the font to. Font will also be applied to its children. If the control is null nothing happens.

dialogFontIsDefault

protected static boolean dialogFontIsDefault()
Return whether or not the dialog font is currently the same as the default font.

Returns:
boolean if the two are the same

buttonPressed

protected void buttonPressed(int buttonId)
Notifies that this dialog's button with the given id has been pressed.

The Dialog implementation of this framework method calls okPressed if the ok button is the pressed, and cancelPressed if the cancel button is the pressed. All other button presses are ignored. Subclasses may override to handle other buttons, but should call super.buttonPressed if the default handling of the ok and cancel buttons is desired.

Parameters:
buttonId - the id of the button that was pressed (see IDialogConstants.*_ID constants)

setButtonLayoutData

protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
Set the layout data of the button to a GridData with appropriate heights and widths.

Parameters:
button -

getDialogArea

protected org.eclipse.swt.widgets.Control getDialogArea()

getButtonBar

protected org.eclipse.swt.widgets.Control getButtonBar()

getButton

protected org.eclipse.swt.widgets.Button getButton(int id)

convertVerticalDLUsToPixels

protected int convertVerticalDLUsToPixels(int dlus)

convertVerticalDLUsToPixels

public static int convertVerticalDLUsToPixels(org.eclipse.swt.graphics.FontMetrics fontMetrics,
                                              int dlus)
Returns the number of pixels corresponding to the given number of vertical dialog units.

The required FontMetrics parameter may be created in the following way: GC gc = new GC(control); gc.setFont(control.getFont()); fontMetrics = gc.getFontMetrics(); gc.dispose();

Parameters:
fontMetrics - used in performing the conversion
dlus - the number of vertical dialog units
Returns:
the number of pixels
Since:
2.0

convertHorizontalDLUsToPixels

protected int convertHorizontalDLUsToPixels(int dlus)

convertHorizontalDLUsToPixels

public static int convertHorizontalDLUsToPixels(org.eclipse.swt.graphics.FontMetrics fontMetrics,
                                                int dlus)
Returns the number of pixels corresponding to the given number of horizontal dialog units.

The required FontMetrics parameter may be created in the following way: GC gc = new GC(control); gc.setFont(control.getFont()); fontMetrics = gc.getFontMetrics(); gc.dispose();

Parameters:
fontMetrics - used in performing the conversion
dlus - the number of horizontal dialog units
Returns:
the number of pixels
Since:
2.0

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011