|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.ist.mwt.MarginLayoutManager | +--uk.co.ist.mwt.DlogTemplateLayout
The DlogTemplateLayout 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 XmDIALOG_TEMPLATE. Menubars, unfortunately, are not handled.
Fields inherited from class uk.co.ist.mwt.MarginLayoutManager |
marginHeight,
marginWidth |
Constructor Summary | |
DlogTemplateLayout()
|
Method Summary | |
protected void |
addExtraComponents(java.awt.Container c)
Adds any extra components to the container that we're managing - eg. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Add a component to the layout manager's records. |
protected java.awt.Dimension |
buttonSize(boolean minimumSize)
Finds how large a button should be in the layout. |
protected void |
getComponents(java.awt.Container parent)
Gets the list of components for a given parent container, ignoring components which were added by this layout - eg. |
boolean |
getMinimizeButtons()
Get accessor for the /minimizeButtons/ flag |
protected boolean |
isNotWorkarea(java.awt.Component comp)
Is the passed-in component a work area/button or something that is just there for the appearance of the dialog? |
boolean |
isSeparatorVisible()
|
void |
layoutContainer(java.awt.Container parent)
Lays out the container. |
protected java.awt.Dimension |
layoutSize(boolean minimum,
java.awt.Container parent)
Calculates how much space the layed-out components will take up. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size this layout would need to lay out all of the children of the container |
protected void |
placeButtons(java.util.Vector buttons,
int buttonTop,
java.awt.Dimension parentSize,
java.awt.Dimension buttonsSize,
java.awt.Insets insets)
Places the buttons in the correct place for this layout |
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 |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the size this layout would like to lay out all of the children of the container |
void |
removeLayoutComponent(java.awt.Component comp)
Remove a component from the layout manager's records. |
void |
setMinimizeButtons(boolean minimize)
Accessor to set the layout so that it makes all buttons their preferred sizes, rather than setting them all to the size of the largest. |
void |
setSeparatorVisible(boolean b)
|
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.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 |
public DlogTemplateLayout()
Method Detail |
public void setMinimizeButtons(boolean minimize)
getMinimizeButtons()
public boolean getMinimizeButtons()
setMinimizeButtons(boolean)
public void layoutContainer(java.awt.Container parent)
parent
- the container to lay outprotected void placeButtons(java.util.Vector buttons, int buttonTop, java.awt.Dimension parentSize, java.awt.Dimension buttonsSize, java.awt.Insets insets)
buttons
- the list of buttonsbuttonTop
- the y co-ordinate for the buttonsparentSize
- the size of our parent container with the insets
- but not the margins - already deducted.buttonSize
- the size each button should be if we're not
minimising them.protected void placeWorkArea(java.awt.Component workArea, int width, int height, int x, int y)
workArea
- the work area componentwidth
- the width you want it to haveheight
- the height you want it to havex
- the x co-ordinate you want it to havey
- the y co-ordinate you want it to haveprotected java.awt.Dimension buttonSize(boolean minimumSize)
minimumSize
- use getMinimumSize when asking child components for
their size - not getPreferredSize.protected java.awt.Dimension workAreaSize(boolean minimum, java.awt.Component workArea)
miniumum
- use getMinimumSize when asking child components for
their size - not getPreferredSize.workArea
- the component this layout is using as its work area -
the non-button childprotected java.awt.Dimension layoutSize(boolean minimum, java.awt.Container parent)
minimum
- decides whether the size you get back is the minimum
(true) or preferred size.parent
- the Container this layout should try to lay out inpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
parent
- the containerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
parent
- the containerprotected void addExtraComponents(java.awt.Container c)
c
- the containerprotected void getComponents(java.awt.Container parent)
parent
- the parentprotected boolean isNotWorkarea(java.awt.Component comp)
public void removeLayoutComponent(java.awt.Component comp)
comp
- would be the component to remove.addLayoutComponent(java.lang.String, java.awt.Component)
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
comp
- would be the component to add.name
- would be the name with which to add the component.removeLayoutComponent(java.awt.Component)
public void setSeparatorVisible(boolean b)
public boolean isSeparatorVisible()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |