public class CStyle extends CElementPropertyContainer
elementPtr| Constructor and Description |
|---|
CStyle(long ptr)
Create a style object with native pointer.
|
| Modifier and Type | Method and Description |
|---|---|
CUnitValue |
getHeight()
Get height.
|
CUnitValue |
getMarginBottom()
Get bottom margin.
|
CUnitValue |
getMarginLeft()
Get left margin.
|
CUnitValue |
getMarginRight()
Get right margin.
|
CUnitValue |
getMarginTop()
Get top margin.
|
CUnitValue |
getPaddingBottom()
Get bottom padding.
|
CUnitValue |
getPaddingLeft()
Get left padding.
|
CUnitValue |
getPaddingRight()
Get right padding.
|
CUnitValue |
getPaddingTop()
Get top padding.
|
CElementType |
getType()
Get element type for this style.
|
CUnitValue |
getWidth()
Get width.
|
boolean |
isAbsolute()
Check whether this style uses absolute positioning.
|
void |
release()
Release the native style resources held by this object.
|
CStyle |
setHeight(CUnitValue height)
Set height using a unit value.
|
CStyle |
setHeight(float height)
Set height in points.
|
CStyle |
setMargin(float commonMargin)
Set all margins using the same value.
|
CStyle |
setMarginBottom(float value)
Set bottom margin (commonly in points).
|
CStyle |
setMarginLeft(float value)
Set left margin (commonly in points).
|
CStyle |
setMarginRight(float value)
Set right margin (commonly in points).
|
CStyle |
setMargins(float marginTop,
float marginRight,
float marginBottom,
float marginLeft)
Set margins for each side.
|
CStyle |
setMarginTop(float value)
Set top margin (commonly in points).
|
CStyle |
setMaxHeight(CUnitValue maxHeight)
Set maximum height using a unit value.
|
CStyle |
setMaxHeight(float maxHeight)
Set maximum height in points.
|
CStyle |
setMaxWidth(CUnitValue maxWidth)
Set maximum width using a unit value.
|
CStyle |
setMaxWidth(float maxWidth)
Set maximum width in points.
|
CStyle |
setMinHeight(CUnitValue minHeight)
Set minimum height using a unit value.
|
CStyle |
setMinHeight(float minHeight)
Set minimum height in points.
|
CStyle |
setMinWidth(CUnitValue minWidth)
Set minimum width using a unit value.
|
CStyle |
setMinWidth(float minWidth)
Set minimum width in points.
|
CStyle |
setPadding(float commonPadding)
Set all paddings using the same value.
|
CStyle |
setPaddingBottom(float value)
Set bottom padding (commonly in points).
|
CStyle |
setPaddingLeft(float value)
Set left padding (commonly in points).
|
CStyle |
setPaddingRight(float value)
Set right padding (commonly in points).
|
CStyle |
setPaddings(float paddingTop,
float paddingRight,
float paddingBottom,
float paddingLeft)
Set paddings for each side.
|
CStyle |
setPaddingTop(float value)
Set top padding (commonly in points).
|
CStyle |
setVerticalAlignment(CVerticalAlignment verticalAlignment)
Set vertical alignment.
|
CStyle |
setWidth(CUnitValue width)
Set width using a unit value.
|
CStyle |
setWidth(float width)
Set width in points.
|
deleteProperty, getProperties, getStrokeColor, getStrokeWidth, hasProperty, setAbsolutePosition, setAbsolutePosition, setBackgroundColor, setBackgroundImage, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setFontColor, setFontFamily, setFontSize, setFontStyle, setFontWeight, setHorizontalAlignment, setInlineVerticalAlignment, setOpacity, setStrokeColor, setStrokeWidth, setTextAlignment, setUnderline, setWordSpacingpublic CStyle(long ptr)
ptr - Native style pointer/handle.public void release()
After calling this method, the current instance should not be used anymore.
public CUnitValue getMarginLeft()
CUnitValue.public CUnitValue getMarginRight()
CUnitValue.public CUnitValue getMarginTop()
CUnitValue.public CUnitValue getMarginBottom()
CUnitValue.public CStyle setMarginLeft(float value)
value - Left margin value.CStyle instance.public CStyle setMarginRight(float value)
value - Right margin value.CStyle instance.public CStyle setMarginTop(float value)
value - Top margin value.CStyle instance.public CStyle setMarginBottom(float value)
value - Bottom margin value.CStyle instance.public CStyle setMargin(float commonMargin)
commonMargin - Margin applied to all sides.CStyle instance.public CStyle setMargins(float marginTop, float marginRight, float marginBottom, float marginLeft)
marginTop - Top margin.marginRight - Right margin.marginBottom - Bottom margin.marginLeft - Left margin.CStyle instance.public CUnitValue getPaddingLeft()
CUnitValue.public CUnitValue getPaddingRight()
CUnitValue.public CUnitValue getPaddingTop()
CUnitValue.public CUnitValue getPaddingBottom()
CUnitValue.public CStyle setPaddingLeft(float value)
value - Left padding value.CStyle instance.public CStyle setPaddingRight(float value)
value - Right padding value.CStyle instance.public CStyle setPaddingTop(float value)
value - Top padding value.CStyle instance.public CStyle setPaddingBottom(float value)
value - Bottom padding value.CStyle instance.public CStyle setPadding(float commonPadding)
commonPadding - Padding applied to all sides.CStyle instance.public CStyle setPaddings(float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
paddingTop - Top padding.paddingRight - Right padding.paddingBottom - Bottom padding.paddingLeft - Left padding.CStyle instance.public CStyle setVerticalAlignment(CVerticalAlignment verticalAlignment)
verticalAlignment - Vertical alignment enum.CStyle instance.public CStyle setWidth(float width)
width - Width value in points.CStyle instance.public CStyle setWidth(CUnitValue width)
width - Width as CUnitValue.CStyle instance.public CUnitValue getWidth()
CUnitValue.public CStyle setHeight(float height)
height - Height value in points.CStyle instance.public CStyle setHeight(CUnitValue height)
height - Height as CUnitValue.CStyle instance.public CUnitValue getHeight()
CUnitValue.public CStyle setMaxHeight(float maxHeight)
maxHeight - Maximum height value in points.CStyle instance.public CStyle setMaxHeight(CUnitValue maxHeight)
maxHeight - Maximum height as CUnitValue.CStyle instance.public CStyle setMinHeight(float minHeight)
minHeight - Minimum height value in points.CStyle instance.public CStyle setMinHeight(CUnitValue minHeight)
minHeight - Minimum height as CUnitValue.CStyle instance.public CStyle setMaxWidth(float maxWidth)
maxWidth - Maximum width value in points.CStyle instance.public CStyle setMaxWidth(CUnitValue maxWidth)
maxWidth - Maximum width as CUnitValue.CStyle instance.public CStyle setMinWidth(float minWidth)
minWidth - Minimum width value in points.CStyle instance.public CStyle setMinWidth(CUnitValue minWidth)
minWidth - Minimum width as CUnitValue.CStyle instance.public CElementType getType()
public boolean isAbsolute()