|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.zaval.lw.LwRasterLayout
This class implements layout manager interface. The layout manager uses original
locations (that have been set with setLocation
method) and original
sizes (that have been set with setSize
method) or preferred sizes to layout
child components. It is possible to align child components sizes according to the
parent component, in this case the child component will be sized to have right bottom
corner in the right bottom corner of the parent container.
The layout manager is the same null
layout manager in Java AWT
library terms if the original sizes are used (layout flag is 0
).
Field Summary | |
static int |
H_BY_PARENT
Defines child heights alignment by the parent component. |
static int |
USE_PS_SIZE
Defines childs prefered sizes usage as the child sizes. |
static int |
W_BY_PARENT
Defines child widths alignment by the parent component. |
Constructor Summary | |
LwRasterLayout()
Constructs the layout manager that uses child components locations and sizes to layout its. |
|
LwRasterLayout(int f)
Constructs the layout manager with the specified layout flag. |
Method Summary | |
java.awt.Dimension |
calcPreferredSize(LayoutContainer c)
Calculates the preferred size dimensions for the layout container. |
void |
componentAdded(java.lang.Object id,
Layoutable lw,
int index)
Invoked when the specified layoutable component is added to the layout container (that uses the layout manager). |
void |
componentRemoved(Layoutable lw,
int index)
Invoked when the specified layoutable component is removed from the layout container, that uses the layout manager. |
void |
layout(LayoutContainer c)
Lays out the child layoutable components inside the layout container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int W_BY_PARENT
public static final int H_BY_PARENT
public static final int USE_PS_SIZE
Constructor Detail |
public LwRasterLayout()
null
layout for Java AWT Library.public LwRasterLayout(int f)
f
- the specified layout flag.Method Detail |
public void componentAdded(java.lang.Object id, Layoutable lw, int index)
componentAdded
in interface LwLayout
id
- the layoutable component constraints.lw
- the layoutable component.index
- the child index.public void componentRemoved(Layoutable lw, int index)
componentRemoved
in interface LwLayout
lw
- the layoutable component to be removedindex
- the child index.public java.awt.Dimension calcPreferredSize(LayoutContainer c)
calcPreferredSize
in interface LwLayout
c
- the layout container.public void layout(LayoutContainer c)
getLayoutOffset
method of the container.layout
in interface LwLayout
c
- the layout container that needs to be laid out.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |