Package com.portal.ctrl
Class Form
java.lang.Object
com.HawkinsSoftware.FormLayout
com.portal.ctrl.Form
- All Implemented Interfaces:
LayoutManager
,LayoutManager2
,Serializable
This class extends FormLayout from HawkinsSoftware. It allows you to layout
compoents in a "label/field" layout, but it allows you to use any component
for the label/field. Components are added to a specified row and column and
can span multiple rows.
It uses FormConstraints to specify how the compoents are to be laid out.
- Author:
- Monica Gaines
- See Also:
-
Field Summary
Fields inherited from class com.HawkinsSoftware.FormLayout
DEFAULT, FREE_FIELD, FREE_LABEL, LABEL_ON_TOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(Component comp, Object constraints) Adds the given compoent to the layout using the given constraints.float
getLayoutAlignmentX
(Container target) Returns the alignment along the x axis.float
getLayoutAlignmentY
(Container target) Returns the alignment along the y axis.void
invalidateLayout
(Container target) Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.maximumLayoutSize
(Container target) Returns the maximum size for this layout.Methods inherited from class com.HawkinsSoftware.FormLayout
add, add, add, add, add, add, addLayoutComponent, addMultiRow, addMultiRow, addMultiRow, addMultiRow, addMultiRow, addMultiRow, getDefaultFillRightPct, getExternalHGap, getExternalVGap, getInternalHGap, getInternalVGap, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setDefaultFillRightPct, setExternalHGap, setExternalVGap, setInternalHGap, setInternalVGap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.LayoutManager
addLayoutComponent, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
-
Constructor Details
-
Form
public Form()Creates a new Form with default gaps horizontally and vertically between components and no external gaps.- Parameters:
p
- the container that is needs to be laid out
-
Form
public Form(int intHGap, int intVGap, int extHGap, int extVGap) Creates a new Form with the given gaps.- Parameters:
intHGap
- the pixel amount separating label/field horizontallyintVGap
- the pixel amount separating label/field verticallyextHGap
- the amount the layout is bounded left and rightextVGap
- the amount the layout is bounded top and bottomp
- the container that is needs to be laid out
-
-
Method Details
-
addLayoutComponent
Adds the given compoent to the layout using the given constraints.- Specified by:
addLayoutComponent
in interfaceLayoutManager2
- Parameters:
comp
- the component to be added to the layoutconstraints
- the constraints to be applied to the component
-
maximumLayoutSize
Returns the maximum size for this layout.- Specified by:
maximumLayoutSize
in interfaceLayoutManager2
-
getLayoutAlignmentX
Returns the alignment along the x axis.- Specified by:
getLayoutAlignmentX
in interfaceLayoutManager2
-
getLayoutAlignmentY
Returns the alignment along the y axis.- Specified by:
getLayoutAlignmentY
in interfaceLayoutManager2
-
invalidateLayout
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.- Specified by:
invalidateLayout
in interfaceLayoutManager2
-