Java Reference
In-Depth Information
loadMapImage (gmapUrl);
};
var imgView = ImageView {
preserveRatio:true
effect: Reflection{fraction:0.25}
layoutX:(w - imgW)/2
layoutY:10
};
function loadMapImage (url:String):Void{
var http:HttpRequest = HttpRequest {
location: url;
onInput: function(is: java.io.InputStream) {
try {
if(is.available() > 0) {
var buffImg = ImageIO.read(is);
imgView.image = SwingUtils.toFXImage(buffImg);
}
} finally {
is.close();
}
}
...
};
http.start();
}
// code to build the GUI omitted (see full listing)
When the GUI controls are added to the application's scene instance, it produces the Google
Map mashup application shown in the next screenshot:
 
Search WWH ::




Custom Search