Accession
Class AccROIwizardPopup.ScrollableImageCanvas

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by Accession.AccROIwizardPopup.ScrollableImageCanvas
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Enclosing class:
AccROIwizardPopup

 class AccROIwizardPopup.ScrollableImageCanvas
extends java.awt.Canvas
implements java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

ScrollableImageCanvas class supports a scrollable canvas


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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 boolean altMod
          ALT/Mouse
 java.awt.Color colorCALCW
          Overlay color for Calibration Wedge ROI
 java.awt.Color colorCW
          Overlay color for CW ROI
 java.awt.Color colorROI
          Overlay color for working ROI
 java.awt.Color colorSPOT_LIST
          Overlay color for spot list
private  Accession cs
          instance of the main class
private  AccROIwizardPopup csi
           
 boolean ctrlMod
          CTRL/Mouse
 boolean ctrlShiftMod
          CTRL-SHIFT/Mouse
 int curLMS
          current landmark set of current spot.
 java.awt.Color cursorColor
          Overlay color for cursor
 DbSample dbS
          Sample instance structure
 java.lang.String fontFamily
           
 java.awt.Font largeFont
           
 java.awt.Font mediumFont
           
 int preferredHeight
          preferred size of canvas
 int preferredWidth
          preferred size of canvas
(package private) static long serialVersionUID
          frame id
 boolean shiftMod
          SHIFT/Mouse
 java.awt.Font smallFont
           
private  int xBase
          + base address of ULHC of clipped image in image canvas used in last paint
 int xImg
          image address (x,y)+(xBase,yBase)
private  int yBase
           
 int yImg
          image address (x,y)+(xBase,yBase)
 
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
AccROIwizardPopup.ScrollableImageCanvas(AccROIwizardPopup csi, java.awt.Image img)
          ScrollableImageCanvas() - constructor.
 
Method Summary
private  void drawROIrectangle(java.awt.Graphics g, int x1, int x2, int y1, int y2, java.awt.Color color)
          drawROIrectangle() - draw a Region Of Interest rectangle if legal
private  void drawROItic(java.awt.Graphics g, int x1, int y1, int x2, int y2, java.awt.Color color)
          drawROItic() - draw a Region Of Interest rectangle if legal
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - getPreferredSize, must be implemented for ScrollPane to be displayed correctly.
 void keyPressed(java.awt.event.KeyEvent e)
          keyPressed() - handle key down events
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
(package private)  void mapRelXYtoImage(java.awt.event.MouseEvent e)
          mapRelXYtoImage() - map (x,y)Mouse in current canvas to (xImg,yImg) as well as updating the parent.(xImg,yImg) values.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
          mouseDragged() - display data
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
          mouseMoved() - display data
 void mousePressed(java.awt.event.MouseEvent e)
          mousePressed() - display data
 void mouseReleased(java.awt.event.MouseEvent e)
          mouseReleased() - display data
 void paint(java.awt.Graphics g)
          paint() - repaint scrollable canvas in region defined by scroll bars
(package private)  java.lang.String showImageMousePositions(java.awt.event.MouseEvent e, java.lang.String msgs)
          showImageMousePositions() - show the image mouse positions Only report if debugging...
 void update(java.awt.Graphics g)
          update() - update without background the scrollable canvas
 
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, 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

serialVersionUID

static final long serialVersionUID
frame id

See Also:
Constant Field Values

csi

private AccROIwizardPopup csi

cs

private Accession cs
instance of the main class


dbS

public DbSample dbS
Sample instance structure


ctrlMod

public boolean ctrlMod
CTRL/Mouse


shiftMod

public boolean shiftMod
SHIFT/Mouse


ctrlShiftMod

public boolean ctrlShiftMod
CTRL-SHIFT/Mouse


altMod

public boolean altMod
ALT/Mouse


fontFamily

public java.lang.String fontFamily

smallFont

public java.awt.Font smallFont

mediumFont

public java.awt.Font mediumFont

largeFont

public java.awt.Font largeFont

xBase

private int xBase
+ base address of ULHC of clipped image in image canvas used in last paint


yBase

private int yBase

xImg

public int xImg
image address (x,y)+(xBase,yBase)


yImg

public int yImg
image address (x,y)+(xBase,yBase)


curLMS

public int curLMS
current landmark set of current spot. -1 if not current spot


preferredWidth

public int preferredWidth
preferred size of canvas


preferredHeight

public int preferredHeight
preferred size of canvas


cursorColor

public java.awt.Color cursorColor
Overlay color for cursor


colorROI

public java.awt.Color colorROI
Overlay color for working ROI


colorCW

public java.awt.Color colorCW
Overlay color for CW ROI


colorCALCW

public java.awt.Color colorCALCW
Overlay color for Calibration Wedge ROI


colorSPOT_LIST

public java.awt.Color colorSPOT_LIST
Overlay color for spot list

Constructor Detail

AccROIwizardPopup.ScrollableImageCanvas

AccROIwizardPopup.ScrollableImageCanvas(AccROIwizardPopup csi,
                                        java.awt.Image img)
ScrollableImageCanvas() - constructor.

Parameters:
csi - is the image scroller associated with the image
img - is the image to create
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - getPreferredSize, must be implemented for ScrollPane to be displayed correctly.

Overrides:
getPreferredSize in class java.awt.Component

showImageMousePositions

final java.lang.String showImageMousePositions(java.awt.event.MouseEvent e,
                                               java.lang.String msgs)
showImageMousePositions() - show the image mouse positions Only report if debugging...

Parameters:
e - is mouse event
msgs - is message to display
x - is image object position
y - is image object position

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
keyPressed() - handle key down events

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
e - is KeyEvent

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

mapRelXYtoImage

final void mapRelXYtoImage(java.awt.event.MouseEvent e)
mapRelXYtoImage() - map (x,y)Mouse in current canvas to (xImg,yImg) as well as updating the parent.(xImg,yImg) values. Set the lastISName for possible use elsewhere.

Parameters:
e - is mouse event
x - is image cursor
y - is image cursor

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
mousePressed() - display data

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - is MouseEvent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased() - display data

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - is MouseEvent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved() - display data

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
e - is MouseEvent

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged() - display data

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
e - is MouseEvent

update

public void update(java.awt.Graphics g)
update() - update without background the scrollable canvas

Overrides:
update in class java.awt.Canvas
Parameters:
g - is graphics context

drawROItic

private void drawROItic(java.awt.Graphics g,
                        int x1,
                        int y1,
                        int x2,
                        int y2,
                        java.awt.Color color)
drawROItic() - draw a Region Of Interest rectangle if legal

Parameters:
g - is graphics context
x1 - is ULHC
y1 - is ULHC
x2 - is LRHC
x2 - is LRHC
color - to use,

drawROIrectangle

private void drawROIrectangle(java.awt.Graphics g,
                              int x1,
                              int x2,
                              int y1,
                              int y2,
                              java.awt.Color color)
drawROIrectangle() - draw a Region Of Interest rectangle if legal

Parameters:
g - is graphics context
x1 - is ULHC
y1 - is ULHC
x2 - is LRHC
x2 - is LRHC
color - to use,

paint

public void paint(java.awt.Graphics g)
paint() - repaint scrollable canvas in region defined by scroll bars

Overrides:
paint in class java.awt.Canvas
Parameters:
g - is graphics context