fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2
Class CSSTextFormatter
java.lang.Object
fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2.CSSTextFormatter
- All Implemented Interfaces:
- CSSFormatter
- public class CSSTextFormatter
- extends java.lang.Object
- implements CSSFormatter
Reads in a style string and formats a text component (font, color).
- Author:
- Kari Pihkala, Mikko Honkala
|
Field Summary |
protected fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2.CSSTextFormatter.CSSStyleDeclaration |
cssStyle
|
|
Method Summary |
java.awt.Font |
deriveFont(java.awt.Font orig,
int style,
float size)
|
void |
formatComponent(java.awt.Component comp)
|
java.awt.Font |
getFont()
Returns the Font accoring to the cssStyle variable. |
fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2.CSSTextFormatter.CSSValue |
getProperty(java.lang.String property)
Returns the specified property's CSSValue. |
java.awt.Dimension |
getSize()
|
void |
setStyle(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cssStyle
protected fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2.CSSTextFormatter.CSSStyleDeclaration cssStyle
CSSTextFormatter
public CSSTextFormatter()
setStyle
public void setStyle(java.lang.String s)
- Specified by:
setStyle in interface CSSFormatter
formatComponent
public void formatComponent(java.awt.Component comp)
- Specified by:
formatComponent in interface CSSFormatter
getProperty
public fi.hut.tml.xsmiles.mlfc.smil.viewer.awt.media.java2.CSSTextFormatter.CSSValue getProperty(java.lang.String property)
- Returns the specified property's CSSValue.
- Parameters:
property - The name of the property to return.
- Returns:
- The specified property's CSSValue.
getFont
public java.awt.Font getFont()
- Returns the Font accoring to the cssStyle variable.
- Returns:
- The Font that should be used when painting this element.
deriveFont
public java.awt.Font deriveFont(java.awt.Font orig,
int style,
float size)
getSize
public java.awt.Dimension getSize()
X-Smiles 1.2