|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xhtmlrenderer.css.style.CalculatedStyle
public class CalculatedStyle
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 derived style is just like a style but
(presumably) has additional information that allows relative properties to be
assigned values, e.g. font attributes. Property values are fully resolved
when this style is created. A property retrieved by name should always have
only one value in this class (e.g. one-one map). Any methods to retrieve
property values from an instance of this class require a valid org.xhtmlrenderer.layout.Context be given to it, for some cases of property
resolution. Generally, a programmer will not use this class directly, but
will retrieve properties using a StyleReference
implementation.
| Field Summary | |
|---|---|
static int |
BOTTOM
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
| Constructor Summary | |
|---|---|
protected |
CalculatedStyle()
Default constructor; as the instance is immutable after use, don't use this for class instantiation externally. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
| Constructor Detail |
|---|
protected CalculatedStyle()
| Method Detail |
|---|
public CalculatedStyle deriveStyle(CascadedStyle matched)
matched - the CascadedStyle to apply
public int countAssigned()
public CalculatedStyle getParent()
public String toString()
toString in class Objectpublic FSColor asColor(CSSName cssName)
public float asFloat(CSSName cssName)
public String asString(CSSName cssName)
public String[] asStringArray(CSSName cssName)
public void setDefaultValue(CSSName cssName,
FSDerivedValue fsDerivedValue)
public boolean hasAbsoluteUnit(CSSName cssName)
public boolean isIdent(CSSName cssName,
IdentValue val)
cssName - PARAMval - PARAM
public IdentValue getIdent(CSSName cssName)
cssName - PARAM
public FSColor getColor()
public FSColor getBackgroundColor()
public BackgroundSize getBackgroundSize()
public BackgroundPosition getBackgroundPosition()
public List getCounterReset()
public List getCounterIncrement()
public BorderPropertySet getBorder(CssContext ctx)
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 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()
public IdentValue getBackgroundAttachment()
public boolean isFixedBackground()
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 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()
public boolean isVerticalBackgroundRepeat()
public boolean isTopAuto()
public boolean isBottomAuto()
public boolean isListItem()
public boolean isVisible()
public boolean isForcePageBreakBefore()
public boolean isForcePageBreakAfter()
public boolean isAvoidPageBreakInside()
public CalculatedStyle createAnonymousStyle(IdentValue display)
public boolean mayHaveFirstLine()
public boolean mayHaveFirstLetter()
public boolean isNonFlowContent()
public boolean isMayCollapseMarginsWithChildren()
public boolean isAbsFixedOrInlineBlockEquiv()
public boolean isMaxWidthNone()
public boolean isMaxHeightNone()
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 Length asLength(CssContext c,
CSSName cssName)
public boolean isShowEmptyCells()
public boolean isHasBackground()
public List getTextDecorations()
public Cursor getCursor()
public boolean isPaginateTable()
public boolean isTextJustify()
public boolean isListMarkerInside()
public boolean isKeepWithInline()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||