public class Style extends ElementPropertyContainer<Style>
AbstractElement
properties
Constructor and Description |
---|
Style() |
Modifier and Type | Method and Description |
---|---|
Float |
getMarginBottom()
Gets the current bottom margin width of the element.
|
Float |
getMarginLeft()
Gets the current left margin width of the element.
|
Float |
getMarginRight()
Gets the current right margin width of the element.
|
Float |
getMarginTop()
Gets the current top margin width of the element.
|
Float |
getPaddingBottom()
Gets the current bottom padding width of the element.
|
Float |
getPaddingLeft()
Gets the current left padding width of the element.
|
Float |
getPaddingRight()
Gets the current right padding width of the element.
|
Float |
getPaddingTop()
Gets the current top padding width of the element.
|
Boolean |
isKeepTogether()
Returns whether the
BlockElement should be kept together as much
as possible. |
Style |
setKeepTogether(boolean keepTogether)
Sets whether the
BlockElement should be kept together as much
as possible. |
Style |
setMargin(float commonMargin)
Sets all margins around the element to the same width.
|
Style |
setMarginBottom(float value)
Sets the bottom margin width of the element.
|
Style |
setMarginLeft(float value)
Sets the left margin width of the element.
|
Style |
setMarginRight(float value)
Sets the right margin width of the element.
|
Style |
setMargins(float marginTop,
float marginRight,
float marginBottom,
float marginLeft)
Sets the margins around the element to a series of new widths.
|
Style |
setMarginTop(float value)
Sets the top margin width of the element.
|
Style |
setPadding(float commonPadding)
Sets all paddings around the element to the same width.
|
Style |
setPaddingBottom(float value)
Sets the bottom padding width of the element.
|
Style |
setPaddingLeft(float value)
Sets the left padding width of the element.
|
Style |
setPaddingRight(float value)
Sets the right padding width of the element.
|
Style |
setPaddings(float paddingTop,
float paddingRight,
float paddingBottom,
float paddingLeft)
Sets the paddings around the element to a series of new widths.
|
Style |
setPaddingTop(float value)
Sets the top padding width of the element.
|
Style |
setRotationAngle(double angle)
Sets the rotation angle.
|
Style |
setRotationAngle(float radAngle)
Sets the rotation radAngle.
|
Style |
setSpacingRatio(float ratio)
Sets a ratio which determines in which proportion will word spacing and character spacing
be applied when horizontal alignment is justified.
|
Style |
setVerticalAlignment(VerticalAlignment verticalAlignment)
Sets the vertical alignment of the element.
|
deleteOwnProperty, getDefaultProperty, getHeight, getOwnProperty, getProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, hasProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
public Float getMarginLeft()
float
public Style setMarginLeft(float value)
value
- the new left margin widthpublic Float getMarginRight()
float
public Style setMarginRight(float value)
value
- the new right margin widthpublic Float getMarginTop()
float
public Style setMarginTop(float value)
value
- the new top margin widthpublic Float getMarginBottom()
float
public Style setMarginBottom(float value)
value
- the new bottom margin widthpublic Style setMargin(float commonMargin)
commonMargin
- the new margin widthpublic Style setMargins(float marginTop, float marginRight, float marginBottom, float marginLeft)
marginTop
- the new margin top widthmarginRight
- the new margin right widthmarginBottom
- the new margin bottom widthmarginLeft
- the new margin left widthpublic Float getPaddingLeft()
float
public Style setPaddingLeft(float value)
value
- the new left padding widthpublic Float getPaddingRight()
float
public Style setPaddingRight(float value)
value
- the new right padding widthpublic Float getPaddingTop()
float
public Style setPaddingTop(float value)
value
- the new top padding widthpublic Float getPaddingBottom()
float
public Style setPaddingBottom(float value)
value
- the new bottom padding widthpublic Style setPadding(float commonPadding)
commonPadding
- the new padding widthpublic Style setPaddings(float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
paddingTop
- the new padding top widthpaddingRight
- the new padding right widthpaddingBottom
- the new padding bottom widthpaddingLeft
- the new padding left widthpublic Style setVerticalAlignment(VerticalAlignment verticalAlignment)
verticalAlignment
- the vertical alignment settingpublic Style setSpacingRatio(float ratio)
ratio
- the ratio coefficient. It must be between 0 and 1, inclusive.
It means that ratio part of the free space will
be compensated by word spacing, and 1-ratio part of the free space will
be compensated by character spacing.
If ratio is 1, additional character spacing will not be applied.
If ratio is 0, additional word spacing will not be applied.public Boolean isKeepTogether()
BlockElement
should be kept together as much
as possible.Property.KEEP_TOGETHER
propertypublic Style setKeepTogether(boolean keepTogether)
BlockElement
should be kept together as much
as possible.keepTogether
- the new value of the Property.KEEP_TOGETHER
propertypublic Style setRotationAngle(float radAngle)
radAngle
- the new rotation radAngle, as a float
public Style setRotationAngle(double angle)
angle
- the new rotation angle, as a double
Copyright © 1998–2017 iText Group NV. All rights reserved.