
public class FormLayout extends AbstractUnitLayout implements LayoutManager
LayoutManager organizes elements in rows, maintaining each
element with it's label (this pair is managed as a Unit). Each
Row may contain more than one Unit (if both can fit in it).
Each Row is justified, ie all Units in each Row are
extended to occupy the full width provided. The spare space is added to each
Unit maintaining the ratio of space (minimum or preferred size).
Row is spaced one AbstractUnitLayout.gap between each other and
also the margin all arround has the same size.
gap, HORIZONAL_UNIT_HEIGHT_LIMIT, LABEL_HEIGHT_THRESHOLD, PIXELS_PER_FONT_SIZE, POST_NEWLINE, PRE_NEWLINE| Constructor and Description |
|---|
FormLayout()
Create a
FormLayout with a default gap of 5. |
FormLayout(int gap)
Create a
FormLayout witha specific gap. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(String name,
Component comp) |
void |
layoutContainer(Container parent) |
Dimension |
minimumLayoutSize(Container parent) |
Dimension |
preferredLayoutSize(Container parent) |
void |
removeLayoutComponent(Component comp) |
getSreenRatio, setNewLineAfter, setNewLineBeforepublic FormLayout()
FormLayout with a default gap of 5.public FormLayout(int gap)
FormLayout witha specific gap.gap - the space in pixels to leave between elements and as marginspublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerpreferredLayoutSize in class AbstractUnitLayoutpublic void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerlayoutContainer in class AbstractUnitLayoutpublic Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerminimumLayoutSize in class AbstractUnitLayoutpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagerremoveLayoutComponent in class AbstractUnitLayoutpublic void addLayoutComponent(String name, Component comp)
addLayoutComponent in interface LayoutManageraddLayoutComponent in class AbstractUnitLayoutCopyright © 2018 universAAL Consortium. All rights reserved.