| java.lang.Object com.cloudgarden.layout.AnchorConstraint
AnchorConstraint | public class AnchorConstraint (Code) | | Used by both AnchorLayout (SWT) and AnchorLayoutManager (Swing)
|
Field Summary | |
final public static int | ANCHOR_ABS (Absolute anchor) Meaning: This side is anchored a fixed distance
in pixels (given by the value for this side) from it's parent's respective side. | final public static int | ANCHOR_NONE Meaning: This side is not anchored. | final public static int | ANCHOR_REL (Relative anchor) Meaning: This side is anchored so that it always
occurs a fixed fraction of
the distance along it's parent's side. | public int | bottom | public int | bottomType | public int | left | public int | leftType | public int | right | public int | rightType | public int | top | public int | topType |
Constructor Summary | |
public | AnchorConstraint() | public | AnchorConstraint(int top, int right, int bottom, int left, int topType, int rightType, int bottomType, int leftType) Creates an AnchorConstraint. |
ANCHOR_ABS | final public static int ANCHOR_ABS(Code) | | (Absolute anchor) Meaning: This side is anchored a fixed distance
in pixels (given by the value for this side) from it's parent's respective side.
For instance, if bottomType == ANCHOR_ABS and bottom = 100 then the
bottom side of this component will remain fixed 100 pixels from
the bottom side of it's parent container.
|
ANCHOR_NONE | final public static int ANCHOR_NONE(Code) | | Meaning: This side is not anchored.
|
ANCHOR_REL | final public static int ANCHOR_REL(Code) | | (Relative anchor) Meaning: This side is anchored so that it always
occurs a fixed fraction of
the distance along it's parent's side. The position is calculated by
the formula " position = (parent side)*(value)/1000 " so for
instance if top=100 and topType == ANCHOR_REL then the
value of y for this side would be (parent height)*top/1000.
|
bottomType | public int bottomType(Code) | | |
leftType | public int leftType(Code) | | |
rightType | public int rightType(Code) | | |
topType | public int topType(Code) | | |
AnchorConstraint | public AnchorConstraint()(Code) | | |
AnchorConstraint | public AnchorConstraint(int top, int right, int bottom, int left, int topType, int rightType, int bottomType, int leftType)(Code) | | Creates an AnchorConstraint.
Parameters: top - - value (relative or absolute) for top side Parameters: right - - like 'top' but for right side Parameters: bottom - - like 'top' but for bottom side Parameters: left - - like 'top' but for left side Parameters: topType - - either ANCHOR_ABS, ANCHOR_REL or ANCHOR_NONEto indicate whether the 'top' parameter is an absolute value (in pixels) ora fractional value (in 1/1000 ths) of the height of this component's parent,denoting where the anchor will be applied (if at all). Parameters: rightType - - like 'topType' but for right side Parameters: bottomType - - like 'topType' but for bottom side Parameters: leftType - - like 'topType' but for left side |
|
|