Fix name appearance
This commit is contained in:
parent
c66c916d18
commit
61a558feb4
3 changed files with 10 additions and 11 deletions
|
@ -62,13 +62,9 @@ public class RenderingRulesStorage {
|
|||
RenderingRulesStorage resolve(String name, RenderingRulesStorageResolver ref) throws SAXException;
|
||||
}
|
||||
|
||||
public RenderingRulesStorage(String name){
|
||||
// register empty string as 0
|
||||
public RenderingRulesStorage(String name, Map<String, String> renderingConstants){
|
||||
getDictionaryValue("");
|
||||
this.renderingName = name;
|
||||
}
|
||||
|
||||
public RenderingRulesStorage(String name, Map<String, String> renderingConstants){
|
||||
if(renderingConstants != null) {
|
||||
this.renderingConstants.putAll(renderingConstants);
|
||||
}
|
||||
|
@ -436,11 +432,11 @@ public class RenderingRulesStorage {
|
|||
|
||||
|
||||
public static void main(String[] args) throws SAXException, IOException {
|
||||
RenderingRulesStorage storage = new RenderingRulesStorage("test");
|
||||
RenderingRulesStorage storage = new RenderingRulesStorage("test", null);
|
||||
final RenderingRulesStorageResolver resolver = new RenderingRulesStorageResolver() {
|
||||
@Override
|
||||
public RenderingRulesStorage resolve(String name, RenderingRulesStorageResolver ref) throws SAXException {
|
||||
RenderingRulesStorage depends = new RenderingRulesStorage("test");
|
||||
RenderingRulesStorage depends = new RenderingRulesStorage("test", null);
|
||||
try {
|
||||
depends.parseRulesFromXmlInputStream(RenderingRulesStorage.class.getResourceAsStream(name+".render.xml"),
|
||||
ref);
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReader;
|
||||
|
@ -33,11 +34,12 @@ public class NativeSwingRendering extends NativeLibrary {
|
|||
private static NativeSwingRendering defaultLoadedLibrary;
|
||||
|
||||
public void loadRuleStorage(String path, String renderingProperties) throws SAXException, IOException{
|
||||
RenderingRulesStorage storage = new RenderingRulesStorage("default");
|
||||
final LinkedHashMap<String, String> renderingAttributes = new LinkedHashMap<String, String>();
|
||||
RenderingRulesStorage storage = new RenderingRulesStorage("default", renderingAttributes);
|
||||
final RenderingRulesStorageResolver resolver = new RenderingRulesStorageResolver() {
|
||||
@Override
|
||||
public RenderingRulesStorage resolve(String name, RenderingRulesStorageResolver ref) throws SAXException {
|
||||
RenderingRulesStorage depends = new RenderingRulesStorage(name);
|
||||
RenderingRulesStorage depends = new RenderingRulesStorage(name, renderingAttributes);
|
||||
try {
|
||||
depends.parseRulesFromXmlInputStream(RenderingRulesStorage.class.getResourceAsStream(name+".render.xml"),
|
||||
ref);
|
||||
|
|
|
@ -60,7 +60,9 @@ public class RendererRegistry {
|
|||
return null;
|
||||
}
|
||||
try {
|
||||
return loadRenderer(name, new LinkedHashMap<String, RenderingRulesStorage>(), new LinkedHashMap<String, String>());
|
||||
RenderingRulesStorage r = loadRenderer(name, new LinkedHashMap<String, RenderingRulesStorage>(), new LinkedHashMap<String, String>());
|
||||
renderers.put(name, r);
|
||||
return r;
|
||||
} catch (IOException e) {
|
||||
log.error("Error loading renderer", e); //$NON-NLS-1$
|
||||
} catch (SAXException e) {
|
||||
|
@ -124,7 +126,6 @@ public class RendererRegistry {
|
|||
} finally {
|
||||
is.close();
|
||||
}
|
||||
renderers.put(name, main);
|
||||
return main;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue