Styles.KEY_MIXED_CONTENT does not work with Oxygen Component
Posted: Mon Oct 15, 2012 6:35 pm
Hi all, i have implemented a custom framework that provide a StylesFilter.
This filter works fine with Oxygen Author version, but i'm trying to switch my app to the Oxygen Component, and it seems that the Styles.KEY_MIXED_CONTENT property is not applied to my document.
Here is my code :
Result in Component version : my images nodes are in red but the image does not appear.
Result in Author version : my images nodes are in red and the images appear.
In debug mode, i don't see any difference in the property, do you have any idea? should i test anything else?
This filter works fine with Oxygen Author version, but i'm trying to switch my app to the Oxygen Component, and it seems that the Styles.KEY_MIXED_CONTENT property is not applied to my document.
Here is my code :
Code: Select all
@Override
public Styles filter(Styles styles, AuthorNode authorNode) {
if (isImageNode(authorNode)) {
ro.sync.exml.view.graphics.Color red = ro.sync.exml.view.graphics.Color.COLOR_RED;
styles.setProperty(Styles.KEY_BACKGROUND_COLOR, red);
File test = new File("C:/test.jpg");
styles.setProperty(Styles.KEY_MIXED_CONTENT, getImageContent(test));
}
return styles;
}
private StaticContent[] getImageContent(File imageFile) {
return new StaticContent[] {new URIContent(imageFile.getParentFile().toURI().toString(), imageFile.getName())};
}
Result in Author version : my images nodes are in red and the images appear.
In debug mode, i don't see any difference in the property, do you have any idea? should i test anything else?