MagickViewer.java
上传用户:qingzhou
上传日期:2013-04-21
资源大小:733k
文件大小:1k
- package magick.util;
- import java.awt.ScrollPane;
- import magick.MagickImage;
- /**
- * A display pane that provides a scrollable view port
- * for a MagickImage.
- *
- * @author Eric Yeo
- */
- public class MagickViewer extends ScrollPane {
-
- /**
- * This is the component that actually displays the
- * MagickImage.
- */
- MagickCanvas canvas;
-
- /**
- * Constructor.
- */
- public MagickViewer() {
- super(SCROLLBARS_AS_NEEDED);
- canvas = new MagickCanvas();
- add(canvas);
- }
-
- /**
- * Sets the display image.
- *
- * @param image the MagickImage to display.
- */
- public void setImage(MagickImage image) {
- canvas.setImage(image);
- }
- };