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
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IconDlogTemplateLayout
public IconDlogTemplateLayout()
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
usedworkArea
- 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 areawidth
- the width to give it and the icon combinedheight
- the height to give it and the icon combinedx
- the x co-ordinate of the position at which we should
place ity
- 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