All Packages Class Hierarchy This Package Previous Next Index
Class org.w3c.css.properties.CssFontStyle
java.lang.Object
|
+----org.w3c.css.properties.CssProperty
|
+----org.w3c.css.properties.CssFontStyle
- public class CssFontStyle
- extends CssProperty
- implements CssFontConstant
'font-style'
Value: normal | italic | oblique
Initial: normal
Applies to: all elements
Inherited: yes
Percentage values: N/A
The 'font-style' property selects between normal (sometimes referred to
as "roman" or "upright"), italic and oblique faces within a font family.
A value of 'normal' selects a font that is classified as 'normal' in
the UA's font database, while 'oblique' selects a font that is labeled
'oblique'. A value of 'italic' selects a font that is labeled 'italic',
or, if that is not available, one labeled 'oblique'.
The font that is labeled 'oblique' in the UA's font database may
actually have been generated by electronically slanting a normal font.
Fonts with Oblique, Slanted or Incline in their names will typically be
labeled 'oblique' in the UA's font database. Fonts with Italic,
Cursive or Kursiv in their names will typically be labeled
'italic'.
H1, H2, H3 { font-style: italic }
H1 EM { font-style: normal }
In the example above, emphasized text within 'H1' will appear in a normal
face.
-
CssFontStyle()
- Create a new CssFontStyle
-
CssFontStyle(CssExpression)
- Creates a new CssFontStyle
-
addToStyle(CssStyle)
- Add this property to the CssStyle.
-
equals(CssProperty)
- Compares two properties for equality.
-
get()
- Returns the current value
-
getPropertyInStyle(CssStyle, boolean)
- Get this property in the style.
-
getPropertyName()
- Returns the name of this property
-
isDefault()
- Is the value of this property is a default value.
-
isSoftlyInherited()
- Returns true if this property is "softly" inherited
e.g.
-
toString()
- Returns a string representation of the object.
CssFontStyle
public CssFontStyle()
- Create a new CssFontStyle
CssFontStyle
public CssFontStyle(CssExpression expression) throws InvalidParamException
- Creates a new CssFontStyle
- Parameters:
- expression - the font style
- Throws: InvalidParamException
- values are incorrect
get
public Object get()
- Returns the current value
- Overrides:
- get in class CssProperty
isSoftlyInherited
public boolean isSoftlyInherited()
- Returns true if this property is "softly" inherited
e.g. his value equals inherit
- Overrides:
- isSoftlyInherited in class CssProperty
toString
public String toString()
- Returns a string representation of the object.
- Overrides:
- toString in class CssProperty
getPropertyName
public String getPropertyName()
- Returns the name of this property
- Overrides:
- getPropertyName in class CssProperty
addToStyle
public void addToStyle(CssStyle style)
- Add this property to the CssStyle.
- Parameters:
- style - The CssStyle
- Overrides:
- addToStyle in class CssProperty
getPropertyInStyle
public CssProperty getPropertyInStyle(CssStyle style,
boolean resolve)
- Get this property in the style.
- Parameters:
- style - The style where the property is
- resolve - if true, resolve the style to find this property
- Overrides:
- getPropertyInStyle in class CssProperty
equals
public boolean equals(CssProperty property)
- Compares two properties for equality.
- Parameters:
- value - The other property.
- Overrides:
- equals in class CssProperty
isDefault
public boolean isDefault()
- Is the value of this property is a default value.
It is used by all macro for the function
print
- Overrides:
- isDefault in class CssProperty
All Packages Class Hierarchy This Package Previous Next Index