fi.hut.tml.xsmiles.gui.components
Class CSSFormatter

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.CSSFormatter
Direct Known Subclasses:
AWTCSSFormatter

public abstract class CSSFormatter
extends java.lang.Object

CSS specific operations on components

Author:
Mikko Honkala

Constructor Summary
CSSFormatter()
           
 
Method Summary
abstract  void formatComponent(java.awt.Component comp, org.w3c.dom.css.CSSStyleDeclaration style, java.awt.Color defaultComponentColor)
          applies CSS formatting to a swing component.
abstract  void formatComponent(java.awt.Component comp, org.w3c.dom.css.CSSStyleDeclaration style, java.awt.Color defaultComponentColor, double zoom)
          applies CSS formatting to a swing component.
static java.lang.String getCaptionSide(org.w3c.dom.css.CSSStyleDeclaration style)
          Returns the string value of the caption-side CSS property
static java.awt.Dimension getSize(org.w3c.dom.css.CSSStyleDeclaration style)
          read the size from the CSS declaration.
static java.awt.Color getTransparentColor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSSFormatter

public CSSFormatter()
Method Detail

getSize

public static java.awt.Dimension getSize(org.w3c.dom.css.CSSStyleDeclaration style)
read the size from the CSS declaration. Currently this is very simple, just reads the width and height properties


getCaptionSide

public static java.lang.String getCaptionSide(org.w3c.dom.css.CSSStyleDeclaration style)
Returns the string value of the caption-side CSS property


getTransparentColor

public static java.awt.Color getTransparentColor()

formatComponent

public abstract void formatComponent(java.awt.Component comp,
                                     org.w3c.dom.css.CSSStyleDeclaration style,
                                     java.awt.Color defaultComponentColor)
applies CSS formatting to a swing component. this could be used for AWT components as well without the Opaque - setting


formatComponent

public abstract void formatComponent(java.awt.Component comp,
                                     org.w3c.dom.css.CSSStyleDeclaration style,
                                     java.awt.Color defaultComponentColor,
                                     double zoom)
applies CSS formatting to a swing component. this could be used for AWT components as well without the Opaque - setting



X-Smiles 1.2