|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.miginfocom.layout.DimConstraint
public final class DimConstraint
A simple value holder for a constraint for one dimension.
Constructor Summary | |
---|---|
DimConstraint()
Empty constructor. |
Method Summary | |
---|---|
UnitValue |
getAlign()
Returns the alignment used either as a default value for sub-entities or for this entity. |
UnitValue |
getAlignOrDefault(boolean isCols)
|
java.lang.String |
getEndGroup()
Returns the end group that this entity should be in for the demension that this object is describing. |
BoundSize |
getGapAfter()
Returns the gap after this entity. |
BoundSize |
getGapBefore()
Returns the gap before this entity. |
java.lang.Float |
getGrow()
Returns the grow weight. |
int |
getGrowPriority()
Returns the grow priority. |
java.lang.Float |
getShrink()
Returns the shrink priority. |
int |
getShrinkPriority()
Returns the shrink priority. |
BoundSize |
getSize()
Returns the min/preferred/max size for the entity in the dimension that this object describes. |
java.lang.String |
getSizeGroup()
Returns the size group that this entity should be in for the dimension that this object is describing. |
boolean |
isFill()
Returns if the component in the row/column that this constraint should default be grown in the same dimension that this constraint represents (width for column and height for a row). |
boolean |
isNoGrid()
Returns if the row/column should default to flow and not to grid behaviour. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setAlign(UnitValue uv)
Sets the alignment used wither as a default value for sub-entities or for this entity. |
void |
setEndGroup(java.lang.String s)
Sets the end group that this entity should be in for the demension that this object is describing. |
void |
setFill(boolean b)
Sets if the component in the row/column that this constraint should default be grown in the same dimension that this constraint represents (width for column and height for a row). |
void |
setGapAfter(BoundSize size)
Sets the gap after this entity. |
void |
setGapBefore(BoundSize size)
Sets the gap before this entity. |
void |
setGrow(java.lang.Float weight)
Sets the grow weight. |
void |
setGrowPriority(int p)
Sets the grow priority. |
void |
setNoGrid(boolean b)
Sets if the row/column should default to flow and not to grid behaviour. |
void |
setShrink(java.lang.Float weight)
Sets the shrink priority. |
void |
setShrinkPriority(int p)
Sets the shrink priority. |
void |
setSize(BoundSize size)
Sets the min/preferred/max size for the entity in the dimension that this object describes. |
void |
setSizeGroup(java.lang.String s)
Sets the size group that this entity should be in for the dimension that this object is describing. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DimConstraint()
Method Detail |
---|
public int getGrowPriority()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setGrowPriority(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The new grow priority.public java.lang.Float getGrow()
Grow weight is how flexible the entity should be, relative to other entities, when it comes to growing. null
or
zero mean it will never grow. An entity that has twice the grow weight compared to another entity will get twice
as much of available space.
GrowWeight are only compared within the same GrowPrio.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setGrow(java.lang.Float weight)
Grow weight is how flexible the entity should be, relative to other entities, when it comes to growing. null
or
zero mean it will never grow. An entity that has twice the grow weight compared to another entity will get twice
as much of available space.
GrowWeight are only compared within the same GrowPrio.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
weight
- The new grow weight.public int getShrinkPriority()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setShrinkPriority(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The new shrink priority.public java.lang.Float getShrink()
null
or
zero mean it will never shrink (default). An entity that has twice the shrink weight compared to another entity will get twice
as much of available space.
Shrink(Weight) are only compared within the same ShrinkPrio.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setShrink(java.lang.Float weight)
null
or
zero mean it will never shrink (default). An entity that has twice the shrink weight compared to another entity will get twice
as much of available space.
Shrink(Weight) are only compared within the same ShrinkPrio.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
weight
- The new shrink weight.public UnitValue getAlignOrDefault(boolean isCols)
public UnitValue getAlign()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setAlign(UnitValue uv)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
uv
- The new shrink priority. E.g. UnitValue.CENTER
or UnitValue.LEADING
.public BoundSize getGapAfter()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setGapAfter(BoundSize size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The new gap.ConstraintParser.parseBoundSize(String, boolean, boolean).
public BoundSize getGapBefore()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setGapBefore(BoundSize size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The new gap.ConstraintParser.parseBoundSize(String, boolean, boolean).
public BoundSize getSize()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
since v3.5.ConstraintParser.parseBoundSize(String, boolean, boolean).
public void setSize(BoundSize size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The new size. May be null
.public java.lang.String getSizeGroup()
null
means no size group
and all other values are legal. Comparison with .equals(). Components/columnss/rows in the same size group
will have the same min/preferred/max size; that of the largest in the group for the first two and the
smallest for max.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
.public void setSizeGroup(java.lang.String s)
null
means no size group
and all other values are legal. Comparison with .equals(). Components/columnss/rows in the same size group
will have the same min/preferred/max size; that of the largest in the group for the first two and the
smallest for max.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
s
- The new size group. null
disables size grouping.public java.lang.String getEndGroup()
null
means no end group
and all other values are legal. Comparison with .equals(). Components in the same end group
will have the same end coordinate.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
may be returned.public void setEndGroup(java.lang.String s)
null
means no end group
and all other values are legal. Comparison with .equals(). Components in the same end group
will have the same end coordinate.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
s
- The new end group. null
disables end grouping.public boolean isFill()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setFill(boolean b)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
b
- true
means that components should grow.public boolean isNoGrid()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
true
means that the whole row/column should be one cell.public void setNoGrid(boolean b)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
b
- true
means that the whole row/column should be one cell.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |