X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;fp=src%2Fjalview%2Fbin%2FCache.java;h=069589e24b1c48ad60d07fda5842964ac9f156ce;hb=6a3f4318037072a77588afb951a5a53835d5da99;hp=ba1d0a848a75883a8dcbc01c2508df8f81e99660;hpb=1379350f04bc63ca05bd428afb86717c4764755d;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index ba1d0a8..069589e 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -133,6 +133,8 @@ import org.biojava.dasobert.dasregistry.Das1Source; *
  • ANNOTATIONCOLOUR_MAX (red) Shade used for maximum value of annotation when shading by annotation
  • *
  • www.jalview.org (http://www.jalview.org) a property enabling all HTTP requests to be redirected to a mirror of http://www.jalview.org
  • * + *
  • FIGURE_AUTOIDWIDTH (false) Expand the left hand column of an exported alignment figure to accommodate even the longest sequence ID or annotation label.
  • + *
  • FIGURE_FIXEDIDWIDTH Specifies the width to use for the left-hand column when exporting an alignment as a figure (setting FIGURE_AUTOIDWIDTH to true will override this).
  • *
  • * * @@ -802,4 +804,24 @@ public class Cache } return null; } + + /** + * get and parse a property as an integer. send any parsing problems to System.err + * @param property + * @return null or Integer + */ + public static Integer getIntegerProperty(String property) + { + String val=getProperty(property); + if (val!=null && (val=val.trim()).length()>0) + { + try { + return Integer.valueOf(val); + } catch (NumberFormatException x) + { + System.err.println("Invalid integer in property '"+property+"' (value was '"+val+"')"); + } + } + return null; + } }