public class FormConstraints extends Object
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 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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.
|
public static final int LEFT
public static final int BOTTOM
public static final int RIGHT
public static final int TOP
public static final int CENTER
public static final int FULL
public FormConstraints()
public FormConstraints(int position)
position
- the column position of the component.public FormConstraints(int position, boolean filled)
position
- the column position of the component.filled
- whether the component should fill the available
horizontal space.public FormConstraints(int position, int horizontalAlignment)
position
- the column position of the component.horizontalAlignment
- the horizontal alignment type.public FormConstraints(int position, int horizontalAlignment, int verticalAlignment)
position
- the column position of the component.horizontalAlignment
- the horizontal alignment type.verticalAlignment
- the vertical alignment type.public FormConstraints(FormConstraints constraint)
constraint
- the form constraint to copy the values from.public void setFilled(boolean enabled)
enabled
- enables/disables the filling of the full space.public boolean isFilled()
public void setHorizontalAlignment(int alignment)
alignment
- the horizontal alignment.public int getHorizontalAlignment()
setHorizontalAlignment(int)
public void setVerticalAlignment(int alignment)
alignment
- the vertical alignment.public int getVerticalAlignment()
setVerticalAlignment(int)
public void setPosition(int position)
position
- the column position of the component.public int getPosition()
setPosition(int)
Copyright © 2002-2013 Edwin Dankert. All Rights Reserved.