src/authoring/views/EntityBuilderView.java
private void addImage() {
		FileChooser fileChooser = new FileChooser();
		fileChooser.setTitle("Open Image File");
		fileChooser.setSelectedExtensionFilter(new ExtensionFilter("Image Filter", imageExtensions));
		File imageFile = fileChooser.showOpenDialog(this);
		try {
			data.setComponent(Sprite.class, imageFile.getName());
			DataRead.addImage(imageFile);
			Image image = SwingFXUtils.toFXImage(ImageIO.read(imageFile), null);
			updateEntityPreview(image);
			hasImage = true;
		} catch (Exception e1){
			LOGGER.log(java.util.logging.Level.SEVERE, e1.toString(), e1);
		}
	}
/**
	 * adds an image to the preview
	 */
adds an image to the preview
adds an image to the preview
private void addImage() {
		FileChooser fileChooser = new FileChooser();
		fileChooser.setTitle("Open Image File");
		fileChooser.setSelectedExtensionFilter(new ExtensionFilter("Image Filter", imageExtensions));
		File imageFile = fileChooser.showOpenDialog(this);
		try {
			data.setComponent(Sprite.class, imageFile.getName());
			DataRead.addImage(imageFile);
			Image image = SwingFXUtils.toFXImage(ImageIO.read(imageFile), null);
			updateEntityPreview(image);
			hasImage = true;
		} catch (Exception e1){
			LOGGER.log(java.util.logging.Level.SEVERE, e1.toString(), e1);
		}
	}
private void addImage ( ) { FileChooser fileChooser = new FileChooser ( ) ; fileChooser . setTitle ( "Open Image File" ) ; fileChooser . setSelectedExtensionFilter ( new ExtensionFilter ( "Image Filter" , imageExtensions ) ) ; File imageFile = fileChooser . showOpenDialog ( this ) ; try { data . setComponent ( Sprite . class , imageFile . getName ( ) ) ; DataRead . addImage ( imageFile ) ; Image image = SwingFXUtils . toFXImage ( ImageIO . read ( imageFile ) , null ) ; updateEntityPreview ( image ) ; hasImage = true ; } catch ( Exception e1 ) { LOGGER . log ( java . util . logging . Level . SEVERE , e1 . toString ( ) , e1 ) ; } }
adds an image to the preview
adds an image to the preview