// Create a CSS compiler.
CSSCompilerBuilder builder = new CSSCompilerBuilder();
builder.setStyleSheetCompilerFactory(
DefaultStyleSheetCompilerFactory.getDefaultInstance());
CSSCompiler cssCompiler = builder.getCSSCompiler();
// Compile and push the system default style sheet into the styling
// engine.
CompiledStyleSheet defaultCompiledStyleSheet;
try {
URL url = getClass().getResource("/com/volantis/mcs/runtime/default.css");
InputStream stream = url.openStream();
defaultCompiledStyleSheet = cssCompiler.compile(
new InputStreamReader(stream), null);
} catch (IOException e) {
throw new ExtendedRuntimeException(e);
}
stylingEngine.pushStyleSheet(defaultCompiledStyleSheet);