|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmseries.utils.VFlowLayout
mseries.utils.MultiFormLayout
public class MultiFormLayout
A layout manager that is aware of the type children that have been added to it. If the
children are containers that have mseries.utils.FormLayout this layout
manager will try to ensure that each column remains vertically aligned with the others
giving the effect of continuous vertical columns. Importantly the effect is retained when
the container is resized. See the image, notice the field labels have been truncated as the
container has been shrunk. The children have borders labelled TopPanel & BottomPanel, both
children are containers with FormLayout.
In other words each column in one child will have the same
width as the corresponding column in the other child components.
Usage:
JPanel p = new JPanel();
p.setLayout(new MultiFormLayout());
p.add(panel1);
p.add(panel2);
where panel1 and panel2 are JPanels that have a FormLayout. Since the MulitFormLayout gathers the charateristics of each of its child panels as they are added to the containers, they must be complete before they are added, i.e. the application must have first added all the components to each FormLayout container before the FormLayout container is added to the MulitFormLayout container.
There will be occasions when some child components should not participate in the scheme described above. This will occur when the components layout manager is not FormLayout or, if it is FormLayout, when the component is added with the NONPARTICIPANT constraint.
FormLayout,
Serialized Form| Field Summary | |
|---|---|
static Integer |
NONPARTICIPANT
Pass this constant as a constraint when adding a FormLayout container to the MultiFormLayout container if the FormLayout container is not to participate with other FormLayouts in the MulitFormLayout. |
static Integer |
PARTICIPANT
Pass this constant as a constraint when adding a FormLayout container to the MultiFormLayout container if the FormLayout container is to participate with other FormLayouts in the MulitFormLayout. |
| Constructor Summary | |
|---|---|
MultiFormLayout()
The preferred constructor |
|
MultiFormLayout(Container target)
This constructor simply delegates to MultiFormLayout(), it remains for backward compatibility with previous versions |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(Component comp)
Not used by this component |
void |
addLayoutComponent(Component comp,
Object constraints)
Add the components to the layout manager, the container will call this method, not the application code. |
void |
layoutContainer(Container parent)
Allow the BoxLayout to lay out the container as usual |
| Methods inherited from class mseries.utils.VFlowLayout |
|---|
addLayoutComponent, calculateLayoutSize, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutSize, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Integer NONPARTICIPANT
public static final Integer PARTICIPANT
| Constructor Detail |
|---|
public MultiFormLayout(Container target)
target - the thing being layed out (not used)public MultiFormLayout()
| Method Detail |
|---|
public void addLayoutComponent(Component comp)
a - runtime exception if it gets called.
public void addLayoutComponent(Component comp,
Object constraints)
addLayoutComponent in interface LayoutManager2addLayoutComponent in class VFlowLayoutpublic void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerlayoutContainer in class VFlowLayout
|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||