This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing.text.html
class CSS
- All Implemented Interfaces:
- Serializable
public class CSS
extends Object
implements Serializable
Defines a set of
CSS attributes
as a typesafe enumeration. The HTML View implementations use
CSS attributes to determine how they will render. This also defines
methods to map between CSS/HTML/StyleConstants. Any shorthand
properties, such as font, are mapped to the intrinsic properties.
The following describes the CSS properties that are suppored by the
rendering engine:
- font-family
- font-style
- font-size (supports relative units)
- font-weight
- font
- color
- background-color (with the exception of transparent)
- background-image
- background-repeat
- background-position
- background
- background-repeat
- text-decoration (with the exception of blink and overline)
- vertical-align (only sup and super)
- text-align (justify is treated as center)
- margin-top
- margin-right
- margin-bottom
- margin-left
- margin
- padding-top
- padding-right
- padding-bottom
- padding-left
- border-style (only supports inset, outset and none)
- list-style-type
- list-style-position
The following are modeled, but currently not rendered.
- font-variant
- background-attachment (background always treated as scroll)
- word-spacing
- letter-spacing
- text-indent
- text-transform
- line-height
- border-top-width (this is used to indicate if a border should be used)
- border-right-width
- border-bottom-width
- border-left-width
- border-width
- border-top
- border-right
- border-bottom
- border-left
- border
- width
- height
- float
- clear
- display
- white-space
- list-style
Note: for the time being we do not fully support relative units,
unless noted, so that
p { margin-top: 10% } will be treated as if no margin-top was specified.
Nested Class Summary |
static class |
Definitions to be used as a key on AttributeSet's
that might hold CSS attributes. |
Method Summary |
static CSS.Attribute[] |
Return the set of all possible CSS attribute keys.
|
static CSS.Attribute |
Translates a string to a CSS.Attribute object.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSS
public CSS()
-
getAllAttributeKeys
public static CSS.Attribute[] getAllAttributeKeys()
-
Return the set of all possible CSS attribute keys.
getAttribute
public static final CSS.Attribute getAttribute(String name)
-
Translates a string to a
CSS.Attribute
object.
This will return null
if there is no attribute
by the given name.
- Parameters:
name
- the name of the CSS attribute to fetch the
typesafe enumeration for
- Returns:
- the
CSS.Attribute
object,
or null
if the string
doesn't represent a valid attribute key
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.