From 25284ea792e7cc73b507028d8bab71e0f17d0e3e Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 19 Jul 2010 12:20:37 +0200 Subject: opentox-api-wrapper bumped to 1.6.0 --- application.rb | 2 +- public/java/Display.java | 5 ++--- public/java/Makefile | 9 +++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 public/java/Makefile diff --git a/application.rb b/application.rb index cc0279b..967a29d 100644 --- a/application.rb +++ b/application.rb @@ -7,7 +7,7 @@ ENV["CLASSPATH"] = "#{ENV["CLASSPATH"]}:#{java_dir}:#{cdk}:#{jchempaint}" require 'rubygems' require 'rjb' -gem "opentox-ruby-api-wrapper", "= 1.5.7" +gem "opentox-ruby-api-wrapper", "= 1.6.0" require 'opentox-ruby-api-wrapper' #set :lock, true diff --git a/public/java/Display.java b/public/java/Display.java index 4a3e221..2950ca7 100644 --- a/public/java/Display.java +++ b/public/java/Display.java @@ -56,7 +56,7 @@ public class Display{ drawArea = new Rectangle(size, size); image = new BufferedImage(size, size , BufferedImage.TYPE_INT_RGB); g2 = (Graphics2D)image.getGraphics(); - g2.setColor(Color.yellow); + g2.setColor(Color.WHITE); g2.fillRect(0, 0, size, size); } @@ -69,14 +69,13 @@ public class Display{ sdg.generateCoordinates(); mol = sdg.getMolecule(); GeometryTools.translateAllPositive(mol); - // get size of previous mol and shift last = GeometryTools.shiftContainer(mol, GeometryTools.getRectangle2D(mol), last,2); coordinated_mols[i] = (IMolecule) mol; } moleculeSet.setMolecules(coordinated_mols); renderer.paintMoleculeSet(moleculeSet, new AWTDrawVisitor(g2), drawArea, true); - //matchSmarts("NN",Color.green); + matchSmarts("NN",Color.green); ImageIO.write(image, "png", out); } catch (Exception ex) { ex.printStackTrace(); diff --git a/public/java/Makefile b/public/java/Makefile new file mode 100644 index 0000000..bcae6ec --- /dev/null +++ b/public/java/Makefile @@ -0,0 +1,9 @@ +#all: DisplayStructure.class +all: Display.class + +#%.class: %.java +# javac -Xlint:deprecation -Xlint:unchecked -classpath ./:./cdk-1.0.1.jar $< + +%.class: %.java + javac -classpath ./:./cdk-1.3.5.jar:./cdk-jchempaint-15.jar $< + #javac -Xlint:deprecation -Xlint:unchecked -classpath ./:./cdk-1.3.5.jar:./cdk-jchempaint-15.jar $< -- cgit v1.2.3