|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
ij.gui.ImageCanvas
public class ImageCanvas
This is a Canvas used to display images in a Window.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Canvas |
---|
Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static Cursor |
crosshairCursor
|
protected static Cursor |
defaultCursor
|
protected int |
dstHeight
|
protected int |
dstWidth
|
protected int |
flags
|
protected static Cursor |
handCursor
|
protected ImageJ |
ij
|
protected int |
imageHeight
|
protected boolean |
imageUpdated
|
protected int |
imageWidth
|
protected ImagePlus |
imp
|
protected double |
magnification
|
protected static Cursor |
moveCursor
|
protected Rectangle |
srcRect
|
static boolean |
usePointer
|
protected int |
xMouse
|
protected int |
xMouseStart
|
protected int |
xSrcStart
|
protected int |
yMouse
|
protected int |
yMouseStart
|
protected int |
ySrcStart
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ImageCanvas(ImagePlus imp)
|
Method Summary | |
---|---|
protected Dimension |
canEnlarge(int newWidth,
int newHeight)
|
boolean |
cursorOverImage()
Returns 'true' if the cursor is over this image. |
void |
disablePopupMenu(boolean status)
Disable/enable popup menu. |
void |
fitToWindow()
|
Point |
getCursorLoc()
Returns the current cursor location in image coordinates. |
boolean |
getCustomRoi()
|
Vector |
getDisplayList()
Deprecated. replaced by ImagePlus.getOverlay() |
static double |
getHigherZoomLevel(double currentMag)
|
ImagePlus |
getImage()
Returns the ImagePlus object that is associated with this ImageCanvas. |
static double |
getLowerZoomLevel(double currentMag)
|
double |
getMagnification()
|
int |
getModifiers()
Returns the mouse event modifiers. |
Overlay |
getOverlay()
Use ImagePlus.getOverlay(). |
boolean |
getPaintPending()
|
Dimension |
getPreferredSize()
|
boolean |
getScaleToFit()
|
static Color |
getShowAllColor()
Obsolete |
Overlay |
getShowAllList()
|
boolean |
getShowAllROIs()
Obsolete |
int |
getSliceNumber(String label)
|
Rectangle |
getSrcRect()
|
protected void |
handlePopupMenu(MouseEvent e)
|
protected void |
handleRoiMouseDown(MouseEvent e)
|
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
int |
offScreenX(int sx)
Converts a screen x-coordinate to an offscreen x-coordinate. |
double |
offScreenXD(int sx)
Converts a screen x-coordinate to a floating-point offscreen x-coordinate. |
int |
offScreenY(int sy)
Converts a screen y-coordinate to an offscreen y-coordinate. |
double |
offScreenYD(int sy)
Converts a screen y-coordinate to a floating-point offscreen y-coordinate. |
void |
paint(Graphics g)
|
void |
resetDoubleBuffer()
|
boolean |
roiManagerSelect(Roi roi,
boolean delete)
|
int |
screenX(int ox)
Converts an offscreen x-coordinate to a screen x-coordinate. |
int |
screenXD(double ox)
Converts a floating-point offscreen x-coordinate to a screen x-coordinate. |
int |
screenY(int oy)
Converts an offscreen y-coordinate to a screen y-coordinate. |
int |
screenYD(double oy)
Converts a floating-point offscreen x-coordinate to a screen x-coordinate. |
protected void |
scroll(int sx,
int sy)
|
static void |
setCursor(Cursor cursor,
int type)
Experimental |
void |
setCursor(int sx,
int sy,
int ox,
int oy)
Sets the cursor based on the current tool and cursor location. |
void |
setCustomRoi(boolean customRoi)
Allows plugins (e.g., Orthogonal_Views) to create a custom ROI using a display list. |
void |
setDisplayList(Roi roi,
Color color)
Deprecated. replaced by ImagePlus.setOverlay(Roi, Color, int, Color) |
void |
setDisplayList(Shape shape,
Color color,
BasicStroke stroke)
Deprecated. replaced by ImagePlus.setOverlay(Shape, Color, BasicStroke) |
void |
setDisplayList(Vector list)
Deprecated. replaced by ImagePlus.setOverlay(ij.gui.Overlay) |
void |
setDrawingColor(int ox,
int oy,
boolean setBackground)
Sets the foreground drawing color (or background color if 'setBackground' is true) to the color of the pixel at (ox,oy). |
void |
setDrawingSize(int width,
int height)
|
void |
setImageUpdated()
ImagePlus.updateAndDraw calls this method to force the paint() method to update the image from the ImageProcessor. |
void |
setMagnification(double magnification)
|
void |
setOverlay(Overlay overlay)
Use ImagePlus.setOverlay(ij.gui.Overlay). |
void |
setPaintPending(boolean state)
|
void |
setScaleToFit(boolean scaleToFit)
|
static void |
setShowAllColor(Color c)
Obsolete |
void |
setShowAllList(Overlay showAllList)
|
void |
setShowAllROIs(boolean showAllROIs)
Obsolete |
void |
setShowCursorStatus(boolean status)
Called by IJ.showStatus() to prevent status bar text from being overwritten until the cursor moves at least 12 pixels. |
void |
setSourceRect(Rectangle r)
|
protected void |
setupScroll(int ox,
int oy)
|
void |
unzoom()
Implements the Image/Zoom/Original Scale command. |
void |
update(Graphics g)
|
void |
zoom100Percent()
Implements the Image/Zoom/View 100% command. |
void |
zoomIn(int sx,
int sy)
Zooms in by making the window bigger. |
void |
zoomOut(int x,
int y)
Zooms out by making the source rectangle (srcRect) larger and centering it on (x,y). |
Methods inherited from class java.awt.Canvas |
---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static Cursor defaultCursor
protected static Cursor handCursor
protected static Cursor moveCursor
protected static Cursor crosshairCursor
public static boolean usePointer
protected ImagePlus imp
protected boolean imageUpdated
protected Rectangle srcRect
protected int imageWidth
protected int imageHeight
protected int xMouse
protected int yMouse
protected ImageJ ij
protected double magnification
protected int dstWidth
protected int dstHeight
protected int xMouseStart
protected int yMouseStart
protected int xSrcStart
protected int ySrcStart
protected int flags
Constructor Detail |
---|
public ImageCanvas(ImagePlus imp)
Method Detail |
---|
public void setSourceRect(Rectangle r)
public Rectangle getSrcRect()
public void setDrawingSize(int width, int height)
public void setImageUpdated()
public void setPaintPending(boolean state)
public boolean getPaintPending()
public void update(Graphics g)
update
in class Canvas
public void paint(Graphics g)
paint
in class Canvas
public int getSliceNumber(String label)
public void resetDoubleBuffer()
public Dimension getPreferredSize()
getPreferredSize
in class Component
public Point getCursorLoc()
public boolean cursorOverImage()
public int getModifiers()
public ImagePlus getImage()
public void setCursor(int sx, int sy, int ox, int oy)
public int offScreenX(int sx)
public int offScreenY(int sy)
public double offScreenXD(int sx)
public double offScreenYD(int sy)
public int screenX(int ox)
public int screenY(int oy)
public int screenXD(double ox)
public int screenYD(double oy)
public double getMagnification()
public void setMagnification(double magnification)
public void fitToWindow()
public static double getLowerZoomLevel(double currentMag)
public static double getHigherZoomLevel(double currentMag)
public void zoomIn(int sx, int sy)
protected Dimension canEnlarge(int newWidth, int newHeight)
public void zoomOut(int x, int y)
public void unzoom()
public void zoom100Percent()
protected void scroll(int sx, int sy)
public void setDrawingColor(int ox, int oy, boolean setBackground)
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
protected void setupScroll(int ox, int oy)
protected void handlePopupMenu(MouseEvent e)
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
protected void handleRoiMouseDown(MouseEvent e)
public void disablePopupMenu(boolean status)
public void setShowAllList(Overlay showAllList)
public Overlay getShowAllList()
public void setShowAllROIs(boolean showAllROIs)
public boolean getShowAllROIs()
public static Color getShowAllColor()
public static void setShowAllColor(Color c)
public static void setCursor(Cursor cursor, int type)
public void setOverlay(Overlay overlay)
public Overlay getOverlay()
public void setDisplayList(Vector list)
public void setDisplayList(Shape shape, Color color, BasicStroke stroke)
public void setDisplayList(Roi roi, Color color)
public Vector getDisplayList()
public void setCustomRoi(boolean customRoi)
public boolean getCustomRoi()
public void setShowCursorStatus(boolean status)
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public boolean roiManagerSelect(Roi roi, boolean delete)
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void setScaleToFit(boolean scaleToFit)
public boolean getScaleToFit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |