ice.pilots.html4
Class CSSAttribs

java.lang.Object
  extended byice.pilots.html4.CSSAttribs

public class CSSAttribs
extends Object

An object of this class is used to represent a set of all styles for an element


Field Summary
 String font_family
           
 int font_size
           
 int font_style
           
 
Method Summary
 boolean equals(Object o)
           
 void finalize()
           
 Color getBackgroundColor()
           
 Object getBackgroundImage()
          Retrieve the background image
 Font getFont()
          Retrieve the Font defined in the attributes of this CSS object.
 Font getTestedFont(char[] text, int start, int length)
          Retrieve a Font that has been tested to work with the given text.
 Font getTestedFont(String text)
          Retrieve a Font that has been tested to work with the given text.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

font_family

public String font_family

font_size

public int font_size

font_style

public int font_style
Method Detail

getFont

public Font getFont()
Retrieve the Font defined in the attributes of this CSS object. This method makes no warranty on the applicability or usefulness of this font, but it will be the one specified. Returns a cached instance if available, a new instance if not.

Returns:
A Font object matching the family, style, and size specified in this CSSAttribs object

getBackgroundColor

public Color getBackgroundColor()

getBackgroundImage

public Object getBackgroundImage()
Retrieve the background image

Returns:
reference to the background image, null if none
Since:
6.1

getTestedFont

public Font getTestedFont(String text)
Retrieve a Font that has been tested to work with the given text.

Parameters:
text - The passage of text as a char array
Returns:
A Font object that will have the Style and size as defined in this CSSAttribs object, but the family may be altered, if the specified family cannot display the text

getTestedFont

public Font getTestedFont(char[] text,
                          int start,
                          int length)
Retrieve a Font that has been tested to work with the given text.

Parameters:
text - The passage of text as a char array
start - The starting offset into the char array
length - The number of chars to test
Returns:
A Font object that will have the Style and size as defined in this CSSAttribs object, but the family may be altered, if the specified family cannot display the text

finalize

public void finalize()

hashCode

public int hashCode()

equals

public boolean equals(Object o)