|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.contrib.StandardLayouter
public class StandardLayouter
A StandardLayouter contains standard algorithm for layouting a Layoutable. As a standard behaviour all child components of a Layoutable are laid out underneath each other starting from top to bottom while the x position of all child components stays the same and the width is forced to the width of the maximum width. At the end the presentation figure of the Layoutable is set to the maximum x and y size to encompass all contained child components graphically as well.
Constructor Summary | |
---|---|
StandardLayouter()
Default constructor which is needed for the Storable mechanism. |
|
StandardLayouter(Layoutable newLayoutable)
Constructor which associates a StandardLayouter with a certain Layoutable. |
Method Summary | |
---|---|
java.awt.Rectangle |
calculateLayout(java.awt.Point origin,
java.awt.Point corner)
|
java.awt.Insets |
getInsets()
Get the insets for spacing between the figure and its subfigures |
Layoutable |
getLayoutable()
Get the figure upon which the layout strategy operates. |
java.awt.Rectangle |
layout(java.awt.Point origin,
java.awt.Point corner)
Method which lays out a figure. |
void |
read(StorableInput dr)
Reads the contained figures from StorableInput. |
void |
setInsets(java.awt.Insets newInsets)
Set the insets for spacing between the figure and its subfigures |
void |
setLayoutable(Layoutable newLayoutable)
Set the figure upon which the layout strategy operates. |
void |
write(StorableOutput dw)
Writes the contained figures to the StorableOutput. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardLayouter()
public StandardLayouter(Layoutable newLayoutable)
newLayoutable
- Layoutable to be laid outMethod Detail |
---|
public Layoutable getLayoutable()
public void setLayoutable(Layoutable newLayoutable)
newLayoutable
- Layoutable to be laid outpublic java.awt.Rectangle calculateLayout(java.awt.Point origin, java.awt.Point corner)
calculateLayout
in interface Layouter
public java.awt.Rectangle layout(java.awt.Point origin, java.awt.Point corner)
layout
in interface Layouter
origin
- start point for the layoutcorner
- minimum corner point for the layoutpublic void read(StorableInput dr) throws java.io.IOException
read
in interface Storable
java.io.IOException
public void write(StorableOutput dw)
write
in interface Storable
public void setInsets(java.awt.Insets newInsets)
setInsets
in interface Layouter
newInsets
- new spacing dimensionspublic java.awt.Insets getInsets()
getInsets
in interface Layouter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |