|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.init.its.api.process.OdtStyleConfiguration
public class OdtStyleConfiguration
ODT File styling configuration. This class may be used to load the correct styling for all implemented ITS Data Categories inside a LibreOffice Writer Document. This class provides the styling configuration in any case. It is assumed that a CSS like file name mlw-global.css exists and tries to load it, if this file does not exist or has incorrect syntax a default configuration is provided:
.translate { background-color: #aaffaa; } .localizationnote { text-overline-style: solid; text-overline-width: bold; text-overline-color: font-color; } .terminology { text-overline-style: solid; text-overline-width: bold; text-overline-color: #ffffff; } .localefilter { text-overline-style: solid; text-overline-width: bold; text-overline-color: #000099; }
Constructor Summary | |
---|---|
OdtStyleConfiguration()
|
Method Summary | |
---|---|
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getStyleMapping()
returns the style mapping (wether the externally configured one, or a default mapping, if external file contains syntax errors) |
static java.util.Map<java.lang.String,java.lang.String> |
getStyleMappingForDataCategory(ItsAttributes.DataCategories datacategory)
Returns the style mapping for a specific ItsAttributes.DataCategories |
static java.util.Map<java.lang.String,java.lang.String> |
getUnoStyleMappingForDataCategory(ItsAttributes.DataCategories datacategory)
|
static void |
load(java.net.URL resource)
|
protected static void |
loadConfig(java.net.URL resource)
two pass, no lookahead simple css file parser routine. loads an externally configured css file named 'mlw-global.css'. |
protected static void |
loadDefaultConfig()
if loading an external files fails, initialise the style mapping using these hard-coded styles |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OdtStyleConfiguration()
Method Detail |
---|
public static void load(java.net.URL resource)
protected static void loadDefaultConfig()
protected static void loadConfig(java.net.URL resource) throws java.lang.Exception
java.lang.Exception
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getStyleMapping()
public static java.util.Map<java.lang.String,java.lang.String> getStyleMappingForDataCategory(ItsAttributes.DataCategories datacategory)
ItsAttributes.DataCategories
datacategory
- the ItsAttributes.DataCategories
to get the styling
public static java.util.Map<java.lang.String,java.lang.String> getUnoStyleMappingForDataCategory(ItsAttributes.DataCategories datacategory)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |