* <li>WRAP_ALIGNMENT</li>
* <li>EPS_RENDERING (Prompt each time|Lineart|Text) default for EPS rendering
* style check</li>
- * <li>BITMAP_SCALE - scale factor for PNG export - default 0 - native resolution</li>
+ * <li>BITMAP_SCALE - scale factor for PNG export - default 0.0 - native
+ * resolution</li>
* <li>BITMAP_HEIGHT - height bound for PNG export or 0 for unbound</li>
* <li>BITMAP_WIDTH - width bound for PNG export or 0 for unbound</li>
* <li>SORT_ALIGNMENT (No sort|Id|Pairwise Identity)</li>
url = Cache.class.getResource(resourcePath).toString();
} catch (Exception ex)
{
- jalview.bin.Console.errPrintln("Failed to resolve resource " + resourcePath
- + ": " + ex.getMessage());
+ jalview.bin.Console.errPrintln("Failed to resolve resource "
+ + resourcePath + ": " + ex.getMessage());
}
}
else
return def;
}
+ public static float getDefault(String property, float def)
+ {
+ String string = getProperty(property);
+ if (string != null)
+ {
+ try
+ {
+ def = Float.parseFloat(string);
+ } catch (NumberFormatException e)
+ {
+ if (!Jalview.quiet())
+ jalview.bin.Console.outPrintln("Error parsing float property '"
+ + property + "' with value '" + string + "'");
+ }
+ }
+
+ return def;
+ }
+
/**
* Answers the value of the given property, or the supplied default value if
* the property is not set
return date_format.parse(val);
} catch (Exception ex)
{
- jalview.bin.Console.errPrintln("Invalid or corrupt date in property '"
- + propertyName + "' : value was '" + val + "'");
+ jalview.bin.Console
+ .errPrintln("Invalid or corrupt date in property '"
+ + propertyName + "' : value was '" + val + "'");
}
}
return null;
return Integer.valueOf(val);
} catch (NumberFormatException x)
{
- jalview.bin.Console.errPrintln("Invalid integer in property '" + property
- + "' (value was '" + val + "')");
+ jalview.bin.Console.errPrintln("Invalid integer in property '"
+ + property + "' (value was '" + val + "')");
}
}
return null;
private static final Collection<String> bootstrapProperties = new ArrayList<>(
Arrays.asList(JALVIEWLOGLEVEL, BOOTSTRAP_TEST));
-
public static Properties bootstrapProperties(String filename)
{
Properties bootstrapProps = new Properties();
return null;
if (!file.exists())
{
- jalview.bin.Console.errPrintln("Could not load bootstrap preferences file '"
- + filename + "'");
+ jalview.bin.Console
+ .errPrintln("Could not load bootstrap preferences file '"
+ + filename + "'");
return null;
}
}
} catch (FileNotFoundException e)
{
- jalview.bin.Console.errPrintln("Could not find bootstrap preferences file '"
- + file.getAbsolutePath() + "'");
+ jalview.bin.Console
+ .errPrintln("Could not find bootstrap preferences file '"
+ + file.getAbsolutePath() + "'");
} catch (IOException e)
{
jalview.bin.Console.errPrintln(