|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.winterdrache.layout.MSBLayout.ConstraintsImpl
public static class MSBLayout.ConstraintsImpl
A straightforward implementation of the MutableConstraints
interface. There will rarely be a reason to create your own MutableConstraints implementation, but if you do, ConstraintsImpl can
serve as a base class since all of its fields are protected.
| Field Summary | |
|---|---|
protected static String[] |
ANONYMOUS_GROUP
Constant String[]{ "" } that can (but need not be) used as return value for groups(). |
protected String[] |
groups
The groups() list. |
protected float |
halign
The halign() value. |
protected int |
hfill
The hfill() value. |
protected float |
hscale
The hscale() value. |
protected int |
hshrink
The hshrink() value. |
protected int |
hweight
The hweight() value. |
protected int |
marginBotton
The bottom() value. |
protected int |
marginLeft
The left() value. |
protected int |
marginRight
The right() value. |
protected int |
marginTop
The top() value. |
protected static String[] |
NO_GROUPS
Constant String[]{} that can (but need not be) used as return value for groups(). |
protected int |
paddingHeight
The height component of padding(). |
protected int |
paddingWidth
The width component of padding(). |
protected float |
valign
The valign() value. |
protected int |
vfill
The vfill() value. |
protected float |
vscale
The vscale() value. |
protected int |
vshrink
The vshrink() value. |
protected int |
vweight
The vweight() value. |
| Constructor Summary | |
|---|---|
MSBLayout.ConstraintsImpl()
Creates a default set of MutableConstraints. |
|
MSBLayout.ConstraintsImpl(int hfill,
int vfill,
float halign,
float valign,
Insets margin,
int hweight,
int vweight,
Dimension padding,
float hscale,
float vscale,
int hshrink,
int vshrink)
Creates a new ConstraintsImpl object for the given constraints. |
|
MSBLayout.ConstraintsImpl(MSBLayout.Constraints orig)
Creates a copy of the Constraints from orig. |
|
| Method Summary | |
|---|---|
int |
bottom()
Returns the bottom margin which is either a non-negative number of pixels or one of the Gap constants. |
MSBLayout.MutableConstraints |
bottom(int margin)
Sets the bottom margin and leaves the other margins unchanged. |
String[] |
groups()
Returns the names of all Groups this box is member of. |
MSBLayout.MutableConstraints |
groups(String grps)
Takes a comma-separated list of group names (that must not contain spurious
whitespace) that will replace the list of groups this box is currently part of. |
MSBLayout.MutableConstraints |
groups(String[] grp)
Takes a list of group names that will replace the list of groups this box is
currently part of. |
float |
halign()
Returns the horizontal alignment of this box, i.e. its horizontal placement within the containing parent box. |
MSBLayout.MutableConstraints |
halign(float a)
When this box is contained in a box that has excess blank space, the alignment determines where that blank space will be relative to this box. |
int |
hfill()
Returns the box's willingness to grow horizontally to fill excess space. |
MSBLayout.MutableConstraints |
hfill(int fill)
Sets the box's willingness to grow horizontally to fill excess space. 0 means the Box insists on its preferred size. 1 means this Box is willing to grow to its maximum size if required. 2 means the Box is willing to grow beyond its maximum size if there is still too much space after all boxes with willingness == 1 have been grown to their max sizes. |
float |
hscale()
A box that is part of a Group with tieWidth() uses the
group's tied minimum, preferred and maximum widths multiplied by this factor. |
MSBLayout.MutableConstraints |
hscale(float scale)
A box that is part of a Group with tieWidth() uses the
group's tied minimum, preferred and maximum widths multiplied by this factor. |
int |
hshrink()
When several sibling boxes are shrunk smaller than their preferred widths because the container is too small, the hshrink() value determines the relative amount that is taken away from a box's width. |
MSBLayout.MutableConstraints |
hshrink(int weight)
When boxes are shrunk below their preferred sizes because their container is too small, the weight value determines the relative amount of space this Box will lose. |
int |
hweight()
When several sibling boxes are grown larger than their preferred widths to fill excess space in the containing box, the hweight() value determines the relative amounts of additional width the boxes get. |
MSBLayout.MutableConstraints |
hweight(int weight)
When boxes are grown to fill excess space in the parent container, the weight value determines the relative portion of space this Box will get. |
int |
left()
Returns the left margin which is either a non-negative number of pixels or one of the Gap constants. |
MSBLayout.MutableConstraints |
left(int margin)
Sets the left margin and leaves the other margins unchanged. |
Insets |
margin()
Returns the amount of blank space added around the box's content where each of the top, left, bottom and right values is either a non-negative number of pixels or one of the Gap constants. |
MSBLayout.MutableConstraints |
margin(Insets insets)
Sets an amount of blank space to be added around the box's content. |
MSBLayout.MutableConstraints |
margin(int top,
int left,
int bottom,
int right)
Sets an amount of blank space to be added around the box's content. |
Dimension |
padding()
Returns an amount of space that is added to the box's minimum, preferred and maximum sizes when doing size computations. |
MSBLayout.MutableConstraints |
padding(Dimension padding)
Sets an amount of space to be added to the box's minimum, preferred and maximum sizes when doing size computations. |
MSBLayout.MutableConstraints |
padding(int width,
int height)
Sets an amount of space to be added to the box's minimum, preferred and maximum sizes when doing size computations. |
int |
right()
Returns the right margin which is either a non-negative number of pixels or one of the Gap constants. |
MSBLayout.MutableConstraints |
right(int margin)
Sets the right margin and leaves the other margins unchanged. |
MSBLayout.MutableConstraints |
setConstraints(MSBLayout.Constraints orig)
Copies the settings from orig to this MutableConstraints object. |
int |
top()
Returns the top margin which is either a non-negative number of pixels or one of the Gap constants. |
MSBLayout.MutableConstraints |
top(int margin)
Sets the top margin and leaves the other margins unchanged. |
float |
valign()
Returns the vertical alignment of this box, i.e. its vertical placement within the containing parent box. |
MSBLayout.MutableConstraints |
valign(float a)
When this box is contained in a box that has excess blank space, the alignment determines where that blank space will be relative to this box. |
int |
vfill()
Returns the box's willingness to grow vertically to fill excess space. |
MSBLayout.MutableConstraints |
vfill(int fill)
Sets the box's willingness to grow vertically to fill excess space. 0 means the Box insists on its preferred size. 1 means this Box is willing to grow to its maximum size if required. 2 means the Box is willing to grow beyond its maximum size if there is still too much space after all boxes with willingness == 1 have been grown to their max sizes. |
float |
vscale()
A box that is part of a Group with Group.tieHeight()
uses the group's tied minimum, preferred and maximum heights multiplied by this factor. |
MSBLayout.MutableConstraints |
vscale(float scale)
A box that is part of a Group with tieHeight() uses
the group's tied minimum, preferred and maximum heights multiplied by this factor. |
int |
vshrink()
When several sibling boxes are shrunk smaller than their preferred heights because the container is too small, the vshrink() value determines the relative amount that is taken away from a box's height. |
MSBLayout.MutableConstraints |
vshrink(int weight)
When boxes are shrunk below their preferred sizes because their container is too small, the weight value determines the relative amount of space this Box will lose. |
int |
vweight()
When several sibling boxes are grown larger than their preferred heights to fill excess space in the containing box, the vweight() value determines the relative amounts of additional height the boxes get. |
MSBLayout.MutableConstraints |
vweight(int weight)
When boxes are grown to fill excess space in the parent container, the weight value determines the relative portion of space this Box will get. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String[] NO_GROUPS
groups().
protected static final String[] ANONYMOUS_GROUP
groups().
protected String[] groups
groups() list. Never null but may be an empty array.
protected int hfill
hfill() value.
protected int vfill
vfill() value.
protected int marginTop
top() value.
protected int marginBotton
bottom() value.
protected int marginLeft
left() value.
protected int marginRight
right() value.
protected int paddingWidth
padding().
protected int paddingHeight
padding().
protected float hscale
hscale() value.
protected float vscale
vscale() value.
protected float halign
halign() value.
protected float valign
valign() value.
protected int hweight
hweight() value.
protected int vweight
vweight() value.
protected int hshrink
hshrink() value.
protected int vshrink
vshrink() value.
| Constructor Detail |
|---|
public MSBLayout.ConstraintsImpl()
MutableConstraints.
| hfill | 0 (= insist on preferred width) |
| vfill | 0 (= insist on preferred height) |
| margin | (Gap.WEAK_RELATED, Gap.WEAK_RELATED, Gap.WEAK_RELATED,
Gap.WEAK_RELATED) |
| halign | -1.0f (= justify) |
| valign | -1.0f (= justify) |
| padding | (0,0) |
| hscale | 1.0f |
| vscale | 1.0f |
| hweight | 100 |
| vweight | 100 |
| hshrink | 100 |
| vshrink | 100 |
public MSBLayout.ConstraintsImpl(MSBLayout.Constraints orig)
Constraints from orig.
public MSBLayout.ConstraintsImpl(int hfill,
int vfill,
float halign,
float valign,
Insets margin,
int hweight,
int vweight,
Dimension padding,
float hscale,
float vscale,
int hshrink,
int vshrink)
| Method Detail |
|---|
public MSBLayout.MutableConstraints setConstraints(MSBLayout.Constraints orig)
MSBLayout.MutableConstraintsMutableConstraints object.
setConstraints in interface MSBLayout.MutableConstraintspublic String[] groups()
MSBLayout.ConstraintsGroups this box is member of. If the box is member of
no groups, a 0-length array is returned.
groups in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.groups(String),
MSBLayout.MutableConstraints.groups(String[])public MSBLayout.MutableConstraints groups(String[] grp)
MSBLayout.MutableConstraintsgroup names that will replace the list of groups this box is
currently part of. null may be passed to remove the box from any groups.
groups in interface MSBLayout.MutableConstraintsMSBLayout.Constraints.groups(),
MSBLayout.MutableConstraints.groups(String)public MSBLayout.MutableConstraints groups(String grps)
MSBLayout.MutableConstraintsgroup names (that must not contain spurious
whitespace) that will replace the list of groups this box is currently part of. null
may be passed to remove the box from any groups. Note that passing the empty string will NOT
clear the list of groups. The empty string is a legitimate group name.
groups in interface MSBLayout.MutableConstraintsMSBLayout.Constraints.groups(),
MSBLayout.MutableConstraints.groups(String[])public MSBLayout.MutableConstraints halign(float a)
MSBLayout.MutableConstraintsAn alignment < 0 means "justify", i.e. if this box is the first or the last in the container box, it will touch at least one edge of the container, otherwise it will be positioned exactly in the middle between its two sibling boxes. An alignment between 0.0 and 1.0 specifies the percentage of all blank space that is to be placed before this box. E.g an alignment of 0.5 means that 50% of the empty space will be placed before the Box and 50% after it. Note that this will not necessarily result in the Box being in the exact center of the container box, because the presence of sibling boxes will affect its placement, too. Alignments >1.0 mean the same as 1.0.
In no event will alignment cause 2 boxes to overlap. E.g. 2 sibling boxes with alignment 0.5 will not overlap each other. Instead they will form a cluster that is as a whole centered (with respect to the empty space, not necessarily with respect to the parent container). If the alignment of a box is less than the alignment of a sibling box that comes before it, its alignment will be assumed to be the same as the sibling.
The alignment can be set independently for horizontal (halign) and vertical alignment (valign).
MSBLayout.setSingleBoxJustifyBehaviour(float, float, int, int) controls how the
special case of a single box without siblings is handled when its alignment is "justify".
halign in interface MSBLayout.MutableConstraintsMSBLayout.Constraints.halign(),
MSBLayout.MutableConstraints.valign(float)public float halign()
MSBLayout.ConstraintsMutableConstraints.halign(float).
halign in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.halign(float),
MSBLayout.Constraints.valign()public MSBLayout.MutableConstraints hfill(int fill)
MSBLayout.MutableConstraints
hfill in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.vfill(int),
MSBLayout.Constraints.hfill()public int hfill()
MSBLayout.ConstraintsMutableConstraints.hfill(int) for details on the
possible values.
hfill in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.hfill(int),
MSBLayout.Constraints.vfill()public MSBLayout.MutableConstraints hscale(float scale)
MSBLayout.MutableConstraintsGroup with tieWidth() uses the
group's tied minimum, preferred and maximum widths multiplied by this factor. You would use
this feature when building a grid with same size cells to simulate merged cells.
hscale in interface MSBLayout.MutableConstraintsMSBLayout.Constraints.hscale(),
MSBLayout.MutableConstraints.vscale(float)public float hscale()
MSBLayout.ConstraintsGroup with tieWidth() uses the
group's tied minimum, preferred and maximum widths multiplied by this factor.
hscale in interface MSBLayout.Constraintspublic MSBLayout.MutableConstraints hweight(int weight)
MSBLayout.MutableConstraintsMAX_WEIGHT_SHRINK and can be set independently for
horizontal (hweight) and vertical space (vweight). ATTENTION! The weight must be greater than
0. This is different from GridBagLayout where a weight of 0 means that a box will not
grow. If you don't want a box to grow, use MSBLayout.MutableConstraints.hfill(int)/ MSBLayout.MutableConstraints.vfill(int).
MSBLayout.MutableConstraints.hshrink(int) plays a similar role when shrinking a box below its preferred width.
hweight in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.vweight(int),
MSBLayout.Constraints.hweight(),
MSBLayout.MutableConstraints.hshrink(int)public int hweight()
MSBLayout.ConstraintsMSBLayout.Constraints.hshrink() has the same role when shrinking boxes below their preferred
widths. The returned value is always >0 and <=MAX_WEIGHT_SHRINK. A weight of 0 is not possible. A box that is not supposed to grow is
defined by MSBLayout.Constraints.hfill()==0.
hweight in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.hweight(int),
MSBLayout.Constraints.hfill(),
MSBLayout.Constraints.hshrink(),
MSBLayout.Constraints.vweight()public MSBLayout.MutableConstraints hshrink(int weight)
MSBLayout.MutableConstraintsMAX_WEIGHT_SHRINK and can be set
independently for horizontal (hshrink) and vertical space (vshrink). MSBLayout.MutableConstraints.hweight(int)
plays a similar role when growing a box larger than its preferred width.
NOTE: When you find that the hshrink value seems to have no effect, this may be due to one of the following reasons:
JTextFields) are placed next to components with a minimum size (such as
JLabels). Even a very large hshrink value will not cause MSBLayout to shrink a
component below its minimum size as long as alternatives exist.
hshrink in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.vshrink(int),
MSBLayout.Constraints.hshrink(),
MSBLayout.MutableConstraints.hweight(int)public int hshrink()
MSBLayout.ConstraintsMSBLayout.Constraints.hweight() has the same role when growing boxes larger than their preferred widths.
The returned value is always >0 and <=MAX_WEIGHT_SHRINK.
A weight of 0 is not allowed because it must always be possible to fit the layout inside the
container, which may require shrinking all boxes even below their minimum widths.
hshrink in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.hshrink(int),
MSBLayout.Constraints.hweight(),
MSBLayout.Constraints.vweight()public MSBLayout.MutableConstraints valign(float a)
MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.halign(float) for a
detailed explanation of alignment.
valign in interface MSBLayout.MutableConstraintsMSBLayout.Constraints.valign(),
MSBLayout.MutableConstraints.halign(float)public float valign()
MSBLayout.ConstraintsMutableConstraints.halign(float).
valign in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.valign(float),
MSBLayout.Constraints.halign()public MSBLayout.MutableConstraints vfill(int fill)
MSBLayout.MutableConstraints
vfill in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.hfill(int),
MSBLayout.Constraints.vfill()public int vfill()
MSBLayout.ConstraintsMutableConstraints.vfill(int) for details on the
possible values.
vfill in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.vfill(int),
MSBLayout.Constraints.vfill()public MSBLayout.MutableConstraints vscale(float scale)
MSBLayout.MutableConstraintsGroup with tieHeight() uses
the group's tied minimum, preferred and maximum heights multiplied by this factor. You would
use this feature when building a grid with same size cells to simulate merged cells.
vscale in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.hscale(float),
MSBLayout.Constraints.vscale()public float vscale()
MSBLayout.ConstraintsGroup with Group.tieHeight()
uses the group's tied minimum, preferred and maximum heights multiplied by this factor.
vscale in interface MSBLayout.Constraintspublic MSBLayout.MutableConstraints vweight(int weight)
MSBLayout.MutableConstraintsMAX_WEIGHT_SHRINK and can be set independently for
horizontal (hweight) and vertical space (vweight). ATTENTION! The weight must be greater than
0. This is different from GridBagLayout where a weight of 0 means that a box will not
grow. If you don't want a box to grow, use MSBLayout.MutableConstraints.hfill(int)/ MSBLayout.MutableConstraints.vfill(int).
MSBLayout.MutableConstraints.vshrink(int) plays a similar role when shrinking a box below its preferred height.
vweight in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.hweight(int),
MSBLayout.Constraints.vweight(),
MSBLayout.MutableConstraints.vshrink(int)public int vweight()
MSBLayout.ConstraintsMSBLayout.Constraints.vshrink() has the same role when shrinking boxes below their preferred
heights. The returned value is always >0 and <=MAX_WEIGHT_SHRINK. A weight of 0 is not possible. A box that is not supposed to grow is
defined by MSBLayout.Constraints.vfill()==0.
vweight in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.vweight(int),
MSBLayout.Constraints.vfill(),
MSBLayout.Constraints.vshrink(),
MSBLayout.Constraints.hweight()public MSBLayout.MutableConstraints vshrink(int weight)
MSBLayout.MutableConstraintsMAX_WEIGHT_SHRINK and can be set
independently for horizontal (hshrink) and vertical space (vshrink). MSBLayout.MutableConstraints.vweight(int)
plays a similar role when growing a box larger than its preferred height.
NOTE: When you find that the vshrink value seems to have no effect, this may be due to one of the following reasons:
JTextFields) are placed next to components with a minimum size (such as
JLabels). Even a very large vshrink value will not cause MSBLayout to shrink a
component below its minimum size as long as alternatives exist.
vshrink in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.hshrink(int),
MSBLayout.Constraints.vshrink(),
MSBLayout.MutableConstraints.vweight(int)public int vshrink()
MSBLayout.ConstraintsMSBLayout.Constraints.vweight() has the same role when growing boxes larger than their preferred heights.
The returned value is always >0 and <=MAX_WEIGHT_SHRINK.
A weight of 0 is not allowed because it must always be possible to fit the layout inside the
container, which may require shrinking all boxes even below their minimum heights.
vshrink in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.vshrink(int),
MSBLayout.Constraints.vweight(),
MSBLayout.Constraints.hweight()public MSBLayout.MutableConstraints margin(Insets insets)
MSBLayout.MutableConstraintsGap constants. To set the
margins for the different sides individually, you can use the methods MSBLayout.MutableConstraints.top(int),
MSBLayout.MutableConstraints.left(int), MSBLayout.MutableConstraints.bottom(int) and MSBLayout.MutableConstraints.right(int).
margin in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.Constraints.margin(),
MSBLayout.MutableConstraints.padding(Dimension),
MSBLayout.MutableConstraints.top(int),
MSBLayout.MutableConstraints.left(int),
MSBLayout.MutableConstraints.bottom(int),
MSBLayout.MutableConstraints.right(int)
public MSBLayout.MutableConstraints margin(int top,
int left,
int bottom,
int right)
MSBLayout.MutableConstraintsGap constants. To set the
margins for the different sides individually, you can use the methods MSBLayout.MutableConstraints.top(int),
MSBLayout.MutableConstraints.left(int), MSBLayout.MutableConstraints.bottom(int) and MSBLayout.MutableConstraints.right(int).
margin in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.Constraints.margin(),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.MutableConstraints.top(int),
MSBLayout.MutableConstraints.left(int),
MSBLayout.MutableConstraints.bottom(int),
MSBLayout.MutableConstraints.right(int)public MSBLayout.MutableConstraints left(int margin)
MSBLayout.MutableConstraintsGap constants.
left in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.left()public MSBLayout.MutableConstraints right(int margin)
MSBLayout.MutableConstraintsGap constants.
right in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.right()public MSBLayout.MutableConstraints top(int margin)
MSBLayout.MutableConstraintsGap constants.
top in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.top()public MSBLayout.MutableConstraints bottom(int margin)
MSBLayout.MutableConstraintsGap constants.
bottom in interface MSBLayout.MutableConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.bottom()public Insets margin()
MSBLayout.ConstraintsGap constants. The returned Insets object aggregates the values returned by
MSBLayout.Constraints.left(), MSBLayout.Constraints.right(), MSBLayout.Constraints.bottom() and MSBLayout.Constraints.top().
margin in interface MSBLayout.ConstraintsMSBLayout.Gap,
MSBLayout.MutableConstraints.margin(Insets),
MSBLayout.MutableConstraints.margin(int, int, int, int),
MSBLayout.Constraints.padding(),
MSBLayout.Constraints.left(),
MSBLayout.Constraints.top(),
MSBLayout.Constraints.bottom(),
MSBLayout.Constraints.right()public int left()
MSBLayout.ConstraintsGap constants.
left in interface MSBLayout.ConstraintsMSBLayout.Constraints.margin()public int right()
MSBLayout.ConstraintsGap constants.
right in interface MSBLayout.ConstraintsMSBLayout.Constraints.margin()public int top()
MSBLayout.ConstraintsGap constants.
top in interface MSBLayout.ConstraintsMSBLayout.Constraints.margin()public int bottom()
MSBLayout.ConstraintsGap constants.
bottom in interface MSBLayout.ConstraintsMSBLayout.Constraints.margin()public MSBLayout.MutableConstraints padding(Dimension padding)
MSBLayout.MutableConstraintsDimension must be
non-negative.
Note that padding is very different from a margin. A margin is an empty space around a box.
Padding on the other hand grows the box's content. Unlike margins, padding is used rather
infrequently.
padding in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.padding(),
MSBLayout.MutableConstraints.margin(Insets)
public MSBLayout.MutableConstraints padding(int width,
int height)
MSBLayout.MutableConstraints
padding in interface MSBLayout.MutableConstraintsMSBLayout.MutableConstraints.padding(Dimension),
MSBLayout.Constraints.padding(),
MSBLayout.MutableConstraints.margin(int, int, int, int)public Dimension padding()
MSBLayout.ConstraintsDimension are
always non-negative.
Note that padding is very different from a margin. A margin is an empty space around a box.
Padding on the other hand grows the box's content. Unlike margins, padding is used rather
infrequently.
padding in interface MSBLayout.ConstraintsMSBLayout.MutableConstraints.padding(Dimension),
MSBLayout.MutableConstraints.padding(int, int),
MSBLayout.Constraints.margin()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2010 Matthias S. Benkmann. See LICENSE file for licensing details.
Hosted on