uk.co.ist.mwt
Class IconDlogTemplateLayout

java.lang.Object
  |
  +--uk.co.ist.mwt.MarginLayoutManager
        |
        +--uk.co.ist.mwt.DlogTemplateLayout
              |
              +--uk.co.ist.mwt.IconDlogTemplateLayout

public class IconDlogTemplateLayout
extends DlogTemplateLayout

The IconDlogTemplateLayout class is an AWT layout manager class which knows how to lay out its children in a manner mimicking the Motif Dialog Template as produced by setting the dialogType resource on a XmMessageBox to anything other than XmDIALOG_TEMPLATE or XmDIALOG_MESSAGE. It extends the basic DlogTemplateLayout to handle an 'Icon' component. Menubars, unfortunately, are not handled.

See Also:
Serialized Form

Fields inherited from class uk.co.ist.mwt.MarginLayoutManager
marginHeight, marginWidth
 
Constructor Summary
IconDlogTemplateLayout()
           
 
Method Summary
protected  void addExtraComponents(java.awt.Container c)
          Add any extra components to the container that we're managing
 java.awt.Component getIcon()
          Gets the component being used as an icon
protected  boolean isNotWorkarea(java.awt.Component comp)
          Finds out if a particular component is the layout's work area
protected  void placeWorkArea(java.awt.Component workArea, int width, int height, int x, int y)
          Places the work area (and its icon) in a specified place
 void setIcon(java.awt.Component icon)
          Sets the component to use as an icon
protected  java.awt.Dimension workAreaSize(boolean minimum, java.awt.Component workArea)
          Calculates how much space the work area will take up
 
Methods inherited from class uk.co.ist.mwt.DlogTemplateLayout
addLayoutComponent, buttonSize, getComponents, getMinimizeButtons, isSeparatorVisible, layoutContainer, layoutSize, minimumLayoutSize, placeButtons, preferredLayoutSize, removeLayoutComponent, setMinimizeButtons, setSeparatorVisible
 
Methods inherited from class uk.co.ist.mwt.MarginLayoutManager
getMarginHeight, getMarginWidth, setMarginHeight, setMarginWidth, sizeOfComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconDlogTemplateLayout

public IconDlogTemplateLayout()
Method Detail

setIcon

public void setIcon(java.awt.Component icon)
Sets the component to use as an icon
Parameters:
icon - the component

getIcon

public java.awt.Component getIcon()
Gets the component being used as an icon

isNotWorkarea

protected boolean isNotWorkarea(java.awt.Component comp)
Finds out if a particular component is the layout's work area
Overrides:
isNotWorkarea in class DlogTemplateLayout
Parameters:
comp - the component
Returns:
true if the component is not the work area, false if it is

workAreaSize

protected java.awt.Dimension workAreaSize(boolean minimum,
                                          java.awt.Component workArea)
Calculates how much space the work area will take up
Overrides:
workAreaSize in class DlogTemplateLayout
Parameters:
minimum - true if the work area's minimum size should be used
workArea - the work area

placeWorkArea

protected void placeWorkArea(java.awt.Component workArea,
                             int width,
                             int height,
                             int x,
                             int y)
Places the work area (and its icon) in a specified place
Overrides:
placeWorkArea in class DlogTemplateLayout
Parameters:
workArea - the work area
width - the width to give it and the icon combined
height - the height to give it and the icon combined
x - the x co-ordinate of the position at which we should place it
y - the y co-ordinate of the position at which we should place it

addExtraComponents

protected void addExtraComponents(java.awt.Container c)
Add any extra components to the container that we're managing
Overrides:
addExtraComponents in class DlogTemplateLayout
Parameters:
c - the container