Bug 263856 Assorted photo demo micro-fixes
examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/Thumbnails.java
});
	}
	private Point getBestSize(int originalX, int originalY, int maxX, int maxY) {
		double widthRatio = (double) originalX / (double) maxX;
		double heightRatio = (double) originalY / (double) maxY;
		double bestRatio = widthRatio > heightRatio ? widthRatio : heightRatio;
		int newWidth = (int) ((double) originalX / bestRatio);
		int newHeight = (int) ((double) originalY / bestRatio);
		return new Point(newWidth, newHeight);
	}
	public void setInput(IContainer input) {
		if (input == null) {
			return;
		}
		
		
		if (input != this.input) {
			this.input = (IContainer) input;
			this.runnable = null;
			try {
				IContainer container = (IContainer) input;
				IResource[] members;
				members = container.members();
				gallery.removeAll();
				group = new GalleryItem(gallery, SWT.NONE);
				group.setExpanded(true);
				final List images = new ArrayList();
				for (int i = 0; i < members.length; i++) {
					IResource resource = members[i];
					if (resource.getType() == IResource.FILE) {