Package com.openhtmltopdf.css.style
Class CalculatedStyle
- java.lang.Object
-
- com.openhtmltopdf.css.style.CalculatedStyle
-
- Direct Known Subclasses:
EmptyStyle
public class CalculatedStyle extends java.lang.Object
A set of properties that apply to a single Element, derived from all matched properties following the rules for CSS cascade, inheritance, importance, specificity and sequence. A property retrieved by name should always have exactly one value in this class (e.g. one-one map). Some methods to retrieve property values from an instance of this class require a validLayoutContext
be given to them.
This is the go to class for working with a resolved style. Generally, you can get a instance for a box by calling:Box.getStyle()
after a box has been created by theBoxBuilder
SharedContext.getStyle(org.w3c.dom.Element)
for an elementStyleReference.getPseudoElementStyle(org.w3c.dom.Node, String)
for a pseudo element. StyleReference is available fromLayoutContext
deriveStyle(CascadedStyle)
to create a child style (non-inherited
property values will not be available from the child style
EmptyStyle
to start with nothing
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CalculatedStyle.BackgroundContainer
static class
CalculatedStyle.BackgroundImageType
-
Field Summary
Fields Modifier and Type Field Description private BorderPropertySet
_border
private boolean
_bordersAllowed
private java.util.Map<java.lang.String,CalculatedStyle>
_childCache
Cache child styles of this style that have the same cascaded propertiesprivate FSDerivedValue[]
_derivedValuesById
Our main array of property values defined in this style, keyed by the CSSName assigned ID.private FontSpecification
_font
The derived Font for this styleprivate FSFont
_FSFont
private FSFontMetrics
_FSFontMetrics
private float
_lineHeight
private boolean
_lineHeightResolved
private RectPropertySet
_margin
private boolean
_marginsAllowed
private RectPropertySet
_padding
private boolean
_paddingAllowed
private CalculatedStyle
_parent
The parent-style we inherit fromstatic int
BOTTOM
static int
LEFT
static int
RIGHT
static int
TOP
-
Constructor Summary
Constructors Modifier Constructor Description protected
CalculatedStyle()
Default constructor; as the instance is immutable after use, don't use this for class instantiation externally.private
CalculatedStyle(CalculatedStyle parent, CascadedStyle matched)
Constructor for the CalculatedStyle object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FSColor
asColor(CSSName cssName)
float
asFloat(CSSName cssName)
Length
asLength(CssContext c, CSSName cssName)
java.lang.String
asString(CSSName cssName)
java.lang.String[]
asStringArray(CSSName cssName)
private void
checkBordersAllowed()
private void
checkMarginsAllowed()
private void
checkPaddingAllowed()
int
columnCount()
CalculatedStyle
createAnonymousStyle(IdentValue display)
This method derives a style for an anonymous child box with an overriden value for the display property.private void
derive(CascadedStyle matched)
This method should result in the element for this style having a derived value for all specified (in stylesheets, style attribute, other non CSS attrs, etc) primitive CSS properties.CalculatedStyle
deriveStyle(CascadedStyle matched)
Derives a child style from this style.private FSDerivedValue
deriveValue(CSSName cssName, CSSPrimitiveValue value)
boolean
establishesBFC()
int
fsMaxOverflowPages()
private java.lang.String
genStyleKey()
FSColor
getBackgroundColor()
Convenience property accessor; returns a Color initialized with the background color value; Uses the actual value (computed actual value) for this element.java.util.List<CalculatedStyle.BackgroundContainer>
getBackgroundImages()
Gets the values of the background properties and combines in a list of BackgroundContainer values.IdentValue
getBackgroundRepeat(PropertyValue value)
BorderPropertySet
getBorder(CssContext ctx)
int
getBorderHSpacing(CssContext c)
private static BorderPropertySet
getBorderProperty(CalculatedStyle style, CssContext ctx)
int
getBorderVSpacing(CssContext c)
RectPropertySet
getCachedMargin()
RectPropertySet
getCachedPadding()
FSColor
getColor()
Convenience property accessor; returns a Color initialized with the foreground color Uses the actual value (computed actual value) for this element.int
getColSpan()
java.util.List<CounterData>
getCounterIncrement()
java.util.List<CounterData>
getCounterReset()
static int
getCSSMaxHeight(CssContext c, Box box)
Aims to get the correct resolved max-height for a box in dots unit.static int
getCSSMaxWidth(CssContext c, Box box)
Aims to get the correct resolved max-width for a box in dots unit.java.awt.Cursor
getCursor()
FSDerivedValue[]
getderivedValuesById()
IdentValue
getDirection()
float
getFloatPropertyProportionalHeight(CSSName cssName, float parentHeight, CssContext ctx)
float
getFloatPropertyProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
float
getFloatPropertyProportionalWidth(CSSName cssName, float parentWidth, CssContext ctx)
FontSpecification
getFont(CssContext ctx)
FontSpecification
getFontSpecification()
FSFont
getFSFont(CssContext cssContext)
FSFontMetrics
getFSFontMetrics(CssContext c)
float
getFSPageBreakMinHeight(CssContext c)
IdentValue
getIdent(CSSName cssName)
Gets the ident attribute of the CalculatedStyle objectFSLinearGradient
getLinearGradient(PropertyValue value, CssContext cssContext, int boxWidth, int boxHeight)
float
getLineHeight(CssContext ctx)
int
getMarginBorderPadding(CssContext cssCtx, int cbWidth, int which)
private static RectPropertySet
getMarginProperty(CalculatedStyle style, CSSName shorthandProp, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx, boolean useCache)
RectPropertySet
getMarginRect(float cbWidth, CssContext ctx)
Convenience property accessor; returns a Border initialized with the four-sided margin width.RectPropertySet
getMarginRect(float cbWidth, CssContext ctx, boolean useCache)
int
getMaxHeight(CssContext c, int cbHeight)
int
getMaxWidth(CssContext c, int cbWidth)
int
getMinHeight(CssContext c, int cbHeight)
int
getMinWidth(CssContext c, int cbWidth)
private static RectPropertySet
getPaddingProperty(CalculatedStyle style, CSSName shorthandProp, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx, boolean useCache)
RectPropertySet
getPaddingRect(float cbWidth, CssContext ctx)
RectPropertySet
getPaddingRect(float cbWidth, CssContext ctx, boolean useCache)
Convenience property accessor; returns a Border initialized with the four-sided padding width.CalculatedStyle
getParent()
Returns the parent style.int
getRowSpan()
java.lang.String
getRunningName()
java.lang.String
getStringProperty(CSSName cssName)
java.util.List<IdentValue>
getTextDecorations()
IdentValue
getWhitespace()
IdentValue
getWordWrap()
boolean
hasAbsoluteUnit(CSSName cssName)
boolean
hasColumns()
boolean
hasLetterSpacing()
private void
init(CascadedStyle matched)
boolean
isAbsFixedOrInlineBlockEquiv()
boolean
isAbsolute()
boolean
isAbsoluteWidth()
boolean
isAutoHeight()
boolean
isAutoLeftMargin()
boolean
isAutoRightMargin()
boolean
isAutoWidth()
boolean
isAutoZIndex()
boolean
isAvoidPageBreakInside()
boolean
isBlockEquivalent()
boolean
isBorderBox()
boolean
isBottomAuto()
boolean
isCanBeShrunkToFit()
boolean
isCleared()
boolean
isClearLeft()
boolean
isClearRight()
boolean
isCollapseBorders()
boolean
isColumnBreakAfter()
boolean
isColumnBreakBefore()
boolean
isDirectionAuto()
boolean
isDirectionLTR()
boolean
isDirectionRTL()
boolean
isDisplayNone()
boolean
isDynamicAutoWidth()
boolean
isDynamicAutoWidthApplicable()
boolean
isFixed()
boolean
isFloated()
boolean
isFloatedLeft()
boolean
isFloatedRight()
boolean
isFootnote()
boolean
isFootnoteBody()
boolean
isForcePageBreakAfter()
boolean
isForcePageBreakBefore()
boolean
isHasBackground()
boolean
isHasBackgroundImage()
boolean
isHorizontalBackgroundRepeat(PropertyValue value)
boolean
isIdent(CSSName cssName, IdentValue val)
Gets the ident attribute of the CalculatedStyle objectboolean
isImageRenderingInterpolate()
boolean
isImageRenderingPixelated()
boolean
isInline()
boolean
isInlineBlock()
boolean
isInlineTable()
boolean
isKeepWithInline()
boolean
isLayedOutInInlineContext()
boolean
isLength(CSSName cssName)
TODO: docboolean
isLengthOrNumber(CSSName cssName)
boolean
isLinearGradient(PropertyValue value)
boolean
isListItem()
boolean
isListMarkerInside()
boolean
isMaxHeightNone()
boolean
isMaxWidthNone()
boolean
isMayCollapseMarginsWithChildren()
boolean
isNeedAutoMarginResolution()
boolean
isNonFlowContent()
boolean
isOverflowApplies()
boolean
isOverflowVisible()
boolean
isPaginateTable()
boolean
isParagraphContainerForBidi()
boolean
isPositioned()
boolean
isPostionedOrFloated()
boolean
isRelative()
boolean
isRunning()
boolean
isShowEmptyCells()
boolean
isSpecifiedAsBlock()
boolean
isTable()
boolean
isTableCaption()
boolean
isTableCell()
boolean
isTableFooter()
boolean
isTableHeader()
boolean
isTableRow()
boolean
isTableSection()
boolean
isTextJustify()
boolean
isTopAuto()
boolean
isVerticalBackgroundRepeat(PropertyValue value)
boolean
isVisible(RenderingContext renderingContext, Box thisElement)
Determine if the element is visible.boolean
mayHaveFirstLetter()
boolean
mayHaveFirstLine()
private static RectPropertySet
newRectInstance(CalculatedStyle style, CSSName shorthand, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx)
CalculatedStyle
overrideStyle(IdentValue display)
Override this style with specified styles.CalculatedStyle
overrideStyle(CascadedStyle matched)
Override this style with specified styles.boolean
requiresLayer()
private IdentValue
resolveAbsoluteFontSize()
java.lang.String
toString()
Converts to a String representation of the object.FSDerivedValue
valueByName(CSSName cssName)
Returns aFSDerivedValue
by name.
-
-
-
Field Detail
-
_parent
private CalculatedStyle _parent
The parent-style we inherit from
-
_border
private BorderPropertySet _border
-
_margin
private RectPropertySet _margin
-
_padding
private RectPropertySet _padding
-
_lineHeight
private float _lineHeight
-
_lineHeightResolved
private boolean _lineHeightResolved
-
_FSFont
private FSFont _FSFont
-
_FSFontMetrics
private FSFontMetrics _FSFontMetrics
-
_marginsAllowed
private boolean _marginsAllowed
-
_paddingAllowed
private boolean _paddingAllowed
-
_bordersAllowed
private boolean _bordersAllowed
-
_childCache
private final java.util.Map<java.lang.String,CalculatedStyle> _childCache
Cache child styles of this style that have the same cascaded properties
-
_derivedValuesById
private final FSDerivedValue[] _derivedValuesById
Our main array of property values defined in this style, keyed by the CSSName assigned ID.
-
_font
private FontSpecification _font
The derived Font for this style
-
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
-
TOP
public static final int TOP
- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CalculatedStyle
protected CalculatedStyle()
Default constructor; as the instance is immutable after use, don't use this for class instantiation externally.
-
CalculatedStyle
private CalculatedStyle(CalculatedStyle parent, CascadedStyle matched)
Constructor for the CalculatedStyle object. To get a derived style, use the Styler objects getDerivedStyle which will cache styles- Parameters:
parent
- PARAMmatched
- PARAM
-
-
Method Detail
-
getderivedValuesById
public FSDerivedValue[] getderivedValuesById()
-
init
private void init(CascadedStyle matched)
-
checkPaddingAllowed
private void checkPaddingAllowed()
-
checkMarginsAllowed
private void checkMarginsAllowed()
-
checkBordersAllowed
private void checkBordersAllowed()
-
deriveStyle
public CalculatedStyle deriveStyle(CascadedStyle matched)
Derives a child style from this style. Non-inherited properties such as borders will be replaced compared tothis
which is used as parent style.
Depends on the ability to return the identical CascadedStyle each time a child style is needed- Parameters:
matched
- the CascadedStyle to apply- Returns:
- The derived child style
-
overrideStyle
public CalculatedStyle overrideStyle(CascadedStyle matched)
Override this style with specified styles. This will NOT create a child style, rather an exact copy with only the specified properties overridden. Compare toderiveStyle(CascadedStyle)
.
-
overrideStyle
public CalculatedStyle overrideStyle(IdentValue display)
Override this style with specified styles. This will NOT create a child style, rather an exact copy with only the display property overridden. Compare tocreateAnonymousStyle(IdentValue)
which creates a child style.
-
getParent
public CalculatedStyle getParent()
Returns the parent style.- Returns:
- Returns the parent style
-
toString
public java.lang.String toString()
Converts to a String representation of the object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The borderWidth value
-
asFloat
public float asFloat(CSSName cssName)
-
asString
public java.lang.String asString(CSSName cssName)
-
asStringArray
public java.lang.String[] asStringArray(CSSName cssName)
-
hasAbsoluteUnit
public boolean hasAbsoluteUnit(CSSName cssName)
-
isIdent
public boolean isIdent(CSSName cssName, IdentValue val)
Gets the ident attribute of the CalculatedStyle object- Parameters:
cssName
- PARAMval
- PARAM- Returns:
- The ident value
-
getIdent
public IdentValue getIdent(CSSName cssName)
Gets the ident attribute of the CalculatedStyle object- Parameters:
cssName
- PARAM- Returns:
- The ident value
-
getColor
public FSColor getColor()
Convenience property accessor; returns a Color initialized with the foreground color Uses the actual value (computed actual value) for this element.- Returns:
- The color value
-
getBackgroundColor
public FSColor getBackgroundColor()
Convenience property accessor; returns a Color initialized with the background color value; Uses the actual value (computed actual value) for this element.- Returns:
- The backgroundColor value
-
getCounterReset
public java.util.List<CounterData> getCounterReset()
-
getCounterIncrement
public java.util.List<CounterData> getCounterIncrement()
-
getBorder
public BorderPropertySet getBorder(CssContext ctx)
-
getFont
public FontSpecification getFont(CssContext ctx)
-
getFontSpecification
public FontSpecification getFontSpecification()
-
resolveAbsoluteFontSize
private IdentValue resolveAbsoluteFontSize()
-
getFloatPropertyProportionalTo
public float getFloatPropertyProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
-
getFloatPropertyProportionalWidth
public float getFloatPropertyProportionalWidth(CSSName cssName, float parentWidth, CssContext ctx)
- Parameters:
cssName
-parentWidth
-ctx
-- Returns:
- TODO
-
getFloatPropertyProportionalHeight
public float getFloatPropertyProportionalHeight(CSSName cssName, float parentHeight, CssContext ctx)
- Parameters:
cssName
-parentHeight
-ctx
-- Returns:
- TODO
-
getLineHeight
public float getLineHeight(CssContext ctx)
-
getMarginRect
public RectPropertySet getMarginRect(float cbWidth, CssContext ctx)
Convenience property accessor; returns a Border initialized with the four-sided margin width. Uses the actual value (computed actual value) for this element.- Parameters:
cbWidth
-ctx
-- Returns:
- The marginWidth value
-
getMarginRect
public RectPropertySet getMarginRect(float cbWidth, CssContext ctx, boolean useCache)
-
getPaddingRect
public RectPropertySet getPaddingRect(float cbWidth, CssContext ctx, boolean useCache)
Convenience property accessor; returns a Border initialized with the four-sided padding width. Uses the actual value (computed actual value) for this element.- Parameters:
cbWidth
-ctx
-- Returns:
- The paddingWidth value
-
getPaddingRect
public RectPropertySet getPaddingRect(float cbWidth, CssContext ctx)
-
getStringProperty
public java.lang.String getStringProperty(CSSName cssName)
- Parameters:
cssName
-- Returns:
- TODO
-
isLength
public boolean isLength(CSSName cssName)
TODO: doc
-
isLengthOrNumber
public boolean isLengthOrNumber(CSSName cssName)
-
valueByName
public FSDerivedValue valueByName(CSSName cssName)
Returns aFSDerivedValue
by name. Because we are a derived style, the property will already be resolved at this point.
This will look up the ancestor tree for inherited properties and use an initial value for unspecified properties which do not inherit.- Parameters:
cssName
- The CSS property name, e.g. "font-family"
-
derive
private void derive(CascadedStyle matched)
This method should result in the element for this style having a derived value for all specified (in stylesheets, style attribute, other non CSS attrs, etc) primitive CSS properties. Other properties are picked up from an ancestor (if they inherit) or their initial values (if they don't inherit). SeevalueByName(CSSName)
.
The implementation is based on the notion that the matched styles are given to us in a perfectly sorted order, such that properties appearing later in the rule-set always override properties appearing earlier.
The current implementation makes no attempt to check this assumption. When this method exits, the derived property list for this class will be populated with the properties defined for this element, properly cascaded.
-
deriveValue
private FSDerivedValue deriveValue(CSSName cssName, CSSPrimitiveValue value)
-
genStyleKey
private java.lang.String genStyleKey()
-
getCachedPadding
public RectPropertySet getCachedPadding()
-
getCachedMargin
public RectPropertySet getCachedMargin()
-
getPaddingProperty
private static RectPropertySet getPaddingProperty(CalculatedStyle style, CSSName shorthandProp, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx, boolean useCache)
-
getMarginProperty
private static RectPropertySet getMarginProperty(CalculatedStyle style, CSSName shorthandProp, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx, boolean useCache)
-
newRectInstance
private static RectPropertySet newRectInstance(CalculatedStyle style, CSSName shorthand, CSSName.CSSSideProperties sides, float cbWidth, CssContext ctx)
-
getBorderProperty
private static BorderPropertySet getBorderProperty(CalculatedStyle style, CssContext ctx)
-
getMarginBorderPadding
public int getMarginBorderPadding(CssContext cssCtx, int cbWidth, int which)
-
getWhitespace
public IdentValue getWhitespace()
-
getFSFont
public FSFont getFSFont(CssContext cssContext)
-
getFSFontMetrics
public FSFontMetrics getFSFontMetrics(CssContext c)
-
getWordWrap
public IdentValue getWordWrap()
-
isClearLeft
public boolean isClearLeft()
-
isClearRight
public boolean isClearRight()
-
isCleared
public boolean isCleared()
-
getBackgroundRepeat
public IdentValue getBackgroundRepeat(PropertyValue value)
-
isInline
public boolean isInline()
-
isInlineBlock
public boolean isInlineBlock()
-
isTable
public boolean isTable()
-
isInlineTable
public boolean isInlineTable()
-
isTableCell
public boolean isTableCell()
-
isTableSection
public boolean isTableSection()
-
isTableCaption
public boolean isTableCaption()
-
isTableHeader
public boolean isTableHeader()
-
isTableFooter
public boolean isTableFooter()
-
isTableRow
public boolean isTableRow()
-
isDisplayNone
public boolean isDisplayNone()
-
isSpecifiedAsBlock
public boolean isSpecifiedAsBlock()
-
isBlockEquivalent
public boolean isBlockEquivalent()
-
isLayedOutInInlineContext
public boolean isLayedOutInInlineContext()
-
isNeedAutoMarginResolution
public boolean isNeedAutoMarginResolution()
-
isAbsolute
public boolean isAbsolute()
-
isFixed
public boolean isFixed()
-
isFloated
public boolean isFloated()
-
isFloatedLeft
public boolean isFloatedLeft()
-
isFloatedRight
public boolean isFloatedRight()
-
isFootnote
public boolean isFootnote()
-
isFootnoteBody
public boolean isFootnoteBody()
-
isRelative
public boolean isRelative()
-
isPostionedOrFloated
public boolean isPostionedOrFloated()
-
isPositioned
public boolean isPositioned()
-
isAutoWidth
public boolean isAutoWidth()
-
isAbsoluteWidth
public boolean isAbsoluteWidth()
-
isAutoHeight
public boolean isAutoHeight()
-
isAutoLeftMargin
public boolean isAutoLeftMargin()
-
isAutoRightMargin
public boolean isAutoRightMargin()
-
isAutoZIndex
public boolean isAutoZIndex()
-
establishesBFC
public boolean establishesBFC()
-
requiresLayer
public boolean requiresLayer()
-
isRunning
public boolean isRunning()
-
getRunningName
public java.lang.String getRunningName()
-
isOverflowApplies
public boolean isOverflowApplies()
-
isOverflowVisible
public boolean isOverflowVisible()
-
isHorizontalBackgroundRepeat
public boolean isHorizontalBackgroundRepeat(PropertyValue value)
-
isVerticalBackgroundRepeat
public boolean isVerticalBackgroundRepeat(PropertyValue value)
-
isTopAuto
public boolean isTopAuto()
-
isBottomAuto
public boolean isBottomAuto()
-
isListItem
public boolean isListItem()
-
hasColumns
public boolean hasColumns()
-
columnCount
public int columnCount()
-
fsMaxOverflowPages
public int fsMaxOverflowPages()
-
isVisible
public boolean isVisible(RenderingContext renderingContext, Box thisElement)
Determine if the element is visible. This is normaly the case if visibility == visible. Only when visibilty is -fs-table-paginate-repeated-visible and we are in a repeated table header the element will also be visible. This allows to only show an element in the table header after a page break.- Parameters:
renderingContext
- null or the current renderingContext. If null, then the -fs-table-paginate-repeated-visible logic will not work.thisElement
- the element for which the visibility should be determined. Only required if -fs-table-paginate-repeated-visible is specified.- Returns:
- true if the element is visible
-
isForcePageBreakBefore
public boolean isForcePageBreakBefore()
-
isForcePageBreakAfter
public boolean isForcePageBreakAfter()
-
isColumnBreakBefore
public boolean isColumnBreakBefore()
-
isColumnBreakAfter
public boolean isColumnBreakAfter()
-
isAvoidPageBreakInside
public boolean isAvoidPageBreakInside()
-
createAnonymousStyle
public CalculatedStyle createAnonymousStyle(IdentValue display)
This method derives a style for an anonymous child box with an overriden value for the display property.
NOTE: All non-inherited properties ofthis
will be lost as the returned style is for a child box.
-
mayHaveFirstLine
public boolean mayHaveFirstLine()
-
mayHaveFirstLetter
public boolean mayHaveFirstLetter()
-
isNonFlowContent
public boolean isNonFlowContent()
-
isMayCollapseMarginsWithChildren
public boolean isMayCollapseMarginsWithChildren()
-
isAbsFixedOrInlineBlockEquiv
public boolean isAbsFixedOrInlineBlockEquiv()
-
isMaxWidthNone
public boolean isMaxWidthNone()
-
isMaxHeightNone
public boolean isMaxHeightNone()
-
isImageRenderingPixelated
public boolean isImageRenderingPixelated()
-
isImageRenderingInterpolate
public boolean isImageRenderingInterpolate()
-
getMinWidth
public int getMinWidth(CssContext c, int cbWidth)
-
getMaxWidth
public int getMaxWidth(CssContext c, int cbWidth)
-
getMinHeight
public int getMinHeight(CssContext c, int cbHeight)
-
getMaxHeight
public int getMaxHeight(CssContext c, int cbHeight)
-
isCollapseBorders
public boolean isCollapseBorders()
-
getBorderHSpacing
public int getBorderHSpacing(CssContext c)
-
getBorderVSpacing
public int getBorderVSpacing(CssContext c)
-
getRowSpan
public int getRowSpan()
-
getColSpan
public int getColSpan()
-
getFSPageBreakMinHeight
public float getFSPageBreakMinHeight(CssContext c)
-
asLength
public Length asLength(CssContext c, CSSName cssName)
-
isShowEmptyCells
public boolean isShowEmptyCells()
-
getTextDecorations
public java.util.List<IdentValue> getTextDecorations()
-
getCursor
public java.awt.Cursor getCursor()
-
isPaginateTable
public boolean isPaginateTable()
-
isTextJustify
public boolean isTextJustify()
-
isListMarkerInside
public boolean isListMarkerInside()
-
isKeepWithInline
public boolean isKeepWithInline()
-
isDynamicAutoWidth
public boolean isDynamicAutoWidth()
-
isDynamicAutoWidthApplicable
public boolean isDynamicAutoWidthApplicable()
-
isCanBeShrunkToFit
public boolean isCanBeShrunkToFit()
-
isDirectionLTR
public boolean isDirectionLTR()
-
isDirectionRTL
public boolean isDirectionRTL()
-
isDirectionAuto
public boolean isDirectionAuto()
-
getDirection
public IdentValue getDirection()
-
hasLetterSpacing
public boolean hasLetterSpacing()
-
isParagraphContainerForBidi
public boolean isParagraphContainerForBidi()
-
isBorderBox
public boolean isBorderBox()
- Returns:
- true for border-box, false for content-box.
-
getCSSMaxWidth
public static int getCSSMaxWidth(CssContext c, Box box)
Aims to get the correct resolved max-width for a box in dots unit. Returns -1 if there is no max-width defined. Assumptions: box has a containing block.
-
getCSSMaxHeight
public static int getCSSMaxHeight(CssContext c, Box box)
Aims to get the correct resolved max-height for a box in dots unit. returns -1 if there is no max-height defined. Assumptions: box has a containing block.
-
isHasBackground
public boolean isHasBackground()
-
isHasBackgroundImage
public boolean isHasBackgroundImage()
-
isLinearGradient
public boolean isLinearGradient(PropertyValue value)
-
getLinearGradient
public FSLinearGradient getLinearGradient(PropertyValue value, CssContext cssContext, int boxWidth, int boxHeight)
-
getBackgroundImages
public java.util.List<CalculatedStyle.BackgroundContainer> getBackgroundImages()
Gets the values of the background properties and combines in a list of BackgroundContainer values.
-
-