Skip to content

Instantly share code, notes, and snippets.

@iromu
Created February 19, 2013 15:55
Show Gist options
  • Save iromu/4987105 to your computer and use it in GitHub Desktop.
Save iromu/4987105 to your computer and use it in GitHub Desktop.
private Node createPage(int pageIndex) {
ProgressiveImageView iv = null;
try {
String s = files.get(pageIndex).toUri().toURL().toExternalForm();
String p = placeholders.get(pageIndex).toUri().toURL().toExternalForm();
iv = new ProgressiveImageView(s, p);
} catch (MalformedURLException e) {
e.printStackTrace();// TODO, I feel too lazy today
}
iv.setPreserveRatio(true);
iv.setSmooth(true);
iv.fitWidthProperty().bind(pagination.widthProperty());
iv.fitHeightProperty().bind(pagination.heightProperty());
return iv;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment