de.frag.umlplugin.guilayout
Class FlexConstraints

java.lang.Object
  extended by de.frag.umlplugin.guilayout.FlexConstraints

public class FlexConstraints
extends java.lang.Object

FlexConstraints describe layout constraints for FlexLayout.

See Also:
FlexLayout, LayoutBuilder

Field Summary
 de.frag.umlplugin.guilayout.Alignment alignmentX
          Horizontal alignment of components.
 de.frag.umlplugin.guilayout.Alignment alignmentY
          Vertical alignment of components.
 java.awt.Insets insets
          Insets of a component.
static java.awt.Insets NULL_INSETS
           
 float weightX
          Horizontal weight of component.
 float weightY
          Vertical weight of component.
 
Constructor Summary
FlexConstraints()
          Construct a new FlexConstraints object with default values.
FlexConstraints(de.frag.umlplugin.guilayout.Alignment alignmentX, de.frag.umlplugin.guilayout.Alignment alignmentY, float weightX, float weightY, java.awt.Insets insets)
          Construct a new FlexConstraints object with the given values.
FlexConstraints(FlexConstraints constraints)
          Construct a new FlexConstraints object by copying the given constraints.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_INSETS

public static final java.awt.Insets NULL_INSETS

alignmentX

public final de.frag.umlplugin.guilayout.Alignment alignmentX
Horizontal alignment of components. This should be one of ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_FILL, ALIGN_MAX or ALIGN_STRETCH.


alignmentY

public final de.frag.umlplugin.guilayout.Alignment alignmentY
Vertical alignment of components. This should be one of ALIGN_TOP, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_FILL, ALIGN_MAX or ALIGN_STRETCH.


weightX

public final float weightX
Horizontal weight of component. If the horizontal alignment is ALIGN_STRETCH, then the weight specifies how much space will be reserved for this component in relation to other stretchable components of the same row, else this value will be ignored.


weightY

public final float weightY
Vertical weight of component. If the vertical alignment is ALIGN_STRETCH, then the weight specifies how much space will be reserved for this component in relation to other stretchable components of the same column, else this value will be ignored.


insets

public java.awt.Insets insets
Insets of a component. Additional space will be reserved to the top, left, bottom and right of the component according to the values of the insets. If this is null, it will behave like Insets (0, 0, 0, 0).

Constructor Detail

FlexConstraints

public FlexConstraints()
Construct a new FlexConstraints object with default values.


FlexConstraints

public FlexConstraints(@NotNull
                       FlexConstraints constraints)
Construct a new FlexConstraints object by copying the given constraints.

Parameters:
constraints - constraints to copy

FlexConstraints

public FlexConstraints(@NotNull
                       de.frag.umlplugin.guilayout.Alignment alignmentX,
                       @NotNull
                       de.frag.umlplugin.guilayout.Alignment alignmentY,
                       float weightX,
                       float weightY,
                       @Nullable
                       java.awt.Insets insets)
Construct a new FlexConstraints object with the given values.

Parameters:
alignmentX - Horizontal alignment of components. This should be one of ALIGN_LEFT, ALIGN_RIGHT, ALIGN_FILL ALIGN_CENTER, ALIGN_MAX or ALIGN_STRETCH.
alignmentY - Vertical alignment of components. This should be one of ALIGN_TOP, ALIGN_BOTTOM, ALIGN_FILL ALIGN_CENTER, ALIGN_MAX or STRETCH.
weightX - Horizontal weight of component. If the horizontal alignment is ALIGN_STRETCH, then the weight specifies how much space will be reserved for this component in relation to other stretchable components of the same row, else this value will be ignored.
weightY - Vertical weight of component. If the vertical alignment is ALIGN_STRETCH, then the weight specifies how much space will be reserved for this component in relation to other stretchable components of the same column, else this value will be ignored.
insets - Insets of a component. Additional space will be reserved to the top, left, bottom and right of the component according to the values of the insets. If this is null, it will behave like Insets (0, 0, 0, 0).
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object