Package ro.sync.ecss.css
Class Styles
java.lang.Object
ro.sync.ecss.css.Styles
- All Implemented Interfaces:
Cloneable
Represents the computed style properties for a particular element.
These styles are taken from the CSS.
See: http://www.w3.org/TR/CSS21/cascade.html#q1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static int
Constants counterstatic final float
This is the factor: ex-height / em-height The ex unit is defined by the font's x-height.static final int
Value for the "bold" in the font-weight propery.static final int
Value for the "normal" in the font-weight propery.static final int
Property for CSS media paged, the alignment relative to the baseline.static final int
Background color.static final int
Key used to store the property 'background-image' value.static final int
Key used to store the property 'background-position' value.static final int
Key used to store the property 'background-repeat' value.static final int
Key used to store the property 'background-size' value.static final int
Bookmark label.static final int
Bookmark level.static final int
Bookmark state.static final int
Border bottom colorstatic final int
border-bottom-left-radius.static final int
border-bottom-right-radius.static final int
Border bottom stylestatic final int
Border bottom widthstatic final int
This property selects a table's border model.static final int
Border left colorstatic final int
Border right stylestatic final int
Border left widthstatic final int
Border right colorstatic final int
Border right stylestatic final int
Border right widthstatic final int
Key for the border spacing arraystatic final int
Border top colorstatic final int
border-top-left-radius.static final int
border-top-right-radius.static final int
Border top stylestatic final int
Border top widthstatic final int
The 'bottom' property.static final int
Property for CSS media paged, signal the break policy that appliesstatic final int
Property for CSS media paged, signal the break policy that appliesstatic final int
Property for CSS media paged, signal the break policy that appliesstatic final int
Property for CSS caption-side property.static final int
Specify how an element can span over a multiple column layout.static final int
The key for counter-increment .static final int
The key for counter-reset .static final int
Whitespace specified directly on the node, not inherited.static final int
Key used to store the property 'direction' value.static final int
Display typestatic final int
Key used to hide sentinel markers.static final int
True if this view is editablestatic final int
Key used to store the property 'empty-cells' value as string.static final int
Key used to store the property 'empty-cells' value as boolean.static final int
Key set for filtered out nodes.static final int
Property for CSS media paged "float".static final int
Key used to store the property 'foldable' value.static final int
Key used to store the property 'folded' value.static final int
Used fontstatic final int
Font family.static final int
Font size.static final int
Font style.static final int
Font variantstatic final int
Font variant alternates.static final int
Font variant ligatures.static final int
Font variant numeric.static final int
Font weightstatic final int
Foregroundstatic final int
Height.static final int
This property controls whether hyphenation is allowed to create more soft wrap opportunities within a line of text.static final int
Key used to specify the image DPI.static final int
Key used to override the display property defined in the css.static final int
The 'left' property.static final int
Font letter spacing.static final int
If it is a float, it means a line height multiplier, which is relative to the current font, and was specified as a number without metric or a percent.static final int
Key used to store the URL for link elements.static final int
Deprecated.since 17static final int
List style imagestatic final int
List style positionstatic final int
List style typestatic final int
Margin dimensionsstatic final int
Margin leftstatic final int
Margin rightstatic final int
Margin topstatic final int
Maximum height.static final int
Maximum width.static final int
Minimum height.static final int
Minimum width.static final int
Generated mixed Content property key.static final int
Key used to store the property 'non foldable child name' value.static final int
Property for CSS media paged "orphans".static final int
Outline colorstatic final int
Outline stylestatic final int
Outline widthstatic final int
Overflow wrap.static final int
Key used to specify the accessibility alternate text.static final int
Controls the line breaking status for hyphens.static final int
Property for -oxy-borders-conditionality which allow borders on line breaks.static final int
Controls the line breaking status for hyphens.static final int
Property enabling the table caption repetition on next pages (When the table is long and it spans multiple pages).static final int
Property for -oxy-changebar-color, set the changebar color.static final int
Property for -oxy-changebar-offset, set the distance from the column edge.static final int
Property for -oxy-changebar-placement, set the changebar position.static final int
Property for -oxy-changebar-style, set how the change bar appears.static final int
Property for -oxy-changebar-width, set the changebar color.static final int
Property for CSS media paged, signals the column break policy that applies.static final int
Property for CSS media paged, signals the column break policy that applies.static final int
Property for CSS media paged, signals the column break policy that applies.static final int
Key used to store the property -oxy-floating-toolbar.static final int
Key used to store the property '-oxy-foreground-image' value.static final int
An oxygen extension, mostly used to hide the hyphen characters.static final int
The minimum number of characters in a hyphenated word after the hyphenation character.static final int
The hyphenation-remain-character-count specifies the minimum number of characters in a hyphenated word before the hyphenation character.static final int
Key used to store the property '-oxy-link-activation-trigger' value.static final int
Theoxy-page-group
property.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
Key used for PDF metadata.static final int
A flag specifying if the footer of a table should be omitted at break.static final int
A flag specifying if the header of a table should be omitted at break.static final int
Key used to specify the accessibility PDF tag.static final int
A flag specifying if the doc title should be displayed.static final int
A flag specifying whether to resize the document�s window to fit the size of the first displayed page.static final int
If the viewer menubar should be visible or not.static final int
If the viewer toolbarshould be visible or not.static final int
A name object specifying the page layout shall be used when the document is opened: single-page Display one page at a time one-column Display the pages in one column two-column-left Display the pages in two columns, with odd- numbered pages on the left two-column-right Display the pages in two columns, with odd- numbered pages on the rightstatic final int
A name object specifying how the document shall be displayed when opened: none Neither document outline nor thumbnail images visible use-outlines Document outline visible use-thumbs Thumbnail images visible full-screen Full-screen mode, with no menu bar, window controls, or any other window visiblestatic final int
The zoom factor applied to the viewport when the PDF document is loaded.static final int
Property that marks a pseudo :before or :after that is associated to a table caption.static final int
Property for -oxy-space-after-conditionality which allow margin-bottom drop on elements.static final int
Property for-oxy-space-before-conditionality which allow margin-top drop on elements.static final int
The -oxy-style property that defines additional styles.static final int
Key used to store the property '-oxy-video-cover' value.static final int
Padding dimensionsstatic final int
Pad leftstatic final int
Pad rightstatic final int
Pad topstatic final int
The CSS page - for media print.static final int
Property for CSS media paged, signals the page break policy that applies.static final int
Property for CSS media paged, signals the page break policy that applies.static final int
Property for CSS media paged, signals the page break policy that applies.static final int
Key used to store the property 'placeholder-content' value.static final int
The 'position' property.static final int
The 'right' property.static final int
Key used to store the property 'show-placeholder' value.static final int
Property for CSS media paged "string-set".static final int
CSS property taken into account to compute the column spanning of a table cell.static final int
The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns.static final int
CSS property taken into account to compute the row spanning of a table cell.static final int
Key used to store the property '-oxy-tags-background-color' value.static final int
Key used to store the property '-oxy-tags-color' value.static final int
Text alignstatic final int
Deprecated.It is a shorthand now, useKEY_TEXT_DECORATION_LINE
,KEY_TEXT_DECORATION_COLOR
,KEY_TEXT_DECORATION_STYLE
instead.static final int
Key used to store color for text decoration.static final int
Key used to store 'text-decoration-line' property.static final int
Key used to store 'text-decoration' property.static final int
Text indentstatic final int
Text transformstatic final int
The 'top' property.static final int
Specify that the element can have a different rotation than the parent.static final int
Key used to store the property 'unicode-bidi' value.static final int
Key for vertical align.static final int
Key for the 'visibility' property.static final int
Deprecated.This is a typo of theKEY_VISIBILITY
.static final int
Whitespacestatic final int
Property for CSS media paged "widows".static final int
Width.protected static int
All the properties before this counter are for media screen.protected final Object[]
The styles map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the styles increment or reset some of the counters.boolean
Verify if styles can be cached.clone()
Shallow clone.boolean
Checks if the style defines some static content using the target-counter or target-counters CSS function.boolean
This property sets the background image of an element.ro.sync.ecss.css.BackgroundPosition
If a background position is specified, this property indicates the position of the background image relative to its box.If a background image is specified, this property specifies whether the image is repeated (tiled), and how.int
int
int
int
getColor()
The direction CSS property should be set to match the direction of the text:rtl
for Hebrew or Arabic text andltr
for other scripts.First it looks at the KEY_IMPOSED_DISPLAY property.getFont()
Gets the font-variant.int
int
getLeft()
org.w3c.css.sac.LexicalUnit
getLexicalUnit
(int key) Gets a lexical unit.int
Sets the distance between lines: normal number length %Gets the value associated with the min-height propertyString[]
int
Checks the 'position' property.getProperty
(int property) getPropertyByName
(String name) Retrieve the property by its name.static String
getPropertyName
(int index) int
If this is the style for a pseudo element, get its level.int
Use this to get the number of recognized properties.getRight()
boolean
The string-set property contains one or more pairs, each consisting of an custom identifier (the name of the named string) followed by a content-list describing how to construct the value of the named string.int
Gets the 'table-column-span' property value.int
Gets the 'table-row-span' property value.Obtain the color for full-tags background.Obtain the color for full-tags background.Aligns the text in an element: left right center justify.String[]
Deprecated.This was used to return only the text-decoration-line part from the text-decoration shorthand, as defined here https://drafts.csswg.org/css-text-decor-3/#text-decoration-property.String[]
Gets the horizontal space that should be left before the beginning of the first line of the text content of an element.getTop()
The unicode-bidi CSS property together with the direction property relates to the handling of bidirectional text in a document.int
getWidth()
boolean
int
hashCode()
boolean
Check if the display has '-oxy-change-bar-start' or '-oxy-change-bar-end' value.boolean
boolean
boolean
boolean
boolean
isFolded()
static boolean
isInheritable
(int property) Check if the given property should be copied from parent to child.static boolean
isInheritable
(String property) Check if the given property can be inherited from parent to child.boolean
isInline()
Gets the imposed display - it may be the same as the one specified in the CSS - and checks if it is inline or inline block.boolean
boolean
boolean
Check if is a style from a table but not a cell.boolean
boolean
boolean
Check if the display has 'morph' or '-oxy-morph' value.boolean
Checks if the text-align property from the current element styles has a value specified by the CSS.boolean
isTable()
Checks if the display mode indicated to be a table.boolean
Checks if the display mode indicated to be a table caption.boolean
Checks if the display mode indicated to be a table cell.boolean
Checks if the display mode indicated to be a table column.boolean
Checks if the display mode indicated to be a table group of columns.boolean
Checks if the display mode indicated to be a table group footer.boolean
Checks if the display mode indicated to be a table group header.boolean
boolean
void
setCanBeCached
(boolean canBeCached) Sets if those styles can be shared between two or more nodes.void
setCustomProperty
(Map<String, ro.sync.ecss.css.functions.customprop.CustomPropertyValue> props) Sets the list of custom CSS properties and their values.void
setProperty
(int property, Object value) Set a property to the map.void
setProperty
(int property, Object value, org.w3c.css.sac.LexicalUnit lu) Set a property to the map.void
setPseudoLevel
(int pseudoLevel) If this is the style for a pseudo element, keep here its level.toString()
-
Field Details
-
EX_FACTOR
public static final float EX_FACTORThis is the factor: ex-height / em-height The ex unit is defined by the font's x-height. The x-height is so called because it is often equal to the height of the lowercase "x". However, an ex is defined even for fonts that don't contain an "x".- See Also:
-
FONT_WEIGHT_NORMAL
public static final int FONT_WEIGHT_NORMALValue for the "normal" in the font-weight propery. Spec: normal Same as '400'.- See Also:
-
FONT_WEIGHT_BOLD
public static final int FONT_WEIGHT_BOLDValue for the "bold" in the font-weight propery. Spec: normal Same as '700'.- See Also:
-
counter
protected static int counterConstants counter -
KEY_BACKGROUND_COLOR
public static final int KEY_BACKGROUND_COLORBackground color. -
KEY_BORDER_BOTTOM_COLOR
public static final int KEY_BORDER_BOTTOM_COLORBorder bottom color -
KEY_BORDER_BOTTOM_STYLE
public static final int KEY_BORDER_BOTTOM_STYLEBorder bottom style -
KEY_BORDER_BOTTOM_WIDTH
public static final int KEY_BORDER_BOTTOM_WIDTHBorder bottom width -
KEY_BORDER_LEFT_COLOR
public static final int KEY_BORDER_LEFT_COLORBorder left color -
KEY_BORDER_LEFT_STYLE
public static final int KEY_BORDER_LEFT_STYLEBorder right style -
KEY_BORDER_LEFT_WIDTH
public static final int KEY_BORDER_LEFT_WIDTHBorder left width -
KEY_BORDER_RIGHT_COLOR
public static final int KEY_BORDER_RIGHT_COLORBorder right color -
KEY_BORDER_RIGHT_STYLE
public static final int KEY_BORDER_RIGHT_STYLEBorder right style -
KEY_BORDER_RIGHT_WIDTH
public static final int KEY_BORDER_RIGHT_WIDTHBorder right width -
KEY_BORDER_TOP_COLOR
public static final int KEY_BORDER_TOP_COLORBorder top color -
KEY_BORDER_TOP_STYLE
public static final int KEY_BORDER_TOP_STYLEBorder top style -
KEY_BORDER_TOP_WIDTH
public static final int KEY_BORDER_TOP_WIDTHBorder top width -
KEY_FOREGROUND_COLOR
public static final int KEY_FOREGROUND_COLORForeground -
KEY_MIXED_CONTENT
public static final int KEY_MIXED_CONTENTGenerated mixed Content property key.
The value set for this property must be an array of instances of theStaticContent
interface.
For example:new
StaticContent
[] { newStringContent
("Text value for the KEY_MIXED_CONTENT property") } -
KEY_DISPLAY
public static final int KEY_DISPLAYDisplay type -
KEY_FONT
public static final int KEY_FONTUsed font -
KEY_FONT_WEIGHT
public static final int KEY_FONT_WEIGHTFont weight -
KEY_LINE_HEIGHT
public static final int KEY_LINE_HEIGHTIf it is a float, it means a line height multiplier, which is relative to the current font, and was specified as a number without metric or a percent. If it is an integer, is a fixed value, specified using em, pt, ex, px, etc.. -
KEY_LIST_STYLE_TYPE
public static final int KEY_LIST_STYLE_TYPEList style type -
KEY_LIST_STYLE_POSITION
public static final int KEY_LIST_STYLE_POSITIONList style position -
KEY_MARGIN_BOTTOM
public static final int KEY_MARGIN_BOTTOMMargin dimensions -
KEY_MARGIN_LEFT
public static final int KEY_MARGIN_LEFTMargin left -
KEY_MARGIN_RIGHT
public static final int KEY_MARGIN_RIGHTMargin right -
KEY_MARGIN_TOP
public static final int KEY_MARGIN_TOPMargin top -
KEY_PADDING_BOTTOM
public static final int KEY_PADDING_BOTTOMPadding dimensions -
KEY_PADDING_LEFT
public static final int KEY_PADDING_LEFTPad left -
KEY_PADDING_RIGHT
public static final int KEY_PADDING_RIGHTPad right -
KEY_PADDING_TOP
public static final int KEY_PADDING_TOPPad top -
KEY_WIDTH
public static final int KEY_WIDTHWidth. Applies to blocks. It can be null. -
KEY_HEIGHT
public static final int KEY_HEIGHTHeight. Applies to images for now. It can be null. -
KEY_MIN_WIDTH
public static final int KEY_MIN_WIDTHMinimum width. Applies to blocks. It can be null. -
KEY_MAX_WIDTH
public static final int KEY_MAX_WIDTHMaximum width. Applies to blocks. It can be null. -
KEY_TEXT_ALIGN
public static final int KEY_TEXT_ALIGNText align -
KEY_TEXT_INDENT
public static final int KEY_TEXT_INDENTText indent -
KEY_WHITESPACE
public static final int KEY_WHITESPACEWhitespace -
KEY_EDITABLE
public static final int KEY_EDITABLETrue if this view is editable -
KEY_BORDER_SPACING
public static final int KEY_BORDER_SPACINGKey for the border spacing array -
KEY_VISIBILITY
public static final int KEY_VISIBILITYKey for the 'visibility' property. -
KEY_VISIBITY
Deprecated.This is a typo of theKEY_VISIBILITY
.Key for the 'visibility' property. -
KEY_EMPTY_CELLS
public static final int KEY_EMPTY_CELLSKey used to store the property 'empty-cells' value as string. -
KEY_FOLDABLE
public static final int KEY_FOLDABLEKey used to store the property 'foldable' value. -
KEY_NON_FOLDABLE_CHILD_NAME
public static final int KEY_NON_FOLDABLE_CHILD_NAMEKey used to store the property 'non foldable child name' value. -
KEY_VERTICAL_ALIGN
public static final int KEY_VERTICAL_ALIGNKey for vertical align. -
KEY_COUNTER_RESET
public static final int KEY_COUNTER_RESETThe key for counter-reset . -
KEY_COUNTER_INCREMENT
public static final int KEY_COUNTER_INCREMENTThe key for counter-increment . -
KEY_IMPOSED_DISPLAY
public static final int KEY_IMPOSED_DISPLAYKey used to override the display property defined in the css. -
KEY_TEXT_DECORATION_LINE
public static final int KEY_TEXT_DECORATION_LINEKey used to store 'text-decoration-line' property. -
KEY_TEXT_DECORATION
Deprecated.It is a shorthand now, useKEY_TEXT_DECORATION_LINE
,KEY_TEXT_DECORATION_COLOR
,KEY_TEXT_DECORATION_STYLE
instead.Key used to store 'text-decoration' property. It is mapped to theKEY_TEXT_DECORATION_LINE
. Starting from CSS level 3, the 'text-decoration' property is a shorthand, mapped to 'text-decoration-line', 'text-decoration-style' and 'text-decoration-color'. -
KEY_TEXT_DECORATION_COLOR
public static final int KEY_TEXT_DECORATION_COLORKey used to store color for text decoration. -
KEY_LINK
public static final int KEY_LINKKey used to store the URL for link elements. -
KEY_LINK_URL
Deprecated.since 17Alias for backward compatibility. -
KEY_DISPLAY_TAGS
public static final int KEY_DISPLAY_TAGSKey used to hide sentinel markers. -
KEY_DIRECT_WHITESPACE
public static final int KEY_DIRECT_WHITESPACEWhitespace specified directly on the node, not inherited. -
KEY_FILTERED_OUT
public static final int KEY_FILTERED_OUTKey set for filtered out nodes. -
KEY_TEXT_TRANSFORM
public static final int KEY_TEXT_TRANSFORMText transform -
KEY_SHOW_PLACEHOLDER
public static final int KEY_SHOW_PLACEHOLDERKey used to store the property 'show-placeholder' value. -
KEY_PLACEHOLDER_CONTENT
public static final int KEY_PLACEHOLDER_CONTENTKey used to store the property 'placeholder-content' value. -
KEY_FOLDED
public static final int KEY_FOLDEDKey used to store the property 'folded' value. -
KEY_TAGS_BACKGROUND_COLOR
public static final int KEY_TAGS_BACKGROUND_COLORKey used to store the property '-oxy-tags-background-color' value. -
KEY_TAGS_COLOR
public static final int KEY_TAGS_COLORKey used to store the property '-oxy-tags-color' value. -
KEY_BACKGROUND_IMAGE
public static final int KEY_BACKGROUND_IMAGEKey used to store the property 'background-image' value. -
KEY_OXY_FOREGROUND_IMAGE
public static final int KEY_OXY_FOREGROUND_IMAGEKey used to store the property '-oxy-foreground-image' value. -
KEY_OXY_VIDEO_COVER
public static final int KEY_OXY_VIDEO_COVERKey used to store the property '-oxy-video-cover' value. -
KEY_BACKGROUND_REPEAT
public static final int KEY_BACKGROUND_REPEATKey used to store the property 'background-repeat' value. -
KEY_BACKGROUND_POSITION
public static final int KEY_BACKGROUND_POSITIONKey used to store the property 'background-position' value. -
KEY_DIRECTION
public static final int KEY_DIRECTIONKey used to store the property 'direction' value. -
KEY_UNICODE_BIDI
public static final int KEY_UNICODE_BIDIKey used to store the property 'unicode-bidi' value. -
KEY_TEXT_DECORATION_STYLE
public static final int KEY_TEXT_DECORATION_STYLEKey used to store 'text-decoration' property. -
KEY_MIN_HEIGHT
public static final int KEY_MIN_HEIGHTMinimum height. Applies to blocks. It can be null. -
KEY_MAX_HEIGHT
public static final int KEY_MAX_HEIGHTMaximum height. Applies to blocks. It can be null. -
KEY_POSITION
public static final int KEY_POSITIONThe 'position' property. -
KEY_TOP
public static final int KEY_TOPThe 'top' property. -
KEY_BOTTOM
public static final int KEY_BOTTOMThe 'bottom' property. -
KEY_LEFT
public static final int KEY_LEFTThe 'left' property. -
KEY_RIGHT
public static final int KEY_RIGHTThe 'right' property. -
KEY_OUTLINE_COLOR
public static final int KEY_OUTLINE_COLOROutline color -
KEY_OUTLINE_STYLE
public static final int KEY_OUTLINE_STYLEOutline style -
KEY_OUTLINE_WIDTH
public static final int KEY_OUTLINE_WIDTHOutline width -
KEY_OXY_STYLE
public static final int KEY_OXY_STYLEThe -oxy-style property that defines additional styles. -
KEY_EMPTY_CELLS_BOOLEAN
public static final int KEY_EMPTY_CELLS_BOOLEANKey used to store the property 'empty-cells' value as boolean. -
KEY_OXY_LINK_ACTIVATION_TRIGGER
public static final int KEY_OXY_LINK_ACTIVATION_TRIGGERKey used to store the property '-oxy-link-activation-trigger' value. -
KEY_OXY_FLOATING_TOOLBAR
public static final int KEY_OXY_FLOATING_TOOLBARKey used to store the property -oxy-floating-toolbar. The value set for this property must be an array of instances of theStaticContent
interface. -
KEY_BORDER_TOP_LEFT_RADIUS
public static final int KEY_BORDER_TOP_LEFT_RADIUSborder-top-left-radius.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius"
-
KEY_BORDER_TOP_RIGHT_RADIUS
public static final int KEY_BORDER_TOP_RIGHT_RADIUSborder-top-right-radius.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius"
-
KEY_BORDER_BOTTOM_RIGHT_RADIUS
public static final int KEY_BORDER_BOTTOM_RIGHT_RADIUSborder-bottom-right-radius.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius"
-
KEY_BORDER_BOTTOM_LEFT_RADIUS
public static final int KEY_BORDER_BOTTOM_LEFT_RADIUSborder-bottom-left-radius.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius"
-
pmCounter
protected static int pmCounterAll the properties before this counter are for media screen. Now are following the properties for the paged media. -
KEY_LIST_STYLE_IMAGE
public static final int KEY_LIST_STYLE_IMAGEList style image -
KEY_PAGE
public static final int KEY_PAGEThe CSS page - for media print. -
KEY_OXY_PAGE_GROUP
public static final int KEY_OXY_PAGE_GROUPTheoxy-page-group
property. The presence of this property on an the element makes the Chemistry processor start a new page sequence that begins with that element, even if the element before it had the samepage
property. -
KEY_IMAGE_RESOLUTION
public static final int KEY_IMAGE_RESOLUTIONKey used to specify the image DPI. -
KEY_OXY_ALT_TEXT
public static final int KEY_OXY_ALT_TEXTKey used to specify the accessibility alternate text. -
KEY_OXY_PDF_TAG_TYPE
public static final int KEY_OXY_PDF_TAG_TYPEKey used to specify the accessibility PDF tag. -
KEY_OXY_PDF_META_AUTHOR
public static final int KEY_OXY_PDF_META_AUTHORKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_AUTHOR
-
KEY_OXY_PDF_META_TITLE
public static final int KEY_OXY_PDF_META_TITLEKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_TITLE
-
KEY_OXY_PDF_META_DESCRIPTION
public static final int KEY_OXY_PDF_META_DESCRIPTIONKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_DESCRIPTION
-
KEY_OXY_PDF_META_KEYWORDS
public static final int KEY_OXY_PDF_META_KEYWORDSKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_KEYWORDS
-
KEY_OXY_PDF_META_KEYWORD
public static final int KEY_OXY_PDF_META_KEYWORDKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_KEYWORD
-
KEY_OXY_PDF_META_COPYRIGHT
public static final int KEY_OXY_PDF_META_COPYRIGHTKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_COPYRIGHT
-
KEY_OXY_PDF_META_COPYRIGHTED
public static final int KEY_OXY_PDF_META_COPYRIGHTEDKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_COPYRIGHTED
-
KEY_OXY_PDF_META_COPYRIGHT_URL
public static final int KEY_OXY_PDF_META_COPYRIGHT_URLKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_COPYRIGHT_URL
-
KEY_OXY_PDF_META_CUSTOM
public static final int KEY_OXY_PDF_META_CUSTOMKey used for PDF metadata.- See Also:
-
CSSPropertiesOxygenExtension.OXY_PDF_META_CUSTOM
-
KEY_BACKGROUND_SIZE
public static final int KEY_BACKGROUND_SIZEKey used to store the property 'background-size' value. -
KEY_BREAK_BEFORE
public static final int KEY_BREAK_BEFOREProperty for CSS media paged, signal the break policy that applies -
KEY_BREAK_AFTER
public static final int KEY_BREAK_AFTERProperty for CSS media paged, signal the break policy that applies -
KEY_BREAK_INSIDE
public static final int KEY_BREAK_INSIDEProperty for CSS media paged, signal the break policy that applies -
KEY_PAGE_BREAK_AFTER
public static final int KEY_PAGE_BREAK_AFTERProperty for CSS media paged, signals the page break policy that applies. -
KEY_PAGE_BREAK_BEFORE
public static final int KEY_PAGE_BREAK_BEFOREProperty for CSS media paged, signals the page break policy that applies. -
KEY_PAGE_BREAK_INSIDE
public static final int KEY_PAGE_BREAK_INSIDEProperty for CSS media paged, signals the page break policy that applies. -
KEY_OXY_COLUMN_BREAK_AFTER
public static final int KEY_OXY_COLUMN_BREAK_AFTERProperty for CSS media paged, signals the column break policy that applies. -
KEY_OXY_COLUMN_BREAK_BEFORE
public static final int KEY_OXY_COLUMN_BREAK_BEFOREProperty for CSS media paged, signals the column break policy that applies. -
KEY_OXY_COLUMN_BREAK_INSIDE
public static final int KEY_OXY_COLUMN_BREAK_INSIDEProperty for CSS media paged, signals the column break policy that applies. -
KEY_OXY_BORDERS_CONDITIONALITY
public static final int KEY_OXY_BORDERS_CONDITIONALITYProperty for -oxy-borders-conditionality which allow borders on line breaks. -
KEY_OXY_SPACE_BEFORE_CONDITIONALITY
public static final int KEY_OXY_SPACE_BEFORE_CONDITIONALITYProperty for-oxy-space-before-conditionality which allow margin-top drop on elements. -
KEY_OXY_SPACE_AFTER_CONDITIONALITY
public static final int KEY_OXY_SPACE_AFTER_CONDITIONALITYProperty for -oxy-space-after-conditionality which allow margin-bottom drop on elements. -
KEY_OXY_CHANGEBAR_OFFSET
public static final int KEY_OXY_CHANGEBAR_OFFSETProperty for -oxy-changebar-offset, set the distance from the column edge. -
KEY_OXY_CHANGEBAR_STYLE
public static final int KEY_OXY_CHANGEBAR_STYLEProperty for -oxy-changebar-style, set how the change bar appears. -
KEY_OXY_CHANGEBAR_PLACEMENT
public static final int KEY_OXY_CHANGEBAR_PLACEMENTProperty for -oxy-changebar-placement, set the changebar position. -
KEY_OXY_CHANGEBAR_COLOR
public static final int KEY_OXY_CHANGEBAR_COLORProperty for -oxy-changebar-color, set the changebar color. -
KEY_OXY_CHANGEBAR_WIDTH
public static final int KEY_OXY_CHANGEBAR_WIDTHProperty for -oxy-changebar-width, set the changebar color. -
KEY_ORPHANS
public static final int KEY_ORPHANSProperty for CSS media paged "orphans". The minimum number of lines of a paragraph that must be left at the bottom of a page. Supports as values:| inherit, default is 2. -
KEY_WIDOWS
public static final int KEY_WIDOWSProperty for CSS media paged "widows". The minimum number of lines of a paragraph that must be left at the top of a page. Supports as values:| inherit, default is 2. -
KEY_STRING_SET
public static final int KEY_STRING_SETProperty for CSS media paged "string-set". The string-set property contains one or more pairs, each consisting of an custom identifier (the name of the named string) followed by a content-list describing how to construct the value of the named string. -
KEY_FLOAT
public static final int KEY_FLOATProperty for CSS media paged "float". Used specially for the footnotes. https://www.w3.org/TR/css-page-floats-3/#float-property -
KEY_TABLE_ROW_SPAN
public static final int KEY_TABLE_ROW_SPANCSS property taken into account to compute the row spanning of a table cell. Non-standard property. The default is 1. -
KEY_TABLE_COLUMN_SPAN
public static final int KEY_TABLE_COLUMN_SPANCSS property taken into account to compute the column spanning of a table cell. Non-standard property. The default is 1. -
KEY_CAPTION_SIDE
public static final int KEY_CAPTION_SIDEProperty for CSS caption-side property. Used specially for the tables. https://www.w3.org/TR/CSS2/tables.html#caption-side -
KEY_TABLE_LAYOUT
public static final int KEY_TABLE_LAYOUTThe 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. https://www.w3.org/TR/2011/REC-CSS2-20110607/tables.html#propdef-table-layout -
KEY_BORDER_COLLAPSE
public static final int KEY_BORDER_COLLAPSEThis property selects a table's border model. https://www.w3.org/TR/2011/REC-CSS2-20110607/tables.html#borders -
KEY_COLUMN_SPAN
public static final int KEY_COLUMN_SPANSpecify how an element can span over a multiple column layout. https://drafts.csswg.org/css-multicol-1/#column-span -
KEY_TRANSFORM_ROTATION
public static final int KEY_TRANSFORM_ROTATIONSpecify that the element can have a different rotation than the parent. Has the CSS angles, later will be converted to FO angles accepted by the FO attribute "reference-orientation".- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/transform"
- "https://www.w3.org/TR/xsl/#reference-orientation"
-
KEY_HYPHENS
public static final int KEY_HYPHENSThis property controls whether hyphenation is allowed to create more soft wrap opportunities within a line of text.- See Also:
-
- "https://drafts.csswg.org/css-text-3/#propdef-hyphens"
-
KEY_BOOKMARK_LEVEL
public static final int KEY_BOOKMARK_LEVELBookmark level. Used by the PDF converter.- See Also:
-
- "https://www.w3.org/TR/css-gcpm-3/#bookmark-level"
-
KEY_BOOKMARK_LABEL
public static final int KEY_BOOKMARK_LABELBookmark label. Used by the PDF converter.- See Also:
-
- "https://www.w3.org/TR/css-gcpm-3/#bookmark-label"
-
KEY_BOOKMARK_STATE
public static final int KEY_BOOKMARK_STATEBookmark state. Used by the PDF converter.- See Also:
-
- "https://www.w3.org/TR/css-gcpm-3/#bookmark-state"
-
KEY_LETTER_SPACING
public static final int KEY_LETTER_SPACING -
KEY_FONT_FAMILY
public static final int KEY_FONT_FAMILY -
KEY_FONT_SIZE
public static final int KEY_FONT_SIZE -
KEY_FONT_STYLE
public static final int KEY_FONT_STYLE -
KEY_FONT_VARIANT
public static final int KEY_FONT_VARIANTFont variant -
KEY_FONT_VARIANT_ALTERNATES
public static final int KEY_FONT_VARIANT_ALTERNATESFont variant alternates.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates"
-
KEY_FONT_VARIANT_LIGATURES
public static final int KEY_FONT_VARIANT_LIGATURESFont variant ligatures.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures"
-
KEY_FONT_VARIANT_NUMERIC
public static final int KEY_FONT_VARIANT_NUMERICFont variant numeric.- See Also:
-
- "https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric"
-
KEY_OVERFLOW_WRAP
public static final int KEY_OVERFLOW_WRAPOverflow wrap. -
KEY_OXY_HYPHENATION_CHARACTER
public static final int KEY_OXY_HYPHENATION_CHARACTERAn oxygen extension, mostly used to hide the hyphen characters. The classic hyphen can be replaced with a zero width space for instance.- See Also:
-
- "https://www.w3.org/TR/xsl11/#hyphenation-character"
-
KEY_OXY_HYPHENATION_PUSH_CHARACTER_COUNT
public static final int KEY_OXY_HYPHENATION_PUSH_CHARACTER_COUNTThe minimum number of characters in a hyphenated word after the hyphenation character. This is the minimum number of characters in the word pushed to the next line after the line ending with the hyphenation character. Inherited.- See Also:
-
- "https://www.w3.org/TR/xsl11/#hyphenation-push-character-count"
-
KEY_OXY_HYPHENATION_REMAIN_CHARACTER_COUNT
public static final int KEY_OXY_HYPHENATION_REMAIN_CHARACTER_COUNTThe hyphenation-remain-character-count specifies the minimum number of characters in a hyphenated word before the hyphenation character. This is the minimum number of characters in the word left on the line ending with the hyphenation character.- See Also:
-
- "https://www.w3.org/TR/xsl11/#hyphenation-remain-character-count"
-
KEY_ALIGNMENT_BASELINE
public static final int KEY_ALIGNMENT_BASELINEProperty for CSS media paged, the alignment relative to the baseline. -
KEY_OXY_CAPTION_REPEAT_ON_NEXT_PAGES
public static final int KEY_OXY_CAPTION_REPEAT_ON_NEXT_PAGESProperty enabling the table caption repetition on next pages (When the table is long and it spans multiple pages). -
KEY_OXY_SHOW_ONLY_WHEN_CAPTION_REPEATED_ON_NEXT_PAGES
public static final int KEY_OXY_SHOW_ONLY_WHEN_CAPTION_REPEATED_ON_NEXT_PAGESProperty that marks a pseudo :before or :after that is associated to a table caption. It signals that the static content to be used only when the caption is displayed the second time, on the next page (When the table is long and it spans multiple pages). -
KEY_OXY_AVOID_BREAKING_LINE_AT_HYPHENS
public static final int KEY_OXY_AVOID_BREAKING_LINE_AT_HYPHENSControls the line breaking status for hyphens. Deprecated,KEY_OXY_BREAK_LINE_AT_HYPHENS
should be used instead. -
KEY_OXY_BREAK_LINE_AT_HYPHENS
public static final int KEY_OXY_BREAK_LINE_AT_HYPHENSControls the line breaking status for hyphens. -
KEY_OXY_PDF_VIEWER_ZOOM
public static final int KEY_OXY_PDF_VIEWER_ZOOMThe zoom factor applied to the viewport when the PDF document is loaded. Should be a percent. -
KEY_OXY_PDF_VIEWER_HIDE_TOOLBAR
public static final int KEY_OXY_PDF_VIEWER_HIDE_TOOLBARIf the viewer toolbarshould be visible or not. -
KEY_OXY_PDF_VIEWER_HIDE_MENUBAR
public static final int KEY_OXY_PDF_VIEWER_HIDE_MENUBARIf the viewer menubar should be visible or not. -
KEY_OXY_PDF_VIEWER_FIT_WINDOW
public static final int KEY_OXY_PDF_VIEWER_FIT_WINDOWA flag specifying whether to resize the document�s window to fit the size of the first displayed page. Default value: false. -
KEY_OXY_PDF_VIEWER_DISPLAY_FILENAME
public static final int KEY_OXY_PDF_VIEWER_DISPLAY_FILENAMEA flag specifying if the doc title should be displayed. -
KEY_OXY_PDF_TABLE_OMIT_HEADER_BREAK
public static final int KEY_OXY_PDF_TABLE_OMIT_HEADER_BREAKA flag specifying if the header of a table should be omitted at break. -
KEY_OXY_PDF_TABLE_OMIT_FOOTER_BREAK
public static final int KEY_OXY_PDF_TABLE_OMIT_FOOTER_BREAKA flag specifying if the footer of a table should be omitted at break. -
KEY_OXY_PDF_VIEWER_PAGE_MODE
public static final int KEY_OXY_PDF_VIEWER_PAGE_MODEA name object specifying how the document shall be displayed when opened: none Neither document outline nor thumbnail images visible use-outlines Document outline visible use-thumbs Thumbnail images visible full-screen Full-screen mode, with no menu bar, window controls, or any other window visible -
KEY_OXY_PDF_VIEWER_PAGE_LAYOUT
public static final int KEY_OXY_PDF_VIEWER_PAGE_LAYOUTA name object specifying the page layout shall be used when the document is opened: single-page Display one page at a time one-column Display the pages in one column two-column-left Display the pages in two columns, with odd- numbered pages on the left two-column-right Display the pages in two columns, with odd- numbered pages on the right -
stylesArray
The styles map
-
-
Constructor Details
-
Styles
public Styles()Constructor. -
Styles
public Styles(boolean enablePagedMediaProperties) Constructor.- Parameters:
enablePagedMediaProperties
-true
if the styles object is built for the PDF converter, and all the known paged media features must be taken into account.
-
-
Method Details
-
isEnablePagedMediaProperties
public boolean isEnablePagedMediaProperties()- Returns:
- Returns true if the entire set of CSS properties, including the ones defined for paged media are supported.
-
getPropertyName
- Parameters:
index
- The index of the property.- Returns:
- The property name.
-
getPropertyByName
Retrieve the property by its name.- Parameters:
name
- The property name.- Returns:
- The property.
-
getBackgroundColor
- Returns:
- the value of the
background-color
property. Returnsnull
if the background color is transparent.
-
getBackgroundImage
This property sets the background image of an element. When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image).- Returns:
- the value of the
background-image
property. Returnsnull
if the background image is not defined.
-
getBackgroundRepeat
If a background image is specified, this property specifies whether the image is repeated (tiled), and how. All tiling covers the content, padding and border areas of a box.- Returns:
- One of CSS.
-
getBackgroundPosition
public ro.sync.ecss.css.BackgroundPosition getBackgroundPosition()If a background position is specified, this property indicates the position of the background image relative to its box.- Returns:
- A position, or
null
.
-
getTagsBackgroundColor
Obtain the color for full-tags background.- Returns:
- the value of the
-oxy-tags-background-color
property. Returnsnull
if no background color was defined in css.
-
getTagsColor
Obtain the color for full-tags background.- Returns:
- the value of the
-oxy-tags-background-color
property. Returnsnull
if no background color was defined in css.
-
hasBorder
public boolean hasBorder()- Returns:
true
if the styles define a visible border.
-
getBorderBottomColor
- Returns:
- the value of the
borderBottomColor
property.
-
getBorderBottomStyle
- Returns:
- the value of the
borderBottomStyle
property.
-
getBorderLeftColor
- Returns:
- the value of the
borderLeftColor
property.
-
getBorderLeftStyle
- Returns:
- the value of the
borderLeftStyle
property.
-
getBorderRightColor
- Returns:
- the value of the
borderRightColor
property.
-
getBorderRightStyle
- Returns:
- the value of the
borderRightStyle
property.
-
getBorderTopColor
- Returns:
- the value of the
borderTopColor
property.
-
getBorderTopStyle
- Returns:
- the value of the
borderTopStyle
property.
-
getOutlineColor
- Returns:
- the value of the
outline-color
property. If is not set returns the
-
getOutlineStyle
- Returns:
- the value of the
outline-style
property.
-
getOutlineWidth
public int getOutlineWidth()- Returns:
- the value of
outline-width
property.
-
getColor
- Returns:
- the value of the
color
property.
-
getMixedContent
- Returns:
- a
List
ofContentPart
objects representing thecontent
property.
-
getDisplay
First it looks at the KEY_IMPOSED_DISPLAY property. If it is not set it looks at the KEY_DISPLAY property.- Returns:
- the value of the
display
property or CSS.INLINE if nothing is specified.
-
getPosition
Checks the 'position' property.- Returns:
- one of
CSSValues.STATIC
,CSSValues.RELATIVE
,CSSValues.FIXED
orCSSValues.ABSOLUTE
.
-
isMorphDisplay
public boolean isMorphDisplay()Check if the display has 'morph' or '-oxy-morph' value.- Returns:
true
for morph display.
-
isChangebarDisplay
public boolean isChangebarDisplay()Check if the display has '-oxy-change-bar-start' or '-oxy-change-bar-end' value.- Returns:
true
if is a change bar.
-
isInvisible
public boolean isInvisible()- Returns:
true
if the associated element is invisible.
-
isListItem
public boolean isListItem()- Returns:
true
if the associated element is a list item.
-
getFont
- Returns:
- the value of the
font
property. Never null.
-
getFontWeight
public int getFontWeight()- Returns:
- the value of the
fontWeight
property.
-
getFontVariant
Gets the font-variant.- Returns:
- the value of the
font-variant
property. One of 'normal' or 'small-caps'. Nevernull
.
-
getLineHeight
Sets the distance between lines: normal number length %- Parameters:
fm
- Font metrics for this style's font- Returns:
- the value of the
lineHeight
property.
-
getListStyleType
- Returns:
- the value of the
listStyleType
property.
-
getListStylePosition
- Returns:
- the value of the
listStylePosition
property.
-
getTextAlign
Aligns the text in an element: left right center justify.- Returns:
- the value of the
textAlign
property.
-
isSpecifiedTextAlign
public boolean isSpecifiedTextAlign()Checks if the text-align property from the current element styles has a value specified by the CSS. The text-align value could be inherited.- Returns:
- true if the text align was specified for the current element or one of its parents.
-
getTextIndent
Gets the horizontal space that should be left before the beginning of the first line of the text content of an element.- Returns:
- the value of the
text-indent
property, or null if none.
-
isInline
public boolean isInline()Gets the imposed display - it may be the same as the one specified in the CSS - and checks if it is inline or inline block.- Returns:
- true if this element has the display property set to CSS.INLINE and thus it must be rendered as an inline box. Note that if this method returns false it doesn't necessarily mean that the element must be rendered as a block. The isInvisible() should be taken into account as well. See LayoutUtils.isInvisible()
-
isTableRowGroup
public boolean isTableRowGroup()- Returns:
- true if this element is table-formatted, or false otherwise.
-
isTableRow
public boolean isTableRow()- Returns:
- true if this element is table-formatted, or false otherwise.
-
getBorderBottomWidth
public int getBorderBottomWidth()- Returns:
- the value of border-bottom-width
-
getBorderLeftWidth
public int getBorderLeftWidth()- Returns:
- the value of border-left-width
-
getBorderRightWidth
public int getBorderRightWidth()- Returns:
- the value of border-right-width
-
getBorderTopWidth
public int getBorderTopWidth()- Returns:
- the value of border-top-width
-
getMarginBottom
- Returns:
- the value of margin-bottom
-
getBorderBottomLeftRadius
- Returns:
- the value of border bottom left radius
-
getBorderBottomRightRadius
- Returns:
- the value of border bottom right radius
-
getBorderTopLeftRadius
- Returns:
- the value of border top left radius
-
getBorderTopRightRadius
- Returns:
- the value of border top right radius
-
getMarginLeft
- Returns:
- the value of margin-left
-
getMarginRight
- Returns:
- the value of margin-right
-
getMarginTop
- Returns:
- the value of margin-top
-
getPaddingBottom
- Returns:
- the value of padding-bottom
-
getDirection
The direction CSS property should be set to match the direction of the text:rtl
for Hebrew or Arabic text andltr
for other scripts.The property sets the base text direction of block-level elements and the direction of embeddings created by the unicode-bidi property. It also sets the default alignment of text and block-level elements and the direction that cells flow within a table row. Unlike the dir attribute in HTML, the direction property is not inherited from table columns into table cells, since CSS inheritance follows the document tree, and table cells are inside of the rows but not inside of the columns.
This is inheritable. The initial value is
CSSValues.LTR
.- Returns:
- The direction, one of
CSSValues.LTR
orCSSValues.RTL
.
-
getUnicodeBIDI
The unicode-bidi CSS property together with the direction property relates to the handling of bidirectional text in a document. For example, if a block of text contains both left-to-right and right-to-left text then the user-agent uses a complex Unicode algorithm to decide how to display the text. This property overrides this algorithm and allows the developer to control the text embedding.This is not inheritable. The initial value is
CSSValues.NORMAL
.- Returns:
- one of
CSSValues.EMBED
,CSSValues.BIDI_OVERRIDE
orCSSValues.NORMAL
.
-
getPaddingLeft
- Returns:
- the value of padding-left
-
getPaddingRight
- Returns:
- the value of padding-right
-
getPaddingTop
- Returns:
- the value of padding-top
-
isTable
public boolean isTable()Checks if the display mode indicated to be a table.- Returns:
- True if it is.
-
isTableCell
public boolean isTableCell()Checks if the display mode indicated to be a table cell.- Returns:
- True if it is.
-
getWhitespace
- Returns:
- The whitespace value.
-
getDirectWhitespace
- Returns:
- The whitespace value, specified directly on the node by the CSS rules, not inherited.
-
isTableHeaderGroup
public boolean isTableHeaderGroup()Checks if the display mode indicated to be a table group header.- Returns:
- True if it is.
-
isTableColumn
public boolean isTableColumn()Checks if the display mode indicated to be a table column.- Returns:
- True if it is.
-
isTableColumnGroup
public boolean isTableColumnGroup()Checks if the display mode indicated to be a table group of columns.- Returns:
- True if it is.
-
getWidth
- Returns:
- The specified width, as a relative length, or null if not specified by the CSS.
-
getHeight
- Returns:
- The specified height, as a relative length, or null if not specified by the CSS.
-
getMinWidth
- Returns:
- The minimum width, or null if not specified.
-
getMaxWidth
- Returns:
- The maximum width, or null if not specified.
-
isEditable
public boolean isEditable()- Returns:
- true if the view is editable
-
getHorizontalBorderSpacing
public int getHorizontalBorderSpacing()- Returns:
- The horizontal border spacing between table cells.
-
getVerticalBorderSpacing
public int getVerticalBorderSpacing()- Returns:
- The vertical border spacing between table cells.
-
setProperty
Set a property to the map.- Parameters:
property
- The key of the property to be set. It can be one of the keys defined in this class.value
- The value of the property. Accepted values depend on the property and can have as typeString
,Color
,RelativeLength
,CSSCounter
,CSSCounterIncrement
or a subclass ofStaticContent
. The actual values are the Java representations of the ones accepted in the CSS specification. Read more about the CSS support in the Developer Guide.
-
setProperty
Set a property to the map.- Parameters:
property
- The key of the property to be set. It can be one of the keys defined in this class.value
- The value of the property. Accepted values depend on the property and can have as typeString
,Color
,RelativeLength
,CSSCounter
,CSSCounterIncrement
or a subclass ofStaticContent
The actual values are the Java representations of the ones accepted in the CSS specification. Read more about the CSS support in the Developer Guide.lu
- The CSS lexical unit that was evaluated to the value of the property. Normally, this is ignored, but may be useful to subclasses (for instance in the CSS to FO processor).
-
getProperty
- Parameters:
property
- The property name.- Returns:
- The value of the property.
-
isInheritable
public static boolean isInheritable(int property) Check if the given property should be copied from parent to child. A property can be copied if is marked as being inheritable.- Parameters:
property
- The index of the CSS property. One of the KEY_ constants. UsegetRecognizedPropertiesNumber()
to get the limit.- Returns:
true
if the given property can be copied.
-
isInheritable
Check if the given property can be inherited from parent to child. IMPORTANT: This method will check only the expanded properties, not the shorthand ones. For instance it will returntrue
for "border" or "border-right" (is a shorthand, does not know about it), butfalse
for "border-right-color".- Parameters:
property
- The name of the CSS property. Must not be a shorthand!- Returns:
true
if the given property is inherited.
-
getVisibility
- Returns:
- The value of the 'visibility'
-
getShowPlaceholders
- Returns:
- The value of the 'show-placeholder' property.
-
getPlaceholderContent
- Returns:
- The value of the 'placeholder-content' property.
-
getShowEmptyCells
public boolean getShowEmptyCells()- Returns:
- Return true if table empty cells are shown. See http://www.w3.org/TR/CSS21/tables.html#empty-cells.
-
isFoldable
public boolean isFoldable()- Returns:
- true if this element is foldable
-
isFolded
public boolean isFolded()- Returns:
true
if this element is folded
-
getNonFoldableChildName
- Returns:
- The name of the child which is non foldable
-
isTableCaption
public boolean isTableCaption()Checks if the display mode indicated to be a table caption.- Returns:
- True if it is.
-
isInlineInCSS
public boolean isInlineInCSS()- Returns:
true
if element is specified as INLINE in CSS source.
-
isInlineBlockInCSS
public boolean isInlineBlockInCSS()- Returns:
true
if element is specified as INLINE_BLOCK in CSS source.
-
getVerticalAlign
- Returns:
- The vertical align.
-
getTextDecoration
Deprecated.This was used to return only the text-decoration-line part from the text-decoration shorthand, as defined here https://drafts.csswg.org/css-text-decor-3/#text-decoration-property.- Returns:
- The values defining the decoration line from the 'text-decoration' property.
-
getTextDecorationLine
- Returns:
- The value of 'text-decoration' property.
-
getTextDecorationStyle
- Returns:
- The value of 'text-decoration-style' property.
-
getTextDecorationColor
- Returns:
- The color to be used for paint text decoration.
-
getCounters
- Returns:
- The counters declared on this element or empty array if none.
-
getCountersIncrement
- Returns:
- The 'counters increment' declared on this element or empty array if none.
-
isInTable
public boolean isInTable()Check if is a style from a table but not a cell.- Returns:
true
if the current style is a one of CSS.TABLE, CSS.INLINE_TABLE, CSS.TABLE_ROW, CSS.TABLE_ROW_GROUP, CSS.TABLE_FOOTER_GROUP, CSS.TABLE_HEADER_GROUP
-
getLinkURL
- Returns:
- The value of the 'link' property. Null if property was absent.
-
getHyperlinkActivationType
- Returns:
- The hyperlink activation behavior: auto, click, modifier-click(ctrl+click), inherit.
-
getDisplayTags
- Returns:
- Returns the value of the property 'display-tags'.
The possible values are:
- CSS.DEFAULT - display tag markers depending on the current display mode;
- CSS.NONE - tag markers will not be shown.
-
getTextTransform
- Returns:
- Returns the value of the property 'text-transform'.
The possible values are:
- CSS.CAPITALIZE
- CSS.UPPERCASE
- CSS.LOWERCASE
-
isFilteredOut
public boolean isFilteredOut()- Returns:
- true if a node should be represented with faded colors.
-
equals
-
hashCode
public int hashCode() -
clone
Shallow clone. -
canBeCached
public boolean canBeCached()Verify if styles can be cached. Can be cached if properties values does not depends by attributes or document structure.- Returns:
- True if styles can be cached.
-
setCanBeCached
public void setCanBeCached(boolean canBeCached) Sets if those styles can be shared between two or more nodes.- Parameters:
canBeCached
- True when be shared between two or more nodes.
-
toString
-
getMinHeight
Gets the value associated with the min-height property- Returns:
- The relative length (to the viewport width) of the minimum height.
-
getLeft
- Returns:
- The left position offset. May be
null
.
-
getRight
- Returns:
- The right position offset. May be
null
.
-
getTop
- Returns:
- The top position offset. May be
null
.
-
getBottom
- Returns:
- The bottom position offset. May be
null
.
-
setPseudoLevel
public void setPseudoLevel(int pseudoLevel) If this is the style for a pseudo element, keep here its level. For a :before(2), 2 is the pseudo level.- Parameters:
pseudoLevel
- The level of the pseudo element, if the style is associated to one.
-
getPseudoLevel
public int getPseudoLevel()If this is the style for a pseudo element, get its level. For a :before(2), 2 is the pseudo level. For :before, the level is 1.- Returns:
- Returns the pseudo level, zero if it is not the style of a pseudo element, 1 if is the "normal" pseudo element.
-
getRecognizedPropertiesNumber
public int getRecognizedPropertiesNumber()Use this to get the number of recognized properties. You can iterate over the properties up to this number. If theisEnablePagedMediaProperties()
istrue
, there are many more properties recognized.- Returns:
- The total number of recognized properties.
-
getLexicalUnit
public org.w3c.css.sac.LexicalUnit getLexicalUnit(int key) Gets a lexical unit. In this implementation, it returnsnull
.- Parameters:
key
- The property key.- Returns:
- The CSS lexical unit that generated the value for that property. Can be
null
.
-
getTableRowSpan
public int getTableRowSpan()Gets the 'table-row-span' property value. Used from the XML+CSS converter only. Not used by the Author layout engine.- Returns:
- An integer, or the default value 1 if the property was not set.
-
getTableColumnSpan
public int getTableColumnSpan()Gets the 'table-column-span' property value. Used from the XML+CSS converter only. Not used by the Author layout engine.- Returns:
- An integer, or the default value 1 if the property was not set.
-
getStringSet
The string-set property contains one or more pairs, each consisting of an custom identifier (the name of the named string) followed by a content-list describing how to construct the value of the named string. Used from the XML+CSS converter only. Not used by the Author layout engine.- Returns:
- a map from a string name to an array of static content. Never
null
.
-
getAlignmentBaseline
- Returns:
- The alignment baseline. Never
null
. Default is 'baseline'.
-
getBordersConditionality
- Returns:
- the value of for the '-oxy-borders-conditionality' property, or 'discard' if nothing was set.
-
getSpaceBeforeConditionality
- Returns:
- the value of for the '-oxy-space-before-conditionality' property, or 'discard' if nothing was set.
-
getSpaceAfterConditionality
- Returns:
- the value of for the '-oxy-space-after-conditionality' property, or 'discard' if nothing was set.
-
dependsOnTargetCounter
public boolean dependsOnTargetCounter()Checks if the style defines some static content using the target-counter or target-counters CSS function.- Returns:
true
if target-counter or target-counters are used.
-
affectsCounters
public boolean affectsCounters()Checks if the styles increment or reset some of the counters.- Returns:
- true if the styles are affecting the counters state.
-
setCustomProperty
public void setCustomProperty(Map<String, ro.sync.ecss.css.functions.customprop.CustomPropertyValue> props) Sets the list of custom CSS properties and their values.- Parameters:
props
- Custom CSS properties
-
getCustomCssProperties
public Map<String,ro.sync.ecss.css.functions.customprop.CustomPropertyValue> getCustomCssProperties()- Returns:
- Returns the customCssProperties.
-