Class FormConstraints

java.lang.Object
com.portal.ctrl.FormConstraints
All Implemented Interfaces:
Serializable

public class FormConstraints extends Object implements Serializable
Specifies the constriants for the components that are laid out using the Form class.
Author:
Monica Gaines
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Specifies the column where the component is to be placed.
    double
    Chooses when to right justify the component based on its stretchablity.
    static final int
    Specifies that the field aligns to the right of the other fields in its column.
    static final int
    Specifies that the label aligns to the left of the other labels in its column.
    int
    Specifies the number of rows that the component spans.
    Specifies the component or label to the right.
    static final int
    Specifies that the label aligns vertically with the field in the row directly proceeding it.
    int
    Specifies the alignment for the compoent.
    int
    Specifies the row where the component is to be placed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a FormConstraints object with all values set to the defaults.
    FormConstraints(int row, int col, int height, int mode, double fillRightPct, Component c)
    Creates a FormConstraints object with using the given values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the default values for all of the constraints.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FREE_LABEL

      public static final int FREE_LABEL
      Specifies that the label aligns to the left of the other labels in its column.
      See Also:
    • FREE_FIELD

      public static final int FREE_FIELD
      Specifies that the field aligns to the right of the other fields in its column.
      See Also:
    • LABEL_ON_TOP

      public static final int LABEL_ON_TOP
      Specifies that the label aligns vertically with the field in the row directly proceeding it.
      See Also:
    • row

      public int row
      Specifies the row where the component is to be placed.
    • column

      public int column
      Specifies the column where the component is to be placed.
    • height

      public int height
      Specifies the number of rows that the component spans.
    • mode

      public int mode
      Specifies the alignment for the compoent. Valid values are * -1, FREE_LABEL, FREE_FIELD, LABEL_ON_TOP.
    • fillRightPct

      public double fillRightPct
      Chooses when to right justify the component based on its stretchablity. Stretchablity is the difference between a component's preferred and minimum widths. Valid values are -1, 0, 1, or between 0 and 1.
    • label

      public Component label
      Specifies the component or label to the right.
  • Constructor Details

    • FormConstraints

      public FormConstraints()
      Creates a FormConstraints object with all values set to the defaults.
    • FormConstraints

      public FormConstraints(int row, int col, int height, int mode, double fillRightPct, Component c)
      Creates a FormConstraints object with using the given values.
      Parameters:
      row - the row to place the component
      col - the column to place the compoent
      height - the number of rows the component spans
      mode - the aligment for the component
      fillRightPct - the percentage for right justifcation of the compnent
      c - the component to use as a "label"
  • Method Details

    • setDefaults

      public void setDefaults()
      Sets the default values for all of the constraints.