|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.toolkit.utils.HWMPageConstraints
public class HWMPageConstraints
Title: HWMPageConstraints
Description: This is the constraints object that will be used to layout the components in a HWMPageLayout manner.
Company: Altair Engineering, Inc.
Field Summary | |
---|---|
static int |
POS_ANCHOR
If the position is anchor, then the component will be repositioned from the anchor end (to maintain the distance from the right/bottom end of the container) when the page resizes. |
static int |
POS_FIXED
If the position is fixed, then the component will not be repositioned or resized from the fixed end when the page resizes. |
static int |
POS_FREE
If the position is FREE, then the width/height will be maintained. |
static int |
POS_RELATIVE
If the position is relative, then the component will be repositioned from the relative end (to maintain the distance from the left/top end of the container) when the page resizes. |
static java.lang.String |
STR_POS_ANCHOR
The constraint type as a string |
static java.lang.String |
STR_POS_FIXED
The constraint type as a string |
static java.lang.String |
STR_POS_FREE
The constraint type as a string |
static java.lang.String |
STR_POS_RELATIVE
The constraint type as a string |
static java.lang.String |
VERSION
The version for this class |
Constructor Summary | |
---|---|
HWMPageConstraints()
Constructor All the constraints are set to POS_FIXED |
|
HWMPageConstraints(int nLeftPosType,
int nTopPosType,
int nRightPosType,
int nBottomPosType)
Constructor |
Method Summary | |
---|---|
int |
GetBottomConstraintType()
Returns the type of constraint set to the bototm side |
float |
GetBottomConstraintValue()
Returns the value of constraint set to the bototm side |
java.lang.Object |
GetID()
Gets the id associated with this constraint |
int |
GetLeftConstraintType()
Returns the type of constraint set to the left side |
float |
GetLeftConstraintValue()
Returns the value of constraint set to the left side |
int |
GetRightConstraintType()
Returns the type of constraint set to the right side |
float |
GetRightConstraintValue()
Returns the value of constraint set to the right side |
int |
GetTopConstraintType()
Returns the type of constraint set to the top side |
float |
GetTopConstraintValue()
Returns the value of constraint set to the top side |
void |
readExternal(java.io.ObjectInput objInput)
This method belongs to the Externalizable interface and is called to save this object |
void |
ReadVersion1_0(java.io.ObjectInput objInput)
Reads version 1.0 of this class |
void |
SetConstraints(int nLeftPosType,
int nTopPosType,
int nRightPosType,
int nBottomPosType)
Set the values for the constraints. |
void |
SetEvaluateConstraints(boolean bEvalConstraints)
Set the flag to evaluate constraints. |
void |
SetID(java.lang.Object objID)
Sets the id |
void |
SetPosition(float fLeftPos,
float fTopPos,
float fRightPos,
float fBottomPos)
Set the values for the constraints |
static int |
toInt(java.lang.String strConstraint)
Given a String, returns the constraint type as a int. |
java.lang.String |
toString()
Get a string representation of the constraints set. |
static java.lang.String |
toString(int nConstraint)
Gets the constraint type as a string. |
void |
writeExternal(java.io.ObjectOutput objOutput)
This method belongs to the Externalizable interface and is called to save this object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final int POS_FREE
public static final int POS_FIXED
public static final int POS_RELATIVE
public static final int POS_ANCHOR
public static final java.lang.String STR_POS_FREE
public static final java.lang.String STR_POS_FIXED
public static final java.lang.String STR_POS_RELATIVE
public static final java.lang.String STR_POS_ANCHOR
Constructor Detail |
---|
public HWMPageConstraints()
public HWMPageConstraints(int nLeftPosType, int nTopPosType, int nRightPosType, int nBottomPosType)
nLeftPosType
- The way the component should be placed and
repositioned in the component.nTopPosType
- The way the component should be placed and
repositioned in the component.nRightPosType
- The way the component should be placed and
repositioned in the component.nBottomPosType
- The way the component should be placed and
repositioned in the component.
All the above can be one of the following:
POS_FREE, POS_FIXED, POS_RELATIVE or POS_ANCHOR
The illegal types are :
If left is POS_RELATIVE and right is POS_FIXED
If top is POS_RELATIVE and bottom is POS_FIXEDMethod Detail |
---|
public void SetConstraints(int nLeftPosType, int nTopPosType, int nRightPosType, int nBottomPosType) throws java.lang.IllegalArgumentException
nLeftPosType
- The way the component should be placed and
repositioned in the component.nTopPosType
- The way the component should be placed and
repositioned in the component.nRightPosType
- The way the component should be placed and
repositioned in the component.nBottomPosType
- The way the component should be placed and
repositioned in the component.
All the above can be one of the following:
POS_FREE, POS_FIXED, POS_RELATIVE or POS_ANCHOR
The illegal types are :
If left is POS_RELATIVE and right is POS_FIXED
If left is POS_FREE and right is POS_FREE
If top is POS_RELATIVE and bottom is POS_FIXED
If top is POS_FREE and bottom is POS_FREE
java.lang.IllegalArgumentException
public void SetPosition(float fLeftPos, float fTopPos, float fRightPos, float fBottomPos)
fLeftPos
- The left position of the component. It can be absolute
or a % depending on the m_nLeftPosType value.fTopPos
- The top position of the component. It can be absolute
or a % depending on the m_nTopPosType value.fRightPos
- The right position of the component. It can be absolute
or a % depending on the m_nRightPosType value.fBottomPos
- The bottom position of the component. It can be
absolute or a % depending on the m_nBottomPosType
value.public void SetID(java.lang.Object objID)
objID
- The id to associate this constraint withpublic java.lang.Object GetID()
Object
- The id associated with this constraintpublic int GetLeftConstraintType()
public int GetTopConstraintType()
public int GetRightConstraintType()
public int GetBottomConstraintType()
public float GetLeftConstraintValue()
public float GetTopConstraintValue()
public float GetRightConstraintValue()
public float GetBottomConstraintValue()
public void ReadVersion1_0(java.io.ObjectInput objInput) throws java.io.IOException, java.lang.ClassNotFoundException
objInput
- The input stream that needs to be read
IOException,
- ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void readExternal(java.io.ObjectInput objInput) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
objInput
- The input stream that needs to be read
IOException,
- ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput objOutput) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
objOutput
- The input stream that needs to be read
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toString(int nConstraint) throws java.lang.Exception
nConstraint
- can be POS_FIXED, POS_FREE, POS_RELATIVE, POS_ANCHOR
java.lang.Exception
public static int toInt(java.lang.String strConstraint) throws java.lang.Exception
strConstraint
- can be Fixed, Free, Relative, Anchor
java.lang.Exception
public void SetEvaluateConstraints(boolean bEvalConstraints)
bEvalConstraints
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |