Skip to content

Commit 690941b

Browse files
committed
Version 2.0.1 - Argh, paxtools and sbgn was not in the build script, so version 2.0 hat a serious bug!
1 parent a9e71f2 commit 690941b

File tree

2 files changed

+43
-18
lines changed

2 files changed

+43
-18
lines changed

dist/build.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,16 @@
8686
<zipfileset excludes="META-INF/*.SF" src="${base}/lib/keggapi.jar"/>
8787
<!-- <zipfileset excludes="META-INF/*.SF" src="${base}/lib/stax-api-1.0.1.jar"/> -->
8888

89+
<zipfileset excludes="META-INF/*.SF" src="${base}/lib/paxtools-4.1.1_customJenaFix.jar"/>
90+
<zipfileset excludes="META-INF/*.SF" src="${base}/lib/org.sbgn.jar"/>
91+
92+
8993
<filelist dir="${base}" files="libquaqua.jnilib,libquaqua64.jnilib"/>
9094

9195
<!-- Uncomment for SysBio classes instead of compiled jar. -->
9296
<fileset dir="${SysBioPath}/bin">
93-
<exclude name="de/zbit/resources/liftover/*"/>
94-
<exclude name="de/zbit/mapper/*"/>
97+
<exclude name="de/zbit/resources/liftover/**/*"/>
98+
<exclude name="de/zbit/mapper/**/*"/>
9599
<exclude name="**/package.html"/>
96100
<exclude name="overview.html"/>
97101
</fileset>
@@ -105,6 +109,7 @@
105109
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/wsdl4j.jar"/>
106110
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/axis.jar"/>
107111
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/sysbio-osx-support.jar"/>
112+
<zipfileset excludes="META-INF/*" src="${SysBioPath}/lib/quaqua.jar"/>
108113
<!-- <zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/Java5/saaj.jar"/>-->
109114
<!-- <zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/WSDbfetch.jar"/>-->
110115
<zipfileset excludes="META-INF/*" src="${SysBioPath}/lib/commons-cli-1.1.jar"/>
@@ -124,7 +129,7 @@
124129

125130
<fileset dir="${SBML2LaTeXPath}/bin"/>
126131
<zipfileset excludes="META-INF/*.SF" src="${SBML2LaTeXPath}/lib/html2latex.jar"/>
127-
132+
128133
</jar>
129134
</target>
130135

src/de/zbit/kegg/io/KEGG2yGraph.java

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -434,23 +434,34 @@ private static NodeList removeOutlier(NodeList nl, Graph2D graph, int threshold)
434434
*/
435435
public static NodeRealizer setupGroupNode(NodeLabel nl, String changeCaption) {
436436
GroupNodeRealizer nr = new GroupNodeRealizer();
437-
((GroupNodeRealizer)nr).setGroupClosed(false);
438-
nr.setTransparent(true);
437+
setupGroupNode(nr);
439438

440-
if (changeCaption!=null) {
441-
nl.setText(changeCaption);
439+
if (nl!=null) {
440+
if (changeCaption!=null) {
441+
nl.setText(changeCaption);
442+
}
443+
444+
nl.setPosition(NodeLabel.TOP);
445+
nl.setBackgroundColor(new Color((float)0.8,(float)0.8,(float)0.8,(float)0.5));
446+
nl.setFontSize(10);
447+
nl.setAutoSizePolicy(NodeLabel.AUTOSIZE_NODE_WIDTH);
448+
449+
nr.setLabel(nl);
442450
}
443451

452+
return nr;
453+
}
454+
455+
public static void setupGroupNode(GroupNodeRealizer nr) {
456+
((GroupNodeRealizer)nr).setGroupClosed(false);
457+
// Setting the transparency influences the edges, such that they
458+
// will end in the middle of the group node, instead of the border!
459+
//nr.setTransparent(true);
460+
nr.setFillColor(null);
461+
nr.setFillColor2(null);
462+
444463
nr.setMinimalInsets(new YInsets(5, 2, 2, 2)); // top, left, bottom, right
445464
nr.setAutoBoundsEnabled(true);
446-
nl.setPosition(NodeLabel.TOP);
447-
nl.setBackgroundColor(new Color((float)0.8,(float)0.8,(float)0.8,(float)0.5));
448-
nl.setFontSize(10);
449-
nl.setAutoSizePolicy(NodeLabel.AUTOSIZE_NODE_WIDTH);
450-
451-
nr.setLabel(nl);
452-
453-
return nr;
454465
}
455466

456467
/**
@@ -610,11 +621,18 @@ protected Graph2D translateWithoutPreprocessing(Pathway p) {
610621
nl.setUserData(nodeLink);
611622
}
612623

613-
n = graph.createNode(nr);
624+
// Crete the node => Either a group or normal node.
614625
if (addThisNodeToGroupNodeList) {
615-
hm.convertToGroupNode(n);
626+
n = hm.createGroupNode(graph);
627+
//setupGroupNode((GroupNodeRealizer) graph.getRealizer(n));
628+
graph.setRealizer(n, nr);
629+
630+
//hm.convertToGroupNode(n);
616631
parentGroupNodes.add(n);
632+
} else {
633+
n = graph.createNode(nr);
617634
}
635+
618636
if (g.isDefaultPosition()) {
619637
toLayout.add(n);
620638
}
@@ -649,7 +667,7 @@ protected Graph2D translateWithoutPreprocessing(Pathway p) {
649667
nl.setUserData(nodeLink);
650668
}
651669

652-
// Create a node, but don't set the reference
670+
// Create a node for each graphics attribute, but don't set the reference
653671
graph.createNode(nr);
654672
}
655673
}
@@ -970,6 +988,7 @@ else if (e.getType().equals(EntryType.gene))
970988

971989
//gnr.setBorderInsets(new YInsets(1, 1, 1, 1));
972990

991+
// Create grouped node for all same edges
973992
Node n = graph.createNode(gnr);
974993
hm.convertToGroupNode(n);
975994
hm.setParentNode(nl, n);
@@ -1123,6 +1142,7 @@ private NodeRealizer setupGraphics(NodeRealizer nr, NodeLabel nl, Graphics g) {
11231142
if (nr==null) {
11241143
if (g.getType().equals(GraphicsType.rectangle)) {
11251144
nr = new ShapeNodeRealizer(ShapeNodeRealizer.RECT);
1145+
//nr = new ShapeNodeRealizerRespectingLabels(ShapeNodeRealizer.RECT);
11261146
} else if (g.getType().equals(GraphicsType.circle)) {
11271147
nr = new ShapeNodeRealizer(ShapeNodeRealizer.ELLIPSE);
11281148
nl.setFontSize(10); // looks better on small ellipses

0 commit comments

Comments
 (0)