|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas ij.gui.ImageCanvas pointAction
class pointAction
This class is responsible for dealing with the mouse events relative to the image 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 | |
---|---|
private boolean |
active
|
protected static int |
ADD_CROSS
|
protected static int |
FILE
|
private ij.ImagePlus |
imp
|
protected static int |
MAGNIFIER
|
protected static int |
MONOSLICE
|
protected static int |
MOVE_CROSS
|
protected static int |
MULTISLICE
|
private pointHandler[] |
ph
|
protected static int |
REMOVE_CROSS
|
private static long |
serialVersionUID
|
private pointToolbar |
tb
|
protected static int |
TERMINATE
|
Fields inherited from class ij.gui.ImageCanvas |
---|
crosshairCursor, defaultCursor, dstHeight, dstWidth, flags, handCursor, ij, imageHeight, imageUpdated, imageWidth, magnification, moveCursor, srcRect, usePointer, xMouse, xMouseStart, xSrcStart, yMouse, yMouseStart, 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 | |
---|---|
protected |
pointAction(ij.ImagePlus imp,
pointHandler[] ph,
pointToolbar tb)
This constructor stores a local copy of its parameters and initializes the current control. |
Method Summary | |
---|---|
void |
focusGained(java.awt.event.FocusEvent e)
Listen to focusGained events. |
void |
focusLost(java.awt.event.FocusEvent e)
Listen to focusGained events. |
private java.lang.String |
getValueAsString(int x,
int y)
|
protected boolean |
isActive()
Return true if the window is active. |
void |
keyPressed(java.awt.event.KeyEvent e)
Listen to keyPressed events. |
void |
keyReleased(java.awt.event.KeyEvent e)
Listen to keyReleased events. |
void |
keyTyped(java.awt.event.KeyEvent e)
Listen to keyTyped events. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Listen to mouseClicked events. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Listen to mouseDragged events. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Listen to mouseEntered events. |
void |
mouseExited(java.awt.event.MouseEvent e)
Listen to mouseExited events. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Listen to mouseMoved events. |
void |
mousePressed(java.awt.event.MouseEvent e)
Listen to mousePressed events. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Listen to mouseReleased events. |
private void |
setControl()
|
private int |
sieveColors()
|
private void |
updateStatus()
|
Methods inherited from class ij.gui.ImageCanvas |
---|
canEnlarge, cursorOverImage, disablePopupMenu, fitToWindow, getCursorLoc, getCustomRoi, getDisplayList, getHigherZoomLevel, getImage, getLowerZoomLevel, getMagnification, getModifiers, getOverlay, getPreferredSize, getShowAllColor, getShowAllList, getShowAllROIs, getSliceNumber, getSrcRect, handlePopupMenu, handleRoiMouseDown, offScreenX, offScreenXD, offScreenY, offScreenYD, paint, resetDoubleBuffer, roiManagerSelect, screenX, screenXD, screenY, screenYD, scroll, setCursor, setCursor, setCustomRoi, setDisplayList, setDisplayList, setDisplayList, setDrawingColor, setDrawingSize, setImageUpdated, setMagnification, setOverlay, setShowAllColor, setShowAllList, setShowAllROIs, setShowCursorStatus, setSourceRect, setupScroll, unzoom, update, zoom100Percent, zoomIn, zoomOut |
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 final int ADD_CROSS
protected static final int MOVE_CROSS
protected static final int REMOVE_CROSS
protected static final int MONOSLICE
protected static final int MULTISLICE
protected static final int FILE
protected static final int TERMINATE
protected static final int MAGNIFIER
private ij.ImagePlus imp
private pointHandler[] ph
private pointToolbar tb
private boolean active
private static final long serialVersionUID
Constructor Detail |
---|
protected pointAction(ij.ImagePlus imp, pointHandler[] ph, pointToolbar tb)
imp
- ImagePlus
object where points are being picked.ph
- pointHandler
object that handles operations.tb
- pointToolbar
object that handles the toolbar.Method Detail |
---|
public void focusGained(java.awt.event.FocusEvent e)
focusGained
events.
focusGained
in interface java.awt.event.FocusListener
e
- Ignored.public void focusLost(java.awt.event.FocusEvent e)
focusGained
events.
focusLost
in interface java.awt.event.FocusListener
e
- Ignored.public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
events.
keyPressed
in interface java.awt.event.KeyListener
e
- The expected key codes are as follows:
KeyEvent.VK_DELETE
: remove the current landmark;KeyEvent.VK_BACK_SPACE
: remove the current landmark;KeyEvent.VK_COMMA
: display the previous slice, if any;KeyEvent.VK_DOWN
: move down the current landmark;KeyEvent.VK_LEFT
: move the current landmark to the left;KeyEvent.VK_PERIOD
: display the next slice, if any;KeyEvent.VK_RIGHT
: move the current landmark to the
right;KeyEvent.VK_SPACE
: select the current landmark;KeyEvent.VK_UP
: move up the current landmark.public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
events.
keyReleased
in interface java.awt.event.KeyListener
e
- Ignored.public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
events.
keyTyped
in interface java.awt.event.KeyListener
e
- Ignored.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
events.
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class ij.gui.ImageCanvas
e
- Ignored.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
events.
mouseEntered
in interface java.awt.event.MouseListener
mouseEntered
in class ij.gui.ImageCanvas
e
- Ignored.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
events. Clear the ImageJ status
bar.
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class ij.gui.ImageCanvas
e
- Event.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
events. Perform the relevant
action.
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class ij.gui.ImageCanvas
e
- Event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
events.
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class ij.gui.ImageCanvas
e
- Ignored.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
events. Move the current point
and refresh the image window.
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class ij.gui.ImageCanvas
e
- Event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
events. Update the ImageJ status
bar.
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class ij.gui.ImageCanvas
e
- Event.protected boolean isActive()
private java.lang.String getValueAsString(int x, int y)
private void setControl()
private int sieveColors()
private void updateStatus()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |