Class Margin
- java.lang.Object
-
- com.github.bordertech.wcomponents.Margin
-
- All Implemented Interfaces:
Serializable
public class Margin extends Object implements Serializable
The margins to be used on a component.A default margin size can be set for "all" sides of the panel, or the specific margin sizes can be set for each side of the panel.
- Since:
- 1.0.0
- Author:
- Jonathan Austin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Margin(int all)Deprecated.useMargin(Size)Margin(int north, int east, int south, int west)Deprecated.Margin(Size all)A margin equal on all sizes.Margin(Size north, Size east, Size south, Size west)The margin sizes to be used on each side of the component.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetAll()Deprecated.usegetMargin()Set<String>getAsHTMLClassSet()Get a set of HTML class attribute values in the same form asAbstractWComponent.getHtmlClasses().StringgetAsHtmlClassValue()SizegetBottom()intgetEast()Deprecated.usegetRight()SizegetLeft()SizegetMargin()intgetNorth()Deprecated.usegetTop()SizegetRight()intgetSouth()Deprecated.usegetBottom()SizegetTop()intgetWest()Deprecated.usegetLeft()
-
-
-
Constructor Detail
-
Margin
public Margin(Size all)
A margin equal on all sizes.- Parameters:
all- the size of the margin to be used on all sides of the component.
-
Margin
@Deprecated public Margin(int all)
Deprecated.useMargin(Size)- Parameters:
all- the size of the margin to be used on all sides of the component.
-
Margin
public Margin(Size north, Size east, Size south, Size west)
The margin sizes to be used on each side of the component.- Parameters:
north- the size of the north margin.east- the size of the east margin.south- the size of the south margin.west- the size of the west margin.
-
Margin
@Deprecated public Margin(int north, int east, int south, int west)
Deprecated.The margin sizes to be used on each side of the panel.- Parameters:
north- the size of the north margin.east- the size of the east margin.south- the size of the south margin.west- the size of the west margin.
-
-
Method Detail
-
getAll
@Deprecated public int getAll()
Deprecated.usegetMargin()- Returns:
- the size of the margin to be used on all sides of the panel, or -1 if it has not been set.
-
getNorth
@Deprecated public int getNorth()
Deprecated.usegetTop()- Returns:
- the size of the north margin, or -1 if it has not been set.
-
getEast
@Deprecated public int getEast()
Deprecated.usegetRight()- Returns:
- the size of the east margin, or -1 if it has not been set.
-
getSouth
@Deprecated public int getSouth()
Deprecated.usegetBottom()- Returns:
- the size of the south margin, or -1 if it has not been set.
-
getWest
@Deprecated public int getWest()
Deprecated.usegetLeft()- Returns:
- the size of the west margin, or -1 if it has not been set.
-
getMargin
public Size getMargin()
- Returns:
- the margin on all sides of the container.
-
getTop
public Size getTop()
- Returns:
- the margin on the top of the container.
-
getRight
public Size getRight()
- Returns:
- the margin on the east side of the container.
-
getBottom
public Size getBottom()
- Returns:
- the margin on the south side of the container.
-
getLeft
public Size getLeft()
- Returns:
- the margin on the west side of the container.
-
getAsHTMLClassSet
public final Set<String> getAsHTMLClassSet()
Get a set of HTML class attribute values in the same form asAbstractWComponent.getHtmlClasses().- Returns:
- the Margin expressed as a set of HTML class attribute values.
-
getAsHtmlClassValue
public final String getAsHtmlClassValue()
- Returns:
- the margin expressed as a set of HTML class attribute values.
-
-