|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.sync.ecss.css.Styles
public class Styles
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 | |
---|---|
static int |
counter
Constants counter |
static float |
EX_FACTOR
This is the factor: ex-height / em-height The ex unit is defined by the font's x-height. |
static int |
KEY_BACKGROUND_COLOR
Background color. |
static int |
KEY_BORDER_BOTTOM_COLOR
Border bottom color |
static int |
KEY_BORDER_BOTTOM_STYLE
Border bottom style |
static int |
KEY_BORDER_BOTTOM_WIDTH
Border bottom width |
static int |
KEY_BORDER_LEFT_COLOR
Border left color |
static int |
KEY_BORDER_LEFT_STYLE
Border right style |
static int |
KEY_BORDER_LEFT_WIDTH
Border left width |
static int |
KEY_BORDER_RIGHT_COLOR
Border right color |
static int |
KEY_BORDER_RIGHT_STYLE
Border right style |
static int |
KEY_BORDER_RIGHT_WIDTH
Border right width |
static int |
KEY_BORDER_SPACING
Key for the border spacing array |
static int |
KEY_BORDER_TOP_COLOR
Border top color |
static int |
KEY_BORDER_TOP_STYLE
Border top style |
static int |
KEY_BORDER_TOP_WIDTH
Border top width |
static int |
KEY_COUNTER_INCREMENT
The key for counter-increment . |
static int |
KEY_COUNTER_RESET
The key for counter-reset . |
static int |
KEY_DIRECT_WHITESPACE
Whitespace specified directly on the node |
static int |
KEY_DISPLAY
Display type |
static int |
KEY_DISPLAY_TAGS
Key used to hide sentinel markers. |
static int |
KEY_EDITABLE
True if this view is editable |
static int |
KEY_EMPTY_CELLS
Key used to store the property 'empty-cells' value. |
static int |
KEY_FILTERED_OUT
Key set for filtered out nodes. |
static int |
KEY_FOLDABLE
Key used to store the property 'foldable' value. |
static int |
KEY_FONT
Used font |
static int |
KEY_FONT_WEIGHT
Font weight |
static int |
KEY_FOREGROUND_COLOR
Foreground |
static int |
KEY_HEIGHT
Height. |
static int |
KEY_IMPOSED_DISPLAY
Key used to override the display property defined in the css. |
static int |
KEY_LINE_HEIGHT_MULTIPLIER
Line height multiplier |
static int |
KEY_LINK_URL
Key used to store the URL for link elements. |
static int |
KEY_LIST_STYLE_TYPE
List style type |
static int |
KEY_MARGIN_BOTTOM
Margin dimensions |
static int |
KEY_MARGIN_LEFT
Margin left |
static int |
KEY_MARGIN_RIGHT
Margin right |
static int |
KEY_MARGIN_TOP
Margin top |
static int |
KEY_MAX_WIDTH
Maximum width. |
static int |
KEY_MIN_WIDTH
Minimum width. |
static int |
KEY_MIXED_CONTENT
Generated mixed Content |
static int |
KEY_NON_FOLDABLE_CHILD_NAME
Key used to store the property 'non foldable child name' value. |
static int |
KEY_PADDING_BOTTOM
Padding dimensions |
static int |
KEY_PADDING_LEFT
Pad left |
static int |
KEY_PADDING_RIGHT
Pad right |
static int |
KEY_PADDING_TOP
Pad top |
static int |
KEY_PLACEHOLDER_CONTENT
Key used to store the property 'placeholder-content' value. |
static int |
KEY_SHOW_PLACEHOLDER
Key used to store the property 'show-placeholder' value. |
static int |
KEY_TEXT_ALIGN
Text align |
static int |
KEY_TEXT_DECORATION
Key used to store 'text-decoration' property. |
static int |
KEY_TEXT_DECORATION_COLOR
Key used to store color for text decoration. |
static int |
KEY_TEXT_TRANSFORM
Text transform |
static int |
KEY_VERTICAL_ALIGN
Key for vertical align. |
static int |
KEY_VISIBITY
Key for the 'visibility' property. |
static int |
KEY_WHITESPACE
Whitespace |
static int |
KEY_WIDTH
Width. |
Constructor Summary | |
---|---|
Styles()
|
Method Summary | |
---|---|
boolean |
canBeCached()
Verify if styles can be cached. |
java.lang.Object |
clone()
Shallow clone. |
boolean |
equals(java.lang.Object obj)
|
Color |
getBackgroundColor()
|
Color |
getBorderBottomColor()
|
java.lang.String |
getBorderBottomStyle()
|
int |
getBorderBottomWidth()
|
Color |
getBorderLeftColor()
|
java.lang.String |
getBorderLeftStyle()
|
int |
getBorderLeftWidth()
|
Color |
getBorderRightColor()
|
java.lang.String |
getBorderRightStyle()
|
int |
getBorderRightWidth()
|
Color |
getBorderTopColor()
|
java.lang.String |
getBorderTopStyle()
|
int |
getBorderTopWidth()
|
Color |
getColor()
|
CSSCounter[] |
getCounters()
|
CSSCounterIncrement[] |
getCountersIncrement()
|
java.lang.String |
getDirectWhitespace()
|
java.lang.String |
getDisplay()
First it looks at the KEY_IMPOSED_DISPLAY property. |
java.lang.String |
getDisplayTags()
|
Font |
getFont()
|
int |
getFontWeight()
|
RelativeLength |
getHeight()
|
int |
getHorizontalBorderSpacing()
|
int |
getLineHeight(FontMetrics fm)
Sets the distance between lines: normal number length % |
java.lang.String |
getLinkURL()
|
java.lang.String |
getListStyleType()
|
RelativeLength |
getMarginBottom()
|
RelativeLength |
getMarginLeft()
|
RelativeLength |
getMarginRight()
|
RelativeLength |
getMarginTop()
|
RelativeLength |
getMaxWidth()
|
RelativeLength |
getMinWidth()
|
StaticContent[] |
getMixedContent()
|
java.lang.String[] |
getNonFoldableChildName()
|
RelativeLength |
getPaddingBottom()
|
RelativeLength |
getPaddingLeft()
|
RelativeLength |
getPaddingRight()
|
RelativeLength |
getPaddingTop()
|
java.lang.String |
getPlaceholderContent()
|
java.lang.Object |
getProperty(int property)
|
boolean |
getShowEmptyCells()
|
java.lang.String |
getShowPlaceholders()
|
java.lang.String |
getTextAlign()
Aligns the text in an element: left right center justify. |
java.lang.String[] |
getTextDecoration()
|
Color |
getTextDecorationColor()
|
java.lang.String |
getTextTransform()
|
java.lang.String |
getVerticalAlign()
|
int |
getVerticalBorderSpacing()
|
java.lang.String |
getVisibility()
|
java.lang.String |
getWhitespace()
|
RelativeLength |
getWidth()
|
int |
hashCode()
|
boolean |
isEditable()
|
boolean |
isFilteredOut()
|
boolean |
isFoldable()
|
boolean |
isInline()
|
boolean |
isInlineInCSS()
|
boolean |
isInTable()
Check if is a style from a table but not a cell. |
boolean |
isInvisible()
|
boolean |
isListItem()
|
boolean |
isTable()
Checks if the display mode indicated to be a table. |
boolean |
isTableCaption()
Checks if the display mode indicated to be a table caption. |
boolean |
isTableColumn()
Checks if the display mode indicated to be a table column. |
boolean |
isTableColumnGroup()
Checks if the display mode indicated to be a table group of columns. |
boolean |
isTableFooterGroup()
Checks if the display mode indicated to be a table group footer. |
boolean |
isTableHeaderGroup()
Checks if the display mode indicated to be a table group header. |
boolean |
isTableRow()
|
boolean |
isTableRowGroup()
|
void |
setCanBeCached(boolean canBeCached)
Sets if those styles can be shared between two or more nodes. |
void |
setProperty(int property,
java.lang.Object value)
Set a property to the map. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float EX_FACTOR
public static int counter
public static final int KEY_BACKGROUND_COLOR
public static final int KEY_BORDER_BOTTOM_COLOR
public static final int KEY_BORDER_BOTTOM_STYLE
public static final int KEY_BORDER_BOTTOM_WIDTH
public static final int KEY_BORDER_LEFT_COLOR
public static final int KEY_BORDER_LEFT_STYLE
public static final int KEY_BORDER_LEFT_WIDTH
public static final int KEY_BORDER_RIGHT_COLOR
public static final int KEY_BORDER_RIGHT_STYLE
public static final int KEY_BORDER_RIGHT_WIDTH
public static final int KEY_BORDER_TOP_COLOR
public static final int KEY_BORDER_TOP_STYLE
public static final int KEY_BORDER_TOP_WIDTH
public static final int KEY_FOREGROUND_COLOR
public static final int KEY_MIXED_CONTENT
public static final int KEY_DISPLAY
public static final int KEY_FONT
public static final int KEY_FONT_WEIGHT
public static final int KEY_LINE_HEIGHT_MULTIPLIER
public static final int KEY_LIST_STYLE_TYPE
public static final int KEY_MARGIN_BOTTOM
public static final int KEY_MARGIN_LEFT
public static final int KEY_MARGIN_RIGHT
public static final int KEY_MARGIN_TOP
public static final int KEY_PADDING_BOTTOM
public static final int KEY_PADDING_LEFT
public static final int KEY_PADDING_RIGHT
public static final int KEY_PADDING_TOP
public static final int KEY_WIDTH
public static final int KEY_HEIGHT
public static final int KEY_MIN_WIDTH
public static final int KEY_MAX_WIDTH
public static final int KEY_TEXT_ALIGN
public static final int KEY_WHITESPACE
public static final int KEY_EDITABLE
public static final int KEY_BORDER_SPACING
public static final int KEY_VISIBITY
public static final int KEY_EMPTY_CELLS
public static final int KEY_FOLDABLE
public static final int KEY_NON_FOLDABLE_CHILD_NAME
public static final int KEY_VERTICAL_ALIGN
public static final int KEY_COUNTER_RESET
public static final int KEY_COUNTER_INCREMENT
public static final int KEY_IMPOSED_DISPLAY
public static final int KEY_TEXT_DECORATION
public static final int KEY_TEXT_DECORATION_COLOR
public static final int KEY_LINK_URL
public static final int KEY_DISPLAY_TAGS
public static final int KEY_DIRECT_WHITESPACE
public static final int KEY_FILTERED_OUT
public static final int KEY_TEXT_TRANSFORM
public static final int KEY_SHOW_PLACEHOLDER
public static final int KEY_PLACEHOLDER_CONTENT
Constructor Detail |
---|
public Styles()
Method Detail |
---|
public Color getBackgroundColor()
backgroundColor
property.
Returns null if the background color is transparent.public Color getBorderBottomColor()
borderBottomColor
property.public java.lang.String getBorderBottomStyle()
borderBottomStyle
property.public Color getBorderLeftColor()
borderLeftColor
property.public java.lang.String getBorderLeftStyle()
borderLeftStyle
property.public Color getBorderRightColor()
borderRightColor
property.public java.lang.String getBorderRightStyle()
borderRightStyle
property.public Color getBorderTopColor()
borderTopColor
property.public java.lang.String getBorderTopStyle()
borderTopStyle
property.public Color getColor()
color
property.public StaticContent[] getMixedContent()
List
of ContentPart
objects
representing the content
property.public java.lang.String getDisplay()
display
property or CSS.INLINE if nothing is
specified.public boolean isInvisible()
true
if the associated element is invisible.public boolean isListItem()
true
if the associated element is a list item.public Font getFont()
font
property. Never null.public int getFontWeight()
fontWeight
property.public int getLineHeight(FontMetrics fm)
fm
- Font metrics for this style's font
lineHeight
property.public java.lang.String getListStyleType()
listStyleType
property.public java.lang.String getTextAlign()
textAlign
property.public boolean isInline()
public boolean isTableRowGroup()
public boolean isTableRow()
public int getBorderBottomWidth()
public int getBorderLeftWidth()
public int getBorderRightWidth()
public int getBorderTopWidth()
public RelativeLength getMarginBottom()
public RelativeLength getMarginLeft()
public RelativeLength getMarginRight()
public RelativeLength getMarginTop()
public RelativeLength getPaddingBottom()
public RelativeLength getPaddingLeft()
public RelativeLength getPaddingRight()
public RelativeLength getPaddingTop()
public boolean isTable()
public java.lang.String getWhitespace()
public java.lang.String getDirectWhitespace()
public boolean isTableHeaderGroup()
public boolean isTableFooterGroup()
public boolean isTableColumn()
public boolean isTableColumnGroup()
public RelativeLength getWidth()
public RelativeLength getHeight()
public RelativeLength getMinWidth()
public RelativeLength getMaxWidth()
public boolean isEditable()
public int getHorizontalBorderSpacing()
public int getVerticalBorderSpacing()
public void setProperty(int property, java.lang.Object value)
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 type String
,
Color
, CSSCounter
or CSSCounterIncrement
.
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.public java.lang.Object getProperty(int property)
property
- The property name.
public java.lang.String getVisibility()
public java.lang.String getShowPlaceholders()
public java.lang.String getPlaceholderContent()
public boolean getShowEmptyCells()
public boolean isFoldable()
public java.lang.String[] getNonFoldableChildName()
public boolean isTableCaption()
public boolean isInlineInCSS()
true
if element is specified as INLINE in CSS source.public java.lang.String getVerticalAlign()
public java.lang.String[] getTextDecoration()
public Color getTextDecorationColor()
public CSSCounter[] getCounters()
public CSSCounterIncrement[] getCountersIncrement()
public boolean isInTable()
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_GROUPpublic java.lang.String getLinkURL()
public java.lang.String getDisplayTags()
public java.lang.String getTextTransform()
public boolean isFilteredOut()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean canBeCached()
public void setCanBeCached(boolean canBeCached)
canBeCached
- True when be shared between two or more nodes.
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |