public class CalculatedStyle extends Object
LayoutContext be given to them.
Box.getStyle() after a box has been created by the BoxBuilderSharedContext.getStyle(org.w3c.dom.Element) for an elementStyleReference.getPseudoElementStyle(org.w3c.dom.Node, String) for a pseudo
element. StyleReference is available from LayoutContextderiveStyle(CascadedStyle)EmptyStyle to start with nothing| Modifier and Type | Class and Description |
|---|---|
static class |
CalculatedStyle.BackgroundContainer |
static class |
CalculatedStyle.BackgroundImageType |
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM |
static int |
LEFT |
static int |
RIGHT |
static int |
TOP |
| Modifier | Constructor and Description |
|---|---|
protected |
CalculatedStyle()
Default constructor; as the instance is immutable after use, don't use
this for class instantiation externally.
|
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
protected CalculatedStyle()
public FSDerivedValue[] getderivedValuesById()
public CalculatedStyle deriveStyle(CascadedStyle matched)
this which is used
as parent style.
matched - the CascadedStyle to applypublic CalculatedStyle overrideStyle(CascadedStyle matched)
deriveStyle(CascadedStyle).public CalculatedStyle overrideStyle(IdentValue display)
createAnonymousStyle(IdentValue)
which creates a child style.public CalculatedStyle getParent()
public String toString()
public float asFloat(CSSName cssName)
public boolean hasAbsoluteUnit(CSSName cssName)
public boolean isIdent(CSSName cssName, IdentValue val)
cssName - PARAMval - PARAMpublic IdentValue getIdent(CSSName cssName)
cssName - PARAMpublic FSColor getColor()
public FSColor getBackgroundColor()
public List<CounterData> getCounterReset()
public List<CounterData> getCounterIncrement()
public BorderPropertySet getBorder(CssContext ctx)
public BorderPropertySet getDeclaredBorder(CssContext ctx)
TableCellBox, while
getBorder(CssContext) keeps returning an empty border so that
neither the layout nor the painting of the row itself is affected.public FontSpecification getFont(CssContext ctx)
public FontSpecification getFontSpecification()
public float getFloatPropertyProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
public float getFloatPropertyProportionalWidth(CSSName cssName, float parentWidth, CssContext ctx)
cssName - parentWidth - ctx - public float getFloatPropertyProportionalHeight(CSSName cssName, float parentHeight, CssContext ctx)
cssName - parentHeight - ctx - public float getLineHeight(CssContext ctx)
public RectPropertySet getMarginRect(float cbWidth, CssContext ctx)
cbWidth - ctx - public RectPropertySet getMarginRect(float cbWidth, CssContext ctx, boolean useCache)
public RectPropertySet getPaddingRect(float cbWidth, CssContext ctx, boolean useCache)
cbWidth - ctx - public RectPropertySet getPaddingRect(float cbWidth, CssContext ctx)
public String getStringProperty(CSSName cssName)
cssName - public boolean isLength(CSSName cssName)
public boolean isLengthOrNumber(CSSName cssName)
public FSDerivedValue valueByName(CSSName cssName)
FSDerivedValue by name. Because we are a derived
style, the property will already be resolved at this point.
cssName - The CSS property name, e.g. "font-family"public PropertyValue resolvePendingVarPropertyValue(PendingVarPropertyDeclaration pd)
resolvePendingVar(com.openhtmltopdf.css.sheet.PendingVarPropertyDeclaration) but returns the resolved value as a single
PropertyValue (or null). Used for values read directly
rather than via valueByName(CSSName), such as content.public RectPropertySet getCachedPadding()
public RectPropertySet getCachedMargin()
public int getMarginBorderPadding(CssContext cssCtx, int cbWidth, int which)
public IdentValue getWhitespace()
public FSFont getFSFont(CssContext cssContext)
public FSFontMetrics getFSFontMetrics(CssContext c)
public IdentValue getWordWrap()
public boolean isClearLeft()
public boolean isClearRight()
public boolean isCleared()
public IdentValue getBackgroundRepeat(PropertyValue value)
public boolean isInline()
public boolean isInlineBlock()
public boolean isTable()
public boolean isInlineTable()
public boolean isTableCell()
public boolean isTableSection()
public boolean isTableCaption()
public boolean isTableHeader()
public boolean isTableFooter()
public boolean isTableRow()
public boolean isDisplayNone()
public boolean isSpecifiedAsBlock()
public boolean isBlockEquivalent()
public boolean isLayedOutInInlineContext()
public boolean isNeedAutoMarginResolution()
public boolean isAbsolute()
public boolean isFixed()
public boolean isFloated()
public boolean isFloatedLeft()
public boolean isFloatedRight()
public boolean isFootnote()
public boolean isFootnoteBody()
public boolean isRelative()
public boolean isPostionedOrFloated()
public boolean isPositioned()
public boolean isAutoWidth()
public boolean isAbsoluteWidth()
public boolean isAutoHeight()
public boolean isAutoLeftMargin()
public boolean isAutoRightMargin()
public boolean isAutoZIndex()
public boolean establishesBFC()
public boolean requiresLayer()
public boolean isRunning()
public String getRunningName()
public boolean isOverflowApplies()
public boolean isOverflowVisible()
public boolean isHorizontalBackgroundRepeat(PropertyValue value)
public boolean isVerticalBackgroundRepeat(PropertyValue value)
public boolean isTopAuto()
public boolean isBottomAuto()
public boolean isListItem()
public boolean hasColumns()
public int columnCount()
public int fsMaxOverflowPages()
public boolean isVisible(RenderingContext renderingContext, Box thisElement)
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.public boolean isForcePageBreakBefore()
public boolean isForcePageBreakAfter()
public boolean isColumnBreakBefore()
public boolean isColumnBreakAfter()
public boolean isAvoidPageBreakInside()
public CalculatedStyle createAnonymousStyle(IdentValue display)
this will be lost as
the returned style is for a child box.public boolean mayHaveFirstLine()
public boolean mayHaveFirstLetter()
public boolean isNonFlowContent()
public boolean isMayCollapseMarginsWithChildren()
public boolean isAbsFixedOrInlineBlockEquiv()
public boolean isMaxWidthNone()
public boolean isMaxHeightNone()
public boolean isImageRenderingPixelated()
public boolean isImageRenderingInterpolate()
public int getMinWidth(CssContext c, int cbWidth)
public int getMaxWidth(CssContext c, int cbWidth)
public int getMinHeight(CssContext c, int cbHeight)
public int getMaxHeight(CssContext c, int cbHeight)
public boolean isCollapseBorders()
public int getBorderHSpacing(CssContext c)
public int getBorderVSpacing(CssContext c)
public int getRowSpan()
public int getColSpan()
public float getFSPageBreakMinHeight(CssContext c)
public Length asLength(CssContext c, CSSName cssName)
public boolean isShowEmptyCells()
public List<IdentValue> getTextDecorations()
public FSColor getTextDecorationColor()
text-decoration-color longhand or as part of the
text-decoration shorthand (eg.
text-decoration: underline red;).
Returns null for the initial value,
currentcolor, meaning the decoration takes the element's own
text color.
public IdentValue getTextUnderlinePosition()
public FSDerivedValue getTextUnderlineOffset()
public Cursor getCursor()
public boolean isPaginateTable()
public boolean isTextJustify()
public IdentValue getTextAlign()
public boolean isListMarkerInside()
public boolean isKeepWithInline()
public boolean isDynamicAutoWidth()
public boolean isDynamicAutoWidthApplicable()
public boolean isCanBeShrunkToFit()
public boolean isDirectionLTR()
public boolean isDirectionRTL()
public boolean isDirectionAuto()
public IdentValue getDirection()
public boolean hasLetterSpacing()
public boolean hasWordSpacing()
public boolean isParagraphContainerForBidi()
public boolean isBorderBox()
public static int getCSSMaxWidth(CssContext c, Box box)
public static int getCSSMaxHeight(CssContext c, Box box)
public boolean isHasBackground()
public boolean isHasBackgroundImage()
public boolean isLinearGradient(PropertyValue value)
public FSLinearGradient getLinearGradient(PropertyValue value, CssContext cssContext, int boxWidth, int boxHeight)
public List<CalculatedStyle.BackgroundContainer> getBackgroundImages()
Copyright © 2004–2026. All rights reserved.