public class Margins extends Object
| Constructor and Description |
|---|
Margins(int marginTop,
int marginBottom,
int marginLeft,
int marginRight)
Constructs an instance for storing margin data.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHorizontal()
Returns the combined width of the left and the right margins.
|
int |
getMarginBottom()
Returns the height of the bottom margin.
|
int |
getMarginLeft()
Returns the width of the left margin.
|
int |
getMarginRight()
Returns the width of the right margin.
|
int |
getMarginTop()
Returns the height of the top margin.
|
int |
getVertical()
Returns the combined height of the top and the bottom margins.
|
void |
setMarginBottom(int marginBottom)
Sets the height of the bottom margin.
|
void |
setMarginLeft(int marginLeft)
Sets the width of the left margin.
|
void |
setMarginRight(int marginRight)
Sets the width of the right margin.
|
void |
setMarginTop(int marginTop)
Sets the height of the top margin.
|
String |
toString() |
public Margins(int marginTop,
int marginBottom,
int marginLeft,
int marginRight)
marginTop - top margin (in pixels)marginBottom - bottom margin (in pixels)marginLeft - left margin (in pixels)marginRight - right margin (in pixels)public int getMarginTop()
public int getMarginBottom()
public int getMarginLeft()
public int getMarginRight()
public int getHorizontal()
public int getVertical()
public void setMarginTop(int marginTop)
marginTop - the top margin to set (in pixels)public void setMarginBottom(int marginBottom)
marginBottom - the bottom margin to set (in pixels)public void setMarginLeft(int marginLeft)
marginLeft - the left margin to set (in pixels)public void setMarginRight(int marginRight)
marginRight - the right margin to set (in pixels)Copyright © 2021 Vaadin Ltd. All rights reserved.