Package com.jogamp.graph.ui.layout
Class Margin
- java.lang.Object
-
- com.jogamp.graph.ui.layout.Margin
-
public class Margin extends Object
GraphUI CSS property Margin, scaled space between or around elements and not included in the element's size.The CSS margin properties are used to create space around elements, outside of any defined borders.
Center alignment is defined via
Alignment
andMargin
ignored with only centerAlignment
w/oAlignment.Bit.Fill
scale.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
height()
Return scaled height of vertical values bottom + top.String
toString()
float
width()
Return scaled width of horizontal values top + right.boolean
zeroHeight()
boolean
zeroSize()
boolean
zeroWidth()
-
-
-
Field Detail
-
None
public static final Margin None
Zero margin constant.
-
top
public final float top
Scaled top value
-
right
public final float right
Scaled right value
-
bottom
public final float bottom
Scaled bottom value
-
left
public final float left
Scaled left value
-
-
Constructor Detail
-
Margin
public Margin(float top, float right, float bottom, float left)
Ctor- Parameters:
top
- scaled top valueright
- scaled right valuebottom
- scaled bottom valueleft
- scaled left value
-
Margin
public Margin(float top, float rl, float bottom)
Ctor- Parameters:
top
- scaled top valuerl
- scaled right and left valuebottom
- scaled bottom value
-
Margin
public Margin(float tb, float rl)
Ctor- Parameters:
tb
- scaled top and bottom valuerl
- scaled right and left value
-
Margin
public Margin(float trbl)
Ctor- Parameters:
trbl
- scaled top, right, bottom and left value
-
-
Method Detail
-
width
public float width()
Return scaled width of horizontal values top + right. Zero if#isCenteredHoriz()
.
-
height
public float height()
Return scaled height of vertical values bottom + top. Zero if#isCenteredVert()
.
-
zeroWidth
public boolean zeroWidth()
-
zeroHeight
public boolean zeroHeight()
-
zeroSize
public boolean zeroSize()
-
-