|
||||||||||
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 |
---|
java.awt.Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static java.awt.Cursor |
crosshairCursor
|
protected static java.awt.Cursor |
defaultCursor
|
protected int |
dstHeight
|
protected int |
dstWidth
|
protected int |
flags
|
protected static java.awt.Cursor |
handCursor
|
protected ImageJ |
ij
|
protected int |
imageHeight
|
protected boolean |
imageUpdated
|
protected int |
imageWidth
|
protected ImagePlus |
imp
|
protected double |
magnification
|
protected static java.awt.Cursor |
moveCursor
|
protected java.awt.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 java.awt.Dimension |
canEnlarge(int newWidth,
int newHeight)
|
void |
disablePopupMenu(boolean status)
Disable/enable popup menu. |
void |
fitToWindow()
|
java.awt.Point |
getCursorLoc()
Returns the current cursor location in image coordinates. |
java.util.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(). |
java.awt.Dimension |
getPreferredSize()
|
static java.awt.Color |
getShowAllColor()
Returns the color used for "Show All" mode. |
Overlay |
getShowAllList()
|
boolean |
getShowAllROIs()
Returns the state of the ROI Manager "Show All" flag. |
int |
getSliceNumber(java.lang.String label)
|
java.awt.Rectangle |
getSrcRect()
|
protected void |
handlePopupMenu(java.awt.event.MouseEvent e)
|
protected void |
handleRoiMouseDown(java.awt.event.MouseEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.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(java.awt.Graphics g)
|
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)
|
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,
java.awt.Color color)
Deprecated. replaced by ImagePlus.setOverlay(Roi, Color, int, Color) |
void |
setDisplayList(java.awt.Shape shape,
java.awt.Color color,
java.awt.BasicStroke stroke)
Deprecated. replaced by ImagePlus.setOverlay(Shape, Color, BasicStroke) |
void |
setDisplayList(java.util.Vector list)
Deprecated. replaced by ImagePlus.setOverlay(ij.gui.Overlay) |
protected void |
setDrawingColor(int ox,
int oy,
boolean setBackground)
|
void |
setDrawingSize(int width,
int height)
|
void |
setImageUpdated()
ImagePlus.updateAndDraw calls this method to get paint to update the image from the ImageProcessor. |
void |
setMagnification(double magnification)
|
void |
setOverlay(Overlay overlay)
Use ImagePlus.setOverlay(ij.gui.Overlay). |
static void |
setShowAllColor(java.awt.Color c)
Sets the color used used for "Show All" mode. |
void |
setShowAllROIs(boolean showAllROIs)
Enables/disables the ROI Manager "Show All" mode. |
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(java.awt.Rectangle r)
|
protected void |
setupScroll(int ox,
int oy)
|
void |
unzoom()
Implements the Image/Zoom/Original Scale command. |
void |
update(java.awt.Graphics g)
|
void |
zoom100Percent()
Implements the Image/Zoom/View 100% command. |
void |
zoomIn(int x,
int y)
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.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.awt.Cursor defaultCursor
protected static java.awt.Cursor handCursor
protected static java.awt.Cursor moveCursor
protected static java.awt.Cursor crosshairCursor
public static boolean usePointer
protected ImagePlus imp
protected boolean imageUpdated
protected java.awt.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(java.awt.Rectangle r)
public void setDrawingSize(int width, int height)
public void setImageUpdated()
public void update(java.awt.Graphics g)
update
in class java.awt.Canvas
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
public int getSliceNumber(java.lang.String label)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public java.awt.Point getCursorLoc()
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 java.awt.Rectangle getSrcRect()
public void fitToWindow()
public static double getLowerZoomLevel(double currentMag)
public static double getHigherZoomLevel(double currentMag)
public void zoomIn(int x, int y)
protected java.awt.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)
protected void setDrawingColor(int ox, int oy, boolean setBackground)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
protected void setupScroll(int ox, int oy)
protected void handlePopupMenu(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
protected void handleRoiMouseDown(java.awt.event.MouseEvent e)
public void disablePopupMenu(boolean status)
public void setShowAllROIs(boolean showAllROIs)
public boolean getShowAllROIs()
public Overlay getShowAllList()
public static java.awt.Color getShowAllColor()
public static void setShowAllColor(java.awt.Color c)
public void setOverlay(Overlay overlay)
public Overlay getOverlay()
public void setDisplayList(java.util.Vector list)
public void setDisplayList(java.awt.Shape shape, java.awt.Color color, java.awt.BasicStroke stroke)
public void setDisplayList(Roi roi, java.awt.Color color)
public java.util.Vector getDisplayList()
public void setCustomRoi(boolean customRoi)
public void setShowCursorStatus(boolean status)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |