Hi,
I would like to group some nodes of my graph by the help of a JGoSubGraph. Grouping works fine but setting some properties of the JGoSubGraph like e.g. BackgroundColor or BorderPen has no effect.
// create seperate network for SubGraph
JGoNetwork oJGoSubGraphNetwork = new JGoNetwork();
// create SubGraph and set properties
JGoSubGraph oJGoSubGraph = new JGoSubGraph();
oJGoSubGraph.setBackgroundColor(Color.green);
oJGoSubGraph.setBorderPen(new JGoPen(JGoPen.SOLID, 2, Color.black));
oJGoSubGraph.setDraggable(false);
oJGoSubGraph.setBackgroundColor(Color.green);
oJGoSubGraph.setBorderPen(new JGoPen(JGoPen.SOLID, 2, Color.black));
oJGoSubGraph.setDraggable(false);
// add a label
JGoText oJGoText = new JGoText();
oJGoText.setText("Reports");
oJGoText.setBold(true);
oJGoText.setMultiline(false);
oJGoText.setFontSize(12);
oJGoSubGraphNetwork.addNode(oJGoText);
oJGoSubGraph.addObjectAtTail(oJGoText);
JGoText oJGoText = new JGoText();
oJGoText.setText("Reports");
oJGoText.setBold(true);
oJGoText.setMultiline(false);
oJGoText.setFontSize(12);
oJGoSubGraphNetwork.addNode(oJGoText);
oJGoSubGraph.addObjectAtTail(oJGoText);
// add some other nodes to SubGraph and network
...
...
// add SubGraph to the document's network and document oJGoNetwork.addNode(oJGoSubGraph);
oJGoDocument.add(oJGoSubGraph);
oJGoDocument.add(oJGoSubGraph);
performLayout(oJGoSubGraphNetwork, 10);
The problem might be that I generate a svg document at the end and transfer it to a C# client to be displayed:
DefaultDocument svgDomDoc = new DefaultDocument();
svgDomDoc.setGenerateJGoXML(false);
svgDomDoc.setGenerateSVG(true);
svgDomDoc.setSVGTooltips(false);
// create SVG
ByteArrayOutputStream oSVGBuffer = new ByteArrayOutputStream();
svgDomDoc.SVGWriteDoc(oSVGBuffer, oJGoDocument);
svgDomDoc.setGenerateJGoXML(false);
svgDomDoc.setGenerateSVG(true);
svgDomDoc.setSVGTooltips(false);
// create SVG
ByteArrayOutputStream oSVGBuffer = new ByteArrayOutputStream();
svgDomDoc.SVGWriteDoc(oSVGBuffer, oJGoDocument);
When I open the generated svg document by firefox the SubGraph has no border and no background color either. So how can I add information about the SubGraph to the svg document?
Thanks in advance!