|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.zaval.lw.LwListLayout
The class implements layout manager interface. Every following component is laidout under previous component. The preferred width is calculated as a maximum among children preferred size widths of the owner component.
Constructor Summary | |
LwListLayout()
Constructs the layout manager. |
|
LwListLayout(int gap)
Constructs the layout manager with the specified gap. |
Method Summary | |
java.awt.Dimension |
calcPreferredSize(LayoutContainer lw)
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. |
int |
getLines()
Implements org.zaval.misc.PosInfo interface method to define number of lines. |
int |
getLineSize(int line)
Implements org.zaval.misc.PosInfo interface method to define the line size. |
int |
getMaxOffset()
Implements org.zaval.misc.PosInfo interface method to define max offset. |
void |
layout(LayoutContainer lw)
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 |
Constructor Detail |
public LwListLayout()
public LwListLayout(int gap)
gap
- the specified gap.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 lw)
calcPreferredSize
in interface LwLayout
lw
- the layout container.public void layout(LayoutContainer lw)
layout
in interface LwLayout
target
- the layout container that needs to be laid out.public int getLineSize(int line)
getLineSize
in interface PosInfo
line
- the line number.public int getLines()
getLines
in interface PosInfo
public int getMaxOffset()
getMaxOffset
in interface PosInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |