magick.util
Class MagickCanvas

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--magick.util.MagickCanvas

public class MagickCanvas
extends Canvas

This class a specialisation of Canvas to display MagickImage in AWT.

Author:
Eric Yeo

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
MagickCanvas()
          Constructor.

Method Summary
 DimensiongetPreferredSize()
          Return the preferred size of the Canvas.
 voidpaint(Graphics g)
          Method to draw the image onto the Canvas.
 voidsetImage(MagickImage magickImage)
          Set the viewing image.

Methods inherited from class java.awt.Canvas
addNotify, getAccessibleContext

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getGraphicsConfiguration, getTreeLock, getToolkit, isValid, isDisplayable, isVisible, isShowing, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, show, hide, getForeground, setForeground, getBackground, setBackground, getFont, setFont, getLocale, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, doLayout, layout, validate, invalidate, getGraphics, getFontMetrics, setCursor, getCursor, update, paintAll, repaint, repaint, repaint, repaint, print, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, getComponentAt, locate, getComponentAt, deliverEvent, dispatchEvent, postEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getListeners, getInputMethodRequests, getInputContext, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, removeNotify, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, remove, toString, list, list, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

MagickCanvas

public MagickCanvas()
Constructor.
Method Detail

getPreferredSize

public Dimension getPreferredSize()
Return the preferred size of the Canvas.

paint

public void paint(Graphics g)
Method to draw the image onto the Canvas.
Parameters:
g the Graphics object for drawing

setImage

public void setImage(MagickImage magickImage)
Set the viewing image.
Parameters:
magickImage the MagickImage to view

Association Links

to Class java.awt.Image

The AWT version of the image.

JMagick