public abstract class CElementPropertyContainer extends java.lang.Object implements CIElement
| Modifier and Type | Field and Description |
|---|---|
long |
elementPtr |
| Constructor and Description |
|---|
CElementPropertyContainer(long ptr)
Create a property container with native pointer.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetType, isAbsolutepublic CElementPropertyContainer(long ptr)
ptr - native element pointer/handlepublic java.util.HashMap<java.lang.Integer,java.lang.Object> getProperties()
The returned map uses the native property id as the key, and the stored property value as the value.
propertyId -> propertyValuepublic boolean hasProperty(CProperty property)
property - property identifiertrue if the property exists; otherwise falsepublic void deleteProperty(CProperty property)
property - property identifier; if null, this method does nothingpublic CElementPropertyContainer setAbsolutePosition(float left, float bottom, float width)
left - left positionbottom - bottom positionwidth - width in pointspublic CElementPropertyContainer setAbsolutePosition(float left, float bottom, CUnitValue width)
CUnitValue.left - left positionbottom - bottom positionwidth - width as CUnitValue; if null, this method does nothingpublic CElementPropertyContainer setFontFamily(java.lang.String fontFamily)
fontFamily - font family namepublic CElementPropertyContainer setFontColor(CColor fontColor)
fontColor - font color (RGBA)public CElementPropertyContainer setFontSize(float fontSize)
fontSize - font sizepublic CElementPropertyContainer setFontWeight(CFontWeight fontWeight)
fontWeight - font weight enum; if null, this method does nothingpublic CElementPropertyContainer setFontStyle(CFontStyle fontStyle)
fontStyle - font style enum; if null, this method does nothingpublic CElementPropertyContainer setTextAlignment(CTextAlignment textAlignment)
textAlignment - text alignment enum; if null, this method does nothingpublic CElementPropertyContainer setInlineVerticalAlignment(CVerticalAlignment inlineVerticalAlignment)
inlineVerticalAlignment - inline vertical alignment enum; if null, this method does nothingpublic CElementPropertyContainer setHorizontalAlignment(CHorizontalAlignment horizontalAlignment)
horizontalAlignment - horizontal alignment enum; if null, this method does nothingpublic CElementPropertyContainer setCharacterSpacing(float charSpacing)
charSpacing - character spacing valuepublic CElementPropertyContainer setWordSpacing(float wordSpacing)
wordSpacing - word spacing valuepublic CElementPropertyContainer setBackgroundColor(CColor color)
color - background color (RGBA); if null, this method does nothingpublic CElementPropertyContainer setBackgroundImage(CBackgroundImage bg)
bg - background image sources container; if null, this method does nothingpublic CElementPropertyContainer setBorder(CBorder border)
border - border object; if null, this method does nothingpublic CElementPropertyContainer setBorderRight(CBorder border)
border - border object; if null, this method does nothingpublic CElementPropertyContainer setBorderTop(CBorder border)
border - border object; if null, this method does nothingpublic CElementPropertyContainer setBorderBottom(CBorder border)
border - border object; if null, this method does nothingpublic CElementPropertyContainer setBorderLeft(CBorder border)
border - border object; if null, this method does nothingpublic CElementPropertyContainer setBorderRadius(CBorderRadius borderRadius)
borderRadius - border radius object; if null, this method does nothingpublic CElementPropertyContainer setBorderBottomLeftRadius(CBorderRadius borderRadius)
borderRadius - border radius object; if null, this method does nothingpublic CElementPropertyContainer setBorderBottomRightRadius(CBorderRadius borderRadius)
borderRadius - border radius object; if null, this method does nothingpublic CElementPropertyContainer setBorderTopLeftRadius(CBorderRadius borderRadius)
borderRadius - border radius object; if null, this method does nothingpublic CElementPropertyContainer setBorderTopRightRadius(CBorderRadius borderRadius)
borderRadius - border radius object; if null, this method does nothingpublic CColor getStrokeColor()
public CElementPropertyContainer setStrokeColor(CColor color)
color - stroke color (RGBA); if null, this method does nothingpublic CElementPropertyContainer setStrokeWidth(float strokeWidth)
strokeWidth - stroke widthpublic float getStrokeWidth()
public CElementPropertyContainer setUnderline(CColor c)
c - underline color (only RGB channels are used by the native call)public CElementPropertyContainer setOpacity(float opacity)
opacity - opacity value (typically 0.0 to 1.0)