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 TypeMethodDescriptionvoidaddLayoutComponent(Component comp, Object constraints) Adds the given compoent to the layout using the given constraints.floatgetLayoutAlignmentX(Container target) Returns the alignment along the x axis.floatgetLayoutAlignmentY(Container target) Returns the alignment along the y axis.voidinvalidateLayout(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, setInternalVGapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
addLayoutComponentin 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:
maximumLayoutSizein interfaceLayoutManager2
-
getLayoutAlignmentX
Returns the alignment along the x axis.- Specified by:
getLayoutAlignmentXin interfaceLayoutManager2
-
getLayoutAlignmentY
Returns the alignment along the y axis.- Specified by:
getLayoutAlignmentYin interfaceLayoutManager2
-
invalidateLayout
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.- Specified by:
invalidateLayoutin interfaceLayoutManager2
-