|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
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 javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static boolean |
usePointer
|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
boolean |
cursorOverImage()
Returns 'true' if the cursor is over this image. |
void |
disablePopupMenu(boolean status)
Disable/enable popup menu. |
void |
fitToWindow()
|
java.awt.Point |
getCursorLoc()
Returns the current cursor location in image coordinates. |
boolean |
getCustomRoi()
|
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()
|
boolean |
getMagnifier()
Returns true if this is a Magnifier is selected. |
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()
Return the ROI Manager "Show All" list as an overlay. |
boolean |
getShowAllROIs()
Returns the state of the ROI Manager "Show All" flag. |
int |
getSliceNumber(java.lang.String label)
|
java.awt.Rectangle |
getSrcRect()
|
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)
|
void |
resetDoubleBuffer()
|
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. |
void |
set2Magnifier(java.lang.String title)
|
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) |
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)
|
static void |
setMagnifier(boolean isMag)
This is a version of setMagnifier() that accepts a Boolean argument. |
void |
setOverlay(Overlay overlay)
Use ImagePlus.setOverlay(ij.gui.Overlay). |
static void |
setShowAllColor(java.awt.Color c)
Sets the color used used for the ROI Manager "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)
|
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 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 javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean usePointer
Constructor Detail |
---|
public ImageCanvas(ImagePlus imp)
Method Detail |
---|
public void setSourceRect(java.awt.Rectangle r)
public java.awt.Rectangle getSrcRect()
public void setDrawingSize(int width, int height)
public void setImageUpdated()
public void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public int getSliceNumber(java.lang.String label)
public void resetDoubleBuffer()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.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 static void setMagnifier(boolean isMag)
public boolean getMagnifier()
public void set2Magnifier(java.lang.String title)
public void fitToWindow()
public static double getLowerZoomLevel(double currentMag)
public static double getHigherZoomLevel(double currentMag)
public void zoomIn(int sx, int sy)
public void zoomOut(int x, int y)
public void unzoom()
public void zoom100Percent()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
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
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 boolean getCustomRoi()
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 mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |