站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

CSS (Java 2 Platform SE v1.4.1) - JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

JavaTM 2 Platform
Std. Ed. v1.4.1

javax.swing.text.html
Class CSS

java.lang.Object
  |
  +--javax.swing.text.html.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:

The following are modeled, but currently not rendered.

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.

See Also:
StyleSheet

Nested Class Summary
static class CSS.Attribute
          Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
 
Constructor Summary
CSS()
           
 
Method Summary
static CSS.Attribute[] getAllAttributeKeys()
          Return the set of all possible CSS attribute keys.
static CSS.Attribute getAttribute(String name)
          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
 

Constructor Detail

CSS

public CSS()
Method Detail

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

JavaTM 2 Platform
Std. Ed. v1.4.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.