Bug 263544 [context] Add dependency injection context -> user object
examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/Preview.java
parent.redraw();
					}
				});
			}
		});
		parent.setLayout(new FillLayout());
		parent.addPaintListener(new PaintListener() {
			public void paintControl(PaintEvent e) {
				if (e.gc.isDisposed())
					return;
				
				e.gc.fillRectangle(new Rectangle(e.x, e.y, e.width, e.height));
				Image i = currentImage;
				if (i != null && !i.isDisposed()) {
					Rectangle imageBounds = currentImage.getBounds();
					int x = (parent.getBounds().width - imageBounds.width) / 2;
					int y = bottomImageMargin;
					if(borderColor == null)
						borderColor = new Color(e.gc.getDevice(), 229, 229, 229);
					Color lastBackground = e.gc.getBackground();
					e.gc.setBackground(borderColor);
					e.gc.fillRoundRectangle(x, y, imageBounds.width + (frameWidth * 2), imageBounds.height + (frameWidth * 2), frameWidth, frameWidth);
					e.gc.setBackground(lastBackground);
					e.gc.drawImage(i, x + frameWidth, y + frameWidth);
				}
			}
		});
		parent.addControlListener(new ControlListener() {
			public void controlMoved(ControlEvent e) {
			}