Class | Tree | Deprecated | Index | Help | |||
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.DrawingAreaLayout
The DrawingAreaLayout is a very simple layout manager - it leaves all child components where they want to be (that is, it doesn't move them), unless their position would put them inside the margin space.
If a child is added with no set size, then it will always be resized to its preferred size, even if the size is set later
It gives a minimum size of (2 * marginWidth, 2 * marginHeight) and a preferred size which makes all child components visible.
Constructor Summary | |
DrawingAreaLayout()
|
Method Summary | |
void | addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Add a component to the layout manager's records. |
void | layoutContainer(java.awt.Container parent)
Lays out the container. |
java.awt.Dimension | minimumLayoutSize(java.awt.Container parent)
Find the minimum size for a paretn container with this layout. |
java.awt.Dimension | preferredLayoutSize(java.awt.Container parent)
Work out how large the parent Container should be to hold everthing comfortably. |
void | removeLayoutComponent(java.awt.Component comp)
Remove a component from the layout manager's records. |
Methods inherited from class uk.co.ist.mwt.MarginLayoutManager | |
addLayoutComponent, getMarginHeight, getMarginWidth, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setMarginHeight, setMarginWidth |
Methods inherited from class java.lang.Object | |
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public DrawingAreaLayout()
Method Detail |
public void layoutContainer(java.awt.Container parent)
parent
- the component which needs to be laid outpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
parent
- the parent containerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
parent
- the parent containerpublic void removeLayoutComponent(java.awt.Component comp)
comp
- would be the component to remove.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.Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |