|
||||||||
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.
Fields inherited from class uk.co.ist.mwt.MarginLayoutManager |
marginHeight,
marginWidth |
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. |
protected void |
updateUnsized(java.awt.Component[] children)
A method to add a component to the list of components which did not have an explicit size set when they were added; called from layoutContainer() and preferred/minimumLayoutSize(). |
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 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 containerpreferredLayoutSize(java.awt.Container)
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
parent
- the parent containerminimumLayoutSize(java.awt.Container)
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)
protected void updateUnsized(java.awt.Component[] children)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |