Documentation of 'org.bounce.FormConstraints' Java class
FormConstraints
org.bounce

Class FormConstraints



  • public class FormConstraints
    extends java.lang.Object
    A constraints object, used for the FormLayout, the constraints allow for setting the components position, alignments and fill type.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int BOTTOM
      BOTTOM position
      static int CENTER
      CENTER position
      static int FULL
      FULL position
      static int LEFT
      LEFT position
      static int RIGHT
      RIGHT position
      static int TOP
      TOP position
    • Constructor Summary

      Constructors 
      Constructor and Description
      FormConstraints()
      Constructs a default FormConstraint which positions the component over both columns and aligns the component horizontally to the LEFT and vertically at the CENTER.
      FormConstraints(FormConstraints constraint)
      Constructs a FormConstraint which copies its values from the constraint supplied.
      FormConstraints(int position)
      Constructs a default FormConstraint which aligns the component horizontally to the LEFT and vertically at the CENTER and positions the component at the position supplied.
      FormConstraints(int position, boolean filled)
      Constructs a FormConstraint with the filled value set to the value supplied.
      FormConstraints(int position, int horizontalAlignment)
      Constructs a FormConstraint which aligns the component horizontally with the value supplied and vertically at the CENTER.
      FormConstraints(int position, int horizontalAlignment, int verticalAlignment)
      Constructs a FormConstraint which aligns the component horizontally and vertically with the values supplied.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object object)
      Finds out if the values in this FormConstraint are equal to the supplied object.
      int getHorizontalAlignment()
      Returns the horizontal alignment for the component.
      int getPosition()
      Returns the column position of the component.
      int getVerticalAlignment()
      Returns the vertical alignment for the component.
      boolean isFilled()
      Returns wether the component occupies the full available horizontal space.
      void setFilled(boolean enabled)
      Sets wether the component should occupy the full available horizontal space.
      void setHorizontalAlignment(int alignment)
      Sets the horizontal alignment for the component.
      void setPosition(int position)
      Sets the column position of the component; LEFT, for a component in the left column.
      void setVerticalAlignment(int alignment)
      Sets the vertical alignment for the component.
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormConstraints

        public FormConstraints()
        Constructs a default FormConstraint which positions the component over both columns and aligns the component horizontally to the LEFT and vertically at the CENTER.
      • FormConstraints

        public FormConstraints(int position)
        Constructs a default FormConstraint which aligns the component horizontally to the LEFT and vertically at the CENTER and positions the component at the position supplied.
        Parameters:
        position - the column position of the component.
      • FormConstraints

        public FormConstraints(int position,
                               boolean filled)
        Constructs a FormConstraint with the filled value set to the value supplied. If the value is set to true, the alignment is no longer important.
        Parameters:
        position - the column position of the component.
        filled - whether the component should fill the available horizontal space.
      • FormConstraints

        public FormConstraints(int position,
                               int horizontalAlignment)
        Constructs a FormConstraint which aligns the component horizontally with the value supplied and vertically at the CENTER.
        Parameters:
        position - the column position of the component.
        horizontalAlignment - the horizontal alignment type.
      • FormConstraints

        public FormConstraints(int position,
                               int horizontalAlignment,
                               int verticalAlignment)
        Constructs a FormConstraint which aligns the component horizontally and vertically with the values supplied.
        Parameters:
        position - the column position of the component.
        horizontalAlignment - the horizontal alignment type.
        verticalAlignment - the vertical alignment type.
      • FormConstraints

        public FormConstraints(FormConstraints constraint)
        Constructs a FormConstraint which copies its values from the constraint supplied.
        Parameters:
        constraint - the form constraint to copy the values from.
    • Method Detail

      • setFilled

        public void setFilled(boolean enabled)
        Sets wether the component should occupy the full available horizontal space. The values for Horizontal and vertical alignment are discarded when the component is filled.
        Parameters:
        enabled - enables/disables the filling of the full space.
      • isFilled

        public boolean isFilled()
        Returns wether the component occupies the full available horizontal space. The values for Horizontal and vertical alignment are discarded when the component is filled.
        Returns:
        the filling of the available space.
      • setHorizontalAlignment

        public void setHorizontalAlignment(int alignment)
        Sets the horizontal alignment for the component. The alignment can be any of the following values: LEFT, for a left aligned component. CENTER, for a center aligned component. RIGHT, for a right aligned component.
        Parameters:
        alignment - the horizontal alignment.
      • getHorizontalAlignment

        public int getHorizontalAlignment()
        Returns the horizontal alignment for the component.
        Returns:
        the horizontal alignment.
        See Also:
        setHorizontalAlignment(int)
      • setVerticalAlignment

        public void setVerticalAlignment(int alignment)
        Sets the vertical alignment for the component. The alignment can be any of the following values: TOP, for a top aligned component. CENTER, for a center aligned component. BOTTOM, for a bottom aligned component.
        Parameters:
        alignment - the vertical alignment.
      • getVerticalAlignment

        public int getVerticalAlignment()
        Returns the vertical alignment for the component.
        Returns:
        the vertical alignment.
        See Also:
        setVerticalAlignment(int)
      • setPosition

        public void setPosition(int position)
        Sets the column position of the component; LEFT, for a component in the left column. RIGHT, for a component in the right column. FULL, for a component that occupies both columns.
        Parameters:
        position - the column position of the component.
      • getPosition

        public int getPosition()
        Returns the column position of the component.
        Returns:
        the column position.
        See Also:
        setPosition(int)
      • equals

        public boolean equals(java.lang.Object object)
        Finds out if the values in this FormConstraint are equal to the supplied object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - the object to test.
        Returns:
        true when equal.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.