Skip to content

Commit

Permalink
Version 2.0.1 - Argh, paxtools and sbgn was not in the build script, …
Browse files Browse the repository at this point in the history
…so version 2.0 hat a serious bug!
  • Loading branch information
Clemens82 committed Jul 24, 2012
1 parent a9e71f2 commit 690941b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
11 changes: 8 additions & 3 deletions dist/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@
<zipfileset excludes="META-INF/*.SF" src="${base}/lib/keggapi.jar"/>
<!-- <zipfileset excludes="META-INF/*.SF" src="${base}/lib/stax-api-1.0.1.jar"/> -->

<zipfileset excludes="META-INF/*.SF" src="${base}/lib/paxtools-4.1.1_customJenaFix.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${base}/lib/org.sbgn.jar"/>


<filelist dir="${base}" files="libquaqua.jnilib,libquaqua64.jnilib"/>

<!-- Uncomment for SysBio classes instead of compiled jar. -->
<fileset dir="${SysBioPath}/bin">
<exclude name="de/zbit/resources/liftover/*"/>
<exclude name="de/zbit/mapper/*"/>
<exclude name="de/zbit/resources/liftover/**/*"/>
<exclude name="de/zbit/mapper/**/*"/>
<exclude name="**/package.html"/>
<exclude name="overview.html"/>
</fileset>
Expand All @@ -105,6 +109,7 @@
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/wsdl4j.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/axis.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/sysbio-osx-support.jar"/>
<zipfileset excludes="META-INF/*" src="${SysBioPath}/lib/quaqua.jar"/>
<!-- <zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/Java5/saaj.jar"/>-->
<!-- <zipfileset excludes="META-INF/*.SF" src="${SysBioPath}/lib/WSDbfetch.jar"/>-->
<zipfileset excludes="META-INF/*" src="${SysBioPath}/lib/commons-cli-1.1.jar"/>
Expand All @@ -124,7 +129,7 @@

<fileset dir="${SBML2LaTeXPath}/bin"/>
<zipfileset excludes="META-INF/*.SF" src="${SBML2LaTeXPath}/lib/html2latex.jar"/>

</jar>
</target>

Expand Down
50 changes: 35 additions & 15 deletions src/de/zbit/kegg/io/KEGG2yGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,23 +434,34 @@ private static NodeList removeOutlier(NodeList nl, Graph2D graph, int threshold)
*/
public static NodeRealizer setupGroupNode(NodeLabel nl, String changeCaption) {
GroupNodeRealizer nr = new GroupNodeRealizer();
((GroupNodeRealizer)nr).setGroupClosed(false);
nr.setTransparent(true);
setupGroupNode(nr);

if (changeCaption!=null) {
nl.setText(changeCaption);
if (nl!=null) {
if (changeCaption!=null) {
nl.setText(changeCaption);
}

nl.setPosition(NodeLabel.TOP);
nl.setBackgroundColor(new Color((float)0.8,(float)0.8,(float)0.8,(float)0.5));
nl.setFontSize(10);
nl.setAutoSizePolicy(NodeLabel.AUTOSIZE_NODE_WIDTH);

nr.setLabel(nl);
}

return nr;
}

public static void setupGroupNode(GroupNodeRealizer nr) {
((GroupNodeRealizer)nr).setGroupClosed(false);
// Setting the transparency influences the edges, such that they
// will end in the middle of the group node, instead of the border!
//nr.setTransparent(true);
nr.setFillColor(null);
nr.setFillColor2(null);

nr.setMinimalInsets(new YInsets(5, 2, 2, 2)); // top, left, bottom, right
nr.setAutoBoundsEnabled(true);
nl.setPosition(NodeLabel.TOP);
nl.setBackgroundColor(new Color((float)0.8,(float)0.8,(float)0.8,(float)0.5));
nl.setFontSize(10);
nl.setAutoSizePolicy(NodeLabel.AUTOSIZE_NODE_WIDTH);

nr.setLabel(nl);

return nr;
}

/**
Expand Down Expand Up @@ -610,11 +621,18 @@ protected Graph2D translateWithoutPreprocessing(Pathway p) {
nl.setUserData(nodeLink);
}

n = graph.createNode(nr);
// Crete the node => Either a group or normal node.
if (addThisNodeToGroupNodeList) {
hm.convertToGroupNode(n);
n = hm.createGroupNode(graph);
//setupGroupNode((GroupNodeRealizer) graph.getRealizer(n));
graph.setRealizer(n, nr);

//hm.convertToGroupNode(n);
parentGroupNodes.add(n);
} else {
n = graph.createNode(nr);
}

if (g.isDefaultPosition()) {
toLayout.add(n);
}
Expand Down Expand Up @@ -649,7 +667,7 @@ protected Graph2D translateWithoutPreprocessing(Pathway p) {
nl.setUserData(nodeLink);
}

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

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

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

0 comments on commit 690941b

Please sign in to comment.