Font extends AbstractCssProperty<Font> implements StateChangeInformer<CssProperty> { @Override public String toString() { return getCssName() + ": " + getCssValue(); } Font();  Font(final String cssValue);  Font(final Font font); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override Font setCssValue(final String cssValue); static boolean isValid(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsCaption(); void setAsIcon(); void setAsMenu(); void setAsMessageBox(); void setAsSmallCaption(); void setAsStatusBar(); FontSize getFontSize(); LineHeight getLineHeight(); FontFamily getFontFamily(); FontVariant getFontVariant(); FontWeight getFontWeight(); FontStyle getFontStyle(); Font setFontStyle(final FontStyle fontStyle); Font setFontVariant(final FontVariant fontVariant); Font setFontWeight(final FontWeight fontWeight); Font setFontSize(final FontSize fontSize); Font setLineHeight(final LineHeight lineHeight); Font setFontFamily(final FontFamily fontFamily); @Override void stateChanged(final CssProperty stateChangedObject); static final String INITIAL; static final String INHERIT; static final String CAPTION; static final String ICON; static final String MENU; static final String MESSAGE_BOX; static final String SMALL_CAPTION; static final String STATUS_BAR; }
@Test public void testToString() { Font font = new Font("italic small-caps 17.0px"); assertEquals(CssNameConstants.FONT + ": italic small-caps 17.0px", font.toString()); font.setCssValue("italic small-caps bold 12px/1.4 arial,sans-serif"); assertEquals(CssNameConstants.FONT + ": italic small-caps bold 12px/1.4 arial,sans-serif", font.toString()); }