API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text.html. CSS View Source
Author(s)
Timothy Prinzing
Scott Violet
Since
Version
1.67 02/27/06
Serial
Hierarchy
 Object
      CSS
Implements
 Serializable
Subclasses
Description
public class CSS
  Defines a set of CSS attributes as a typesafe enumeration.
See also:    StyleSheet
Constructors
public CSS ()
Methods
pack-private void addInternalCSSValue (MutableAttributeSet attr, Attribute key, String value)
Parses the CSS property key with value value placing the result in att.
pack-privatestatic void calculateTiledLayout (LayoutIterator iter, int targetSpan)
  Calculate a tiled layout for the given iterator.
pack-privatestatic SizeRequirements calculateTiledRequirements (LayoutIterator iter, SizeRequirements r)
  Calculate the requirements needed to tile the requirements given by the iterator that would be tiled.
pack-privatestatic String colorToHex (Color color)
Converts a type Color to a hex string in the format "#RRGGBB"
pack-private Object cssValueToStyleConstantsValue (StyleConstants key, Object value)
  Converts the passed in CSS value to a StyleConstants value.
publicstatic Attribute getAllAttributeKeys ()
Return the set of all possible CSS attribute keys.
publicfinalstatic Attribute getAttribute (String name)
  Translates a string to a CSS.Attribute object.
pack-private int getBaseFontSize ()
Returns the base font size.
pack-private Color getColor (AttributeSet a, Attribute key)
  Takes a set of attributes and turn it into a color specification.
pack-private Object getCssValue (Attribute cssAttr, String htmlAttrValue)
  Given a CSS.Attribute object and its corresponding HTML.Attribute's value, this method returns a CssValue object to associate with the CSS attribute.
pack-private Font getFont (StyleContext sc, AttributeSet a, int defaultSize, StyleSheet ss)
  Returns the font for the values in the passed in AttributeSet.
pack-privatestatic int getFontSize (AttributeSet attr, int defaultSize, StyleSheet ss)
pack-privatestatic int getIndexOfSize (float pt, int[] sizeMap)
pack-privatestatic int getIndexOfSize (float pt, StyleSheet ss)
pack-private Object getInternalCSSValue (Attribute key, String value)
  Gets the internal CSS representation of value which is a CSS value of the CSS attribute named key.
pack-private float getLength (AttributeSet a, Attribute key, StyleSheet ss)
Returns the length of the attribute in a with key key.
pack-private float getPointSize (int index, StyleSheet ss)
  Return the point size, given a size index.
pack-private float getPointSize (String size, StyleSheet ss)
  Returns the size of a font from the passed in string.
pack-privatestatic URL getURL (URL base, String cssString)
  Returns a URL for the given CSS url string.
pack-privatefinalstatic Value getValue (String name)
  Translates a string to a CSS.Value object.
pack-privatefinalstatic Color hexToColor (String value)
  Convert a "#FFFFFF" hex string to a Color.
pack-privatestatic String parseStrings (String value)
 
pack-private void setBaseFontSize (int sz)
  Sets the base font size.
pack-private void setBaseFontSize (String size)
Sets the base font size from the passed in string.
pack-privatestatic Color stringToColor (String str)
Convert a color string such as "RED" or "#NNNNNN" or "rgb(r, g, b)" to a Color.
pack-private Attribute styleConstantsKeyToCSSKey (StyleConstants sc)
Maps from a StyleConstants to a CSS Attribute.
pack-private Object styleConstantsValueToCSSValue (StyleConstants sc, Object styleValue)
Maps from a StyleConstants value to a CSS value.
pack-private AttributeSet translateHTMLToCSS (AttributeSet htmlAttrSet)
  Convert a set of HTML attributes to an equivalent set of CSS attributes.
Fields
pack-privatestatic int baseFontSizeIndex
Nested Classes
  CSS.Attribute
Definitions to be used as a key on AttributeSet's that might hold CSS attributes.
  CSS.CssValue
Base class to CSS values in the attribute sets.
  CSS.StringValue
By default CSS attributes are represented as simple strings.
  CSS.FontSize
Represents a value for the CSS.FONT_SIZE attribute.
  CSS.BorderWidthValue
BorderWidthValue is used to model BORDER_XXX_WIDTH and adds support for the thin/medium/thick values.
  CSS.CssValueMapper
Handles uniquing of CSS values, like lists, and background image repeating.
  CSS.BackgroundPosition
Used for background images, to represent the position.
  CSS.BackgroundImage
Used for BackgroundImages.
  CSS.LengthUnit
Parses a length value, this is used internally, and never added to an AttributeSet or returned to the developer.
  CSS.ShorthandFontParser
Class used to parse font property.
  CSS.ShorthandBackgroundParser
Parses the background property into its intrinsic values.
  CSS.ShorthandMarginParser
Used to parser margin and padding.
  CSS.LayoutIterator
An iterator to express the requirements to use when computing layout.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar