All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ij.gui.ImageCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----ij.gui.ImageCanvas

public class ImageCanvas
extends Canvas
implements MouseListener, MouseMotionListener

Constructor Index

 o ImageCanvas(ImagePlus)

Method Index

 o drawImage(Graphics)
 o getCursorLoc()
Returns the current cursor location.
 o getMagnification()
 o getSrcRect()
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mouseMoved(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o offScreenX(int)
Converts a screen x-coordinate to an offscreen x-coordinate.
 o offScreenY(int)
Converts a screen y-coordinate to an offscreen y-coordinate.
 o paint(Graphics)
Paints the canvas in the default background color.
 o preferredSize()
 o print(Graphics)
Prints this component.
 o screenX(int)
Converts an offscreen x-coordinate to a screen x-coordinate.
 o screenY(int)
Converts an offscreen y-coordinate to a screen y-coordinate.
 o setCursor(int, int)
Sets the cursor based on the current tool and cursor location.
 o setDrawingSize(int, int)
 o setMagnification(double)
 o update(Graphics)
Updates the component.
 o zoomIn(int, int)
Zooms in by making the window bigger.

Constructors

 o ImageCanvas
 public ImageCanvas(ImagePlus imp)

Methods

 o setDrawingSize
 public void setDrawingSize(int width,
                            int height)
 o update
 public void update(Graphics g)
Updates the component.

Overrides:
update in class Component
 o print
 public void print(Graphics g)
Prints this component.

Overrides:
print in class Component
 o paint
 public void paint(Graphics g)
Paints the canvas in the default background color.

Overrides:
paint in class Canvas
 o preferredSize
 public Dimension preferredSize()
Overrides:
preferredSize in class Component
 o getCursorLoc
 public Point getCursorLoc()
Returns the current cursor location.

 o setCursor
 public void setCursor(int x,
                       int y)
Sets the cursor based on the current tool and cursor location.

 o offScreenX
 public int offScreenX(int x)
Converts a screen x-coordinate to an offscreen x-coordinate.

 o offScreenY
 public int offScreenY(int y)
Converts a screen y-coordinate to an offscreen y-coordinate.

 o screenX
 public int screenX(int x)
Converts an offscreen x-coordinate to a screen x-coordinate.

 o screenY
 public int screenY(int y)
Converts an offscreen y-coordinate to a screen y-coordinate.

 o getMagnification
 public double getMagnification()
 o setMagnification
 public void setMagnification(double magnification)
 o getSrcRect
 public Rectangle getSrcRect()
 o zoomIn
 public void zoomIn(int x,
                    int y)
Zooms in by making the window bigger. If we can't make it bigger, then make the srcRect smaller.

 o drawImage
 public void drawImage(Graphics g)
 o mousePressed
 public void mousePressed(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o mouseDragged
 public void mouseDragged(MouseEvent e)
 o mouseReleased
 public void mouseReleased(MouseEvent e)
 o mouseMoved
 public void mouseMoved(MouseEvent e)
 o mouseClicked
 public void mouseClicked(MouseEvent e)
 o mouseEntered
 public void mouseEntered(MouseEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index