X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2Ftools%2FImageLoader.java;h=7b51d56f12acd98e45d4f0f9e10a6343007c7253;hb=a9cc2cc5c9cda0ab49f26ccfb7a1aa30531e6ecf;hp=f3e9aa98371b407fd2bbea7c43c647f051297f66;hpb=0f295917c869b17a9322af3e738e3527ba9b31d4;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java b/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java index f3e9aa9..7b51d56 100644 --- a/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java +++ b/forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java @@ -21,7 +21,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.archaeopteryx.tools; @@ -34,9 +34,9 @@ import java.util.List; import javax.imageio.ImageIO; +import org.forester.archaeopteryx.AptxUtil; import org.forester.archaeopteryx.Constants; import org.forester.archaeopteryx.TreePanel; -import org.forester.archaeopteryx.Util; import org.forester.phylogeny.PhylogenyNode; import org.forester.phylogeny.data.Taxonomy; import org.forester.phylogeny.data.Uri; @@ -46,6 +46,7 @@ public class ImageLoader implements Runnable { private final TreePanel _tp; private static final BufferedImage PLACEHOLDER = new BufferedImage( 1, 1, BufferedImage.TYPE_INT_RGB ); + private final static boolean DEBUG = false; public ImageLoader( final TreePanel tp ) { _tp = tp; @@ -82,18 +83,18 @@ public class ImageLoader implements Runnable { || uri_str.endsWith( ".gif" ) || uri_str.endsWith( ".bmp" ) ) ) { image_map.put( uri_str, PLACEHOLDER ); BufferedImage bi = null; - if ( !Constants.__RELEASE && !Constants.__SNAPSHOT_RELEASE ) { - System.out.println( "accessing:" + uri ); + if ( DEBUG ) { + System.out.println( "accessing: " + uri ); } try { bi = ImageIO.read( uri.getValue().toURL() ); } catch ( final MalformedURLException e ) { - Util.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() + AptxUtil.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() + "\": Malformed URL Exception: " + e.getLocalizedMessage() ); } catch ( final IOException e ) { - Util.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() + AptxUtil.printWarningMessage( Constants.PRG_NAME, "\"" + uri.getValue() + "\": IO Exception: " + e.getLocalizedMessage() ); } if ( bi != null ) {