
public class PropertiesBasedStyleLibrary extends Object implements StyleLibrary
| Modifier and Type | Field and Description | 
|---|---|
| private AnyMap<String> | cacheCache | 
| static String | DEFAULT_PROPERTIES_EXTENSIONFile extension | 
| private static String | DEFAULT_PROPERTIES_PATHDefault properties path | 
| static String | DEFAULT_SCHEME_FILENAMEFile name of the default color scheme. | 
| static String | DEFAULT_SCHEME_NAMEName of the default color scheme. | 
| private LineStyleLibrary | linelibLine style library to use | 
| static String | LIST_SEPARATORSeparator for lists. | 
| private static Logging | LOGLogger | 
| private MarkerLibrary | markerlibMarker library to use | 
| private String | nameStyle scheme name | 
| static String | PROP_LINES_LIBRARYProperty string for the line style library | 
| static String | PROP_MARKER_LIBRARYProperty string for the marker style library | 
| private Properties | propertiesProperties file to use. | 
AXIS, AXIS_LABEL, AXIS_TICK, AXIS_TICK_MINOR, BACKGROUND_COLOR, BUBBLEPLOT, CLUSTERORDER, COLOR, COLORSET, DEFAULT, DOTPLOT, FONT_FAMILY, GENERIC_SIZE, KEY, LINE_WIDTH, MARGIN, MARKERPLOT, OPACITY, PAGE, PLOT, PLOTGREY, POLYGONS, REFERENCE_POINTS, SCALE, SELECTION, SELECTION_ACTIVE, TEXT_COLOR, TEXT_SIZE, XYCURVE| Constructor and Description | 
|---|
| PropertiesBasedStyleLibrary()Constructor without a properties file name. | 
| PropertiesBasedStyleLibrary(String filename,
                           String name)Constructor with a given file name. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getBackgroundColor(String key)Retrieve background color for an item | 
| private <T> T | getCached(String prefix,
         String postfix,
         Class<T> cls)Get a value from the cache (to avoid repeated parsing) | 
| String | getColor(String key)Retrieve a color for an item | 
| ColorLibrary | getColorSet(String key)Retrieve colorset for an item | 
| String | getFontFamily(String key)Get font family | 
| double | getLineWidth(String key)Get line width | 
| protected String | getName()Get the style scheme name. | 
| double | getOpacity(String key)Get opacity | 
| protected String | getPropertyValue(String prefix,
                String postfix)Retrieve the property value for a particular path + type pair. | 
| double | getSize(String key)Get generic size | 
| String | getTextColor(String key)Retrieve text color for an item | 
| double | getTextSize(String key)Get text size | 
| LineStyleLibrary | lines()Get the line style library to use. | 
| MarkerLibrary | markers()Get the marker library to use. | 
| private <T> void | setCached(String prefix,
         String postfix,
         T data)Set a cache value | 
private static final Logging LOG
public static final String DEFAULT_SCHEME_NAME
public static final String DEFAULT_SCHEME_FILENAME
public static final String DEFAULT_PROPERTIES_EXTENSION
private static final String DEFAULT_PROPERTIES_PATH
public static final String LIST_SEPARATOR
public static final String PROP_LINES_LIBRARY
public static final String PROP_MARKER_LIBRARY
private Properties properties
private String name
private LineStyleLibrary linelib
private MarkerLibrary markerlib
public PropertiesBasedStyleLibrary()
protected String getName()
private <T> T getCached(String prefix, String postfix, Class<T> cls)
T - Typeprefix - Tree namepostfix - Property namecls - Class restrictionprivate <T> void setCached(String prefix, String postfix, T data)
T - Typeprefix - Tree namepostfix - Property namedata - Dataprotected String getPropertyValue(String prefix, String postfix)
prefix - Pathpostfix - Typepublic String getColor(String key)
StyleLibrarygetColor in interface StyleLibrarykey - Reference namepublic String getBackgroundColor(String key)
StyleLibrarygetBackgroundColor in interface StyleLibrarykey - Reference namepublic String getTextColor(String key)
StyleLibrarygetTextColor in interface StyleLibrarykey - Reference namepublic ColorLibrary getColorSet(String key)
StyleLibrarygetColorSet in interface StyleLibrarykey - Reference namepublic double getLineWidth(String key)
StyleLibrarygetLineWidth in interface StyleLibrarykey - Keypublic double getTextSize(String key)
StyleLibrarygetTextSize in interface StyleLibrarykey - Keypublic String getFontFamily(String key)
StyleLibrarygetFontFamily in interface StyleLibrarykey - Keypublic double getSize(String key)
StyleLibrarygetSize in interface StyleLibrarykey - Keypublic double getOpacity(String key)
StyleLibrarygetOpacity in interface StyleLibrarykey - Keypublic LineStyleLibrary lines()
StyleLibrarylines in interface StyleLibrarypublic MarkerLibrary markers()
StyleLibrarymarkers in interface StyleLibrary