org.writersforge.catalan.layout.style
Interface StyleMap

All Known Implementing Classes:
DatumStyleMap, DefaultStyle

public interface StyleMap

Central access point for all layout styles. Each style has one method for the default style, and one for looking up styles by name. None of these methods should return null. Every method of every returned style should fall back on a sane default value if the requested property is not defined.

Author:
jsheets

Method Summary
 java.awt.Color findColor(java.lang.String colorName)
          Returns a Color object corresponding to the given name.
 AreaStyle getAreaStyle(java.lang.String styleName)
          Returns the named area style from this map.
 AreaStyle getDefaultAreaStyle()
          Returns the default area style from this map.
 FontStyle getDefaultFontStyle()
          Returns the default font style from this map.
 TextStyle getDefaultTextStyle()
          Returns the default text style from this map.
 FontStyle getFontStyle(java.lang.String styleName)
          Returns the named font style from this map.
 TextStyle getTextStyle(java.lang.String styleName)
          Returns the named text style from this map.
 

Method Detail

getDefaultFontStyle

public FontStyle getDefaultFontStyle()
Returns the default font style from this map.

Returns:
the font style

getFontStyle

public FontStyle getFontStyle(java.lang.String styleName)
Returns the named font style from this map.

Parameters:
styleName - the name of the style
Returns:
the named font style

getDefaultTextStyle

public TextStyle getDefaultTextStyle()
Returns the default text style from this map.

Returns:
the text style

getTextStyle

public TextStyle getTextStyle(java.lang.String styleName)
Returns the named text style from this map.

Parameters:
styleName - the name of the style
Returns:
the named text style

getDefaultAreaStyle

public AreaStyle getDefaultAreaStyle()
Returns the default area style from this map.

Returns:
the area style

getAreaStyle

public AreaStyle getAreaStyle(java.lang.String styleName)
Returns the named area style from this map.

Parameters:
styleName - the name of the style
Returns:
the named area style

findColor

public java.awt.Color findColor(java.lang.String colorName)
Returns a Color object corresponding to the given name. Changing the implementation of findColor() will alter the colors generated by the renderer.

Parameters:
colorName - the name of the color
Returns:
the Color object for the given name