public static class StyleSheet.BoxPainter extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
float |
getInset(int size,
View v)
Gets the inset needed on a given side to account for the margin, border
and padding.
|
void |
paint(Graphics g,
float x,
float y,
float w,
float h,
View v)
Paints the CSS box according to the attributes given.
|
public float getInset(int size, View v)
size
- - the size of the box to get the inset for. View.TOP, View.LEFT,
View.BOTTOM or View.RIGHT.v
- - the view making the request. This is used to get the AttributeSet,
amd may be used to resolve percentage arguments.IllegalArgumentException
- - for an invalid direction.public void paint(Graphics g, float x, float y, float w, float h, View v)
g
- - the graphics configurationx
- - the x coordinatey
- - the y coordinatew
- - the width of the allocated areah
- - the height of the allocated areav
- - the view making the request