|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.visualization.style.PropertiesBasedStyleLibrary
public class PropertiesBasedStyleLibrary

Style library loading the parameters from a properties file.
| Field Summary | |
|---|---|
private AnyMap<String> |
cache
Cache |
static String |
DEFAULT_PROPERTIES_EXTENSION
File extension |
private static String |
DEFAULT_PROPERTIES_PATH
Default properties path |
static String |
DEFAULT_SCHEME_FILENAME
File name of the default color scheme. |
static String |
DEFAULT_SCHEME_NAME
Name of the default color scheme. |
private LineStyleLibrary |
linelib
Line style library to use |
static String |
LIST_SEPARATOR
Separator for lists. |
protected static Logging |
logger
Logger |
private MarkerLibrary |
markerlib
Marker library to use |
private String |
name
Style scheme name |
private Properties |
properties
Properties file to use. |
| Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.style.StyleLibrary |
|---|
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, POLYGONS, REFERENCE_POINTS, SCALE, SELECTION, SELECTION_ACTIVE, TEXT_COLOR, TEXT_SIZE |
| Constructor Summary | |
|---|---|
PropertiesBasedStyleLibrary()
Constructor without a properties file name. |
|
PropertiesBasedStyleLibrary(String filename,
String name)
Constructor with a given file name. |
|
| Method Summary | ||
|---|---|---|
String |
getBackgroundColor(String key)
Retrieve background color for an item |
|
private
|
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
|
setCached(String prefix,
String postfix,
T data)
Set a cache value |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logging logger
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
private Properties properties
private String name
private AnyMap<String> cache
private LineStyleLibrary linelib
private MarkerLibrary markerlib
| Constructor Detail |
|---|
public PropertiesBasedStyleLibrary()
public PropertiesBasedStyleLibrary(String filename,
String name)
filename - Name of properties file.name - NAme for this style| Method Detail |
|---|
protected String getName()
private <T> T getCached(String prefix,
String postfix,
Class<T> cls)
T - Typeprefix - Tree namepostfix - Property namecls - Class restriction
private <T> void setCached(String prefix,
String postfix,
T data)
T - Typeprefix - Tree namepostfix - Property namedata - Data
protected String getPropertyValue(String prefix,
String postfix)
prefix - Pathpostfix - Type
public String getColor(String key)
StyleLibrary
getColor in interface StyleLibrarykey - Reference name
public String getBackgroundColor(String key)
StyleLibrary
getBackgroundColor in interface StyleLibrarykey - Reference name
public String getTextColor(String key)
StyleLibrary
getTextColor in interface StyleLibrarykey - Reference name
public ColorLibrary getColorSet(String key)
StyleLibrary
getColorSet in interface StyleLibrarykey - Reference name
public double getLineWidth(String key)
StyleLibrary
getLineWidth in interface StyleLibrarykey - Key
public double getTextSize(String key)
StyleLibrary
getTextSize in interface StyleLibrarykey - Key
public String getFontFamily(String key)
StyleLibrary
getFontFamily in interface StyleLibrarykey - Key
public double getSize(String key)
StyleLibrary
getSize in interface StyleLibrarykey - Key
public double getOpacity(String key)
StyleLibrary
getOpacity in interface StyleLibrarykey - Key
public LineStyleLibrary lines()
StyleLibrary
lines in interface StyleLibrarypublic MarkerLibrary markers()
StyleLibrary
markers in interface StyleLibrary
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||