Accession
Class AccROIwizardPopup

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by Accession.AccROIwizardPopup
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class AccROIwizardPopup
extends java.awt.Frame
implements java.awt.event.ItemListener, java.awt.event.ActionListener, java.awt.event.WindowListener

See Also:
Serialized Form

Nested Class Summary
(package private)  class AccROIwizardPopup.ScrollableImageCanvas
          ScrollableImageCanvas class supports a scrollable canvas
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.awt.Adjustable aH
           
private  java.awt.Adjustable aV
           
static boolean changedCalCWroiFlag
          Flag indicates changed the calibration wedge CW ROI.
static boolean changedCWroiFlag
          Flag indicates changed the CW ROI.
 boolean changeGuiFlag
          flag to indicating that the GUI may have changed and that it should be rebuilt.
 java.awt.Panel controlPanel
          Control panel for the main frame
 Accession cs
          instance of the main class
 int cwx1
          local ULHC CW ROI window.
 int cwx2
          local LRHC CW ROI window.
 int cwy1
          local ULHC CW ROI window.
 int cwy2
          local LRHC CW ROI window.
 DbSample dbS
          Sample to display.
 java.lang.String dispName
          Name of image to display "Rsample" or "Sample"
 char[] dispPixC
          Picture buffer char[] of image to display .
static boolean doingCWroiFlag
          Flag indicates working on the CW ROI, else on the ND CW ROI
 java.awt.Checkbox drawCalCWroiCB
          the "Draw CAL CW ROI" checkbox
 boolean drawCalCWroiFlag
          set from "Draw calibration wedge ROI overlay" checkbox and checkbox menu item.
 java.awt.Checkbox drawCWroiCB
          the "Draw CW ROI" checkbox
 boolean drawCWroiFlag
          set from "Draw CW ROI" checkbox
 boolean drawMeasSpotListFlag
          set from "Draw spot list overlays" checkbox menu item.
 boolean drawMeasSpotListLabelsFlag
          set from "Draw measured spot labels overlays" checkbox menu item
 java.awt.Checkbox drawRoiCB
          the "Draw ROI" checkbox
 boolean drawRoiFlag
          set from "Draw ROI" checkbox
 java.awt.Menu fileMenu
          "File" pull down Menu list
 java.lang.String fontFamily
           
 java.awt.Menu helpMenu
          "Help" pull down Menu list
 boolean isVisibleFlag
          Set true if window is visible
 java.awt.Font largeFont
           
 boolean logReportFlag
          set from "Log report" checkbox menu item
(package private)  java.awt.MenuBar mbar
          menu bar for the frame
 java.awt.Font mediumFont
           
 MenuSupport ms
          Menu support functions using Hashtables to tack what is active.
private  java.awt.TextArea msgTextArea
          Text area GUI for message rporting
(package private) static int NCOLS
           
 int nPixels
          The pixWidth*pixHeight
(package private) static int NROWS
          size of the text area in characters
 java.lang.String oGifFileName
          Full path of image to "Save image" in
 java.awt.Image pImg
          Image to display
 int pixHeight
          The width of the current image
 int pixWidth
          The width of the current image
 java.awt.Menu roiMenu
          "Roi" pull down Menu list
 int roiX1
          ULHC ROI window set by (C-U).
 int roiX2
          LRHC ROI window set by (C-L).
 int roiY1
          ULHC ROI window set by (C-U).
 int roiY2
          LRHC ROI window set by (C-L).
(package private) static long serialVersionUID
          frame id
private  AccROIwizardPopup.ScrollableImageCanvas siCanvas
          ScrollableImageCanvas to hold the image
 java.awt.Font smallFont
           
private  java.awt.ScrollPane sp
          Scroll pane to hold the image
 java.awt.Menu spotListMenu
          "Spot list" pull down Menu list
private  int textAreaFontSize
          font size
private  java.lang.String textFontFamily
          font family for message window
 java.awt.Checkbox useLogCB
          the "Use log" checkbox
 boolean useLogFlag
          set from "Use log" checkbox
 boolean useSaveImageFlag
          set from "Save image" Command
 int VIEW_HEIGHT
          Height of the frame
 int VIEW_WIDTH
          Width of the frame
 int viewHeight
           
 java.awt.Menu viewMenu
          "View" pull down Menu list
 int viewWidth
           
 int windmpSize
          Code for winDump size.
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
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(Accession cs, DbSample dbS)
          AccROIwizardPopup() - Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
private  void addMenuTree(java.awt.Frame f, java.awt.MenuBar mbar)
          addMenuTree() - create pull down menus in menu bar
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          adjustmentValueChanged() - handle ImageScroller scroll events.
 boolean buildImageGUI()
          buildImageGUI() - Build the ImageViewer GUI
 void clearWorkingROI()
          clearWorkingROI() - clear the working ROI\ to -1's.
 void close(boolean tryToSaveFlag)
          close() - close this popup and reset flags
 boolean forceROIUpperAndLowerCorners()
          forceROIUpperAndLowerCorners() - reorder the ROI so that (roiX1,roiY1) < (roiX2,roiY2)
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.
 boolean isValidCW()
          isValidCW() - check if current Computing Window (CW) is valid
 boolean isValidROI()
          isValidROI() - check if current region of interest (ROI) is valid
 boolean isValidROI(int rX1, int rY1, int rX2, int rY2)
          isValidROI() - check if current region of interest (ROI) is valid
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.
 void paint(java.awt.Graphics g)
          paint() - repaint scrollable canvas in region defined by scroll bars
 java.lang.String pixNxNtoStr(int x, int y, int n, int radix, java.lang.String title)
          pixNxNtoStr() - convert current char[] picture of size nXn to string.
 void positionImageWindow()
          positionImageWindow() - position image window on the screen
 void setMeasureSizeGUI(int size, boolean recalcMeasurementsFlag, boolean useCommonSpotSizeFlag)
          setMeasureSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes
 boolean setPixDatabase(DbSample dbS)
          setPixDatabase() - setup the picture database sample
 boolean setROI(int rX1, int rY1, int rX2, int rY2)
          setROI() - set computing window region of interest (ROI)
 boolean setROI2CALCW(int rX1, int rY1, int rX2, int rY2)
          setROI2CALCW() - set Calibration wedge computing window ROI
 boolean setROI2CW(int rX1, int rY1, int rX2, int rY2)
          setROI2CW() - set region of interest (ROI) to Computing Window (CW)
private  boolean setupSampleROIs()
          setupSampleROIs() - setup the CW ROI and the Calibration Wedge ROI.
 void setWindmpSizeGUI(int size)
          setWindmpSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes
 void showImgMsg(java.lang.String msg)
          showImgMsg() - display the msg in text area window
 boolean showROIimageGUI()
          showROIimageGUI() - show the Image Viewer GUI window
 void update(java.awt.Graphics g)
          update() - update without background the scrollable canvas
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
          windowClosing() - closing down the window, get rid of the frame.
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

serialVersionUID

static final long serialVersionUID
frame id

See Also:
Constant Field Values

cs

public Accession cs
instance of the main class


changeGuiFlag

public boolean changeGuiFlag
flag to indicating that the GUI may have changed and that it should be rebuilt.


VIEW_WIDTH

public final int VIEW_WIDTH
Width of the frame

See Also:
Constant Field Values

VIEW_HEIGHT

public final int VIEW_HEIGHT
Height of the frame

See Also:
Constant Field Values

NROWS

static final int NROWS
size of the text area in characters

See Also:
Constant Field Values

NCOLS

static final int NCOLS
See Also:
Constant Field Values

mbar

java.awt.MenuBar mbar
menu bar for the frame


fileMenu

public java.awt.Menu fileMenu
"File" pull down Menu list


viewMenu

public java.awt.Menu viewMenu
"View" pull down Menu list


roiMenu

public java.awt.Menu roiMenu
"Roi" pull down Menu list


spotListMenu

public java.awt.Menu spotListMenu
"Spot list" pull down Menu list


helpMenu

public java.awt.Menu helpMenu
"Help" pull down Menu list


controlPanel

public java.awt.Panel controlPanel
Control panel for the main frame


ms

public MenuSupport ms
Menu support functions using Hashtables to tack what is active.


sp

private java.awt.ScrollPane sp
Scroll pane to hold the image


aH

private java.awt.Adjustable aH

aV

private java.awt.Adjustable aV

siCanvas

private AccROIwizardPopup.ScrollableImageCanvas siCanvas
ScrollableImageCanvas to hold the image


msgTextArea

private java.awt.TextArea msgTextArea
Text area GUI for message rporting


textAreaFontSize

private int textAreaFontSize
font size


textFontFamily

private java.lang.String textFontFamily
font family for message window


fontFamily

public java.lang.String fontFamily

smallFont

public java.awt.Font smallFont

mediumFont

public java.awt.Font mediumFont

largeFont

public java.awt.Font largeFont

dispName

public java.lang.String dispName
Name of image to display "Rsample" or "Sample"


dispPixC

public char[] dispPixC
Picture buffer char[] of image to display . Note this is read either from the pix? variable or from the file if the pix? variable is null.


dbS

public DbSample dbS
Sample to display. /** Sample instance structure


pixWidth

public int pixWidth
The width of the current image


pixHeight

public int pixHeight
The width of the current image


nPixels

public int nPixels
The pixWidth*pixHeight


windmpSize

public int windmpSize
Code for winDump size. 0 is off, sizes 3x3 to 21z21 are legal


oGifFileName

public java.lang.String oGifFileName
Full path of image to "Save image" in


isVisibleFlag

public boolean isVisibleFlag
Set true if window is visible


drawRoiCB

public java.awt.Checkbox drawRoiCB
the "Draw ROI" checkbox


drawRoiFlag

public boolean drawRoiFlag
set from "Draw ROI" checkbox


drawCWroiCB

public java.awt.Checkbox drawCWroiCB
the "Draw CW ROI" checkbox


drawCWroiFlag

public boolean drawCWroiFlag
set from "Draw CW ROI" checkbox


drawCalCWroiCB

public java.awt.Checkbox drawCalCWroiCB
the "Draw CAL CW ROI" checkbox


drawCalCWroiFlag

public boolean drawCalCWroiFlag
set from "Draw calibration wedge ROI overlay" checkbox and checkbox menu item.


drawMeasSpotListFlag

public boolean drawMeasSpotListFlag
set from "Draw spot list overlays" checkbox menu item.


drawMeasSpotListLabelsFlag

public boolean drawMeasSpotListLabelsFlag
set from "Draw measured spot labels overlays" checkbox menu item


useLogCB

public java.awt.Checkbox useLogCB
the "Use log" checkbox


useLogFlag

public boolean useLogFlag
set from "Use log" checkbox


useSaveImageFlag

public boolean useSaveImageFlag
set from "Save image" Command


logReportFlag

public boolean logReportFlag
set from "Log report" checkbox menu item


viewWidth

public int viewWidth

viewHeight

public int viewHeight

pImg

public java.awt.Image pImg
Image to display


doingCWroiFlag

public static boolean doingCWroiFlag
Flag indicates working on the CW ROI, else on the ND CW ROI


changedCWroiFlag

public static boolean changedCWroiFlag
Flag indicates changed the CW ROI.


changedCalCWroiFlag

public static boolean changedCalCWroiFlag
Flag indicates changed the calibration wedge CW ROI.


roiX1

public int roiX1
ULHC ROI window set by (C-U). Note (C-C) clears this.


roiY1

public int roiY1
ULHC ROI window set by (C-U). Note (C-C) clears this.


roiX2

public int roiX2
LRHC ROI window set by (C-L). Note (C-C) clears this.


roiY2

public int roiY2
LRHC ROI window set by (C-L). Note (C-C) clears this.


cwx1

public int cwx1
local ULHC CW ROI window. (C-W) sets ROI to the CW ROI.


cwy1

public int cwy1
local ULHC CW ROI window. (C-W) sets ROI to the CW ROI.


cwx2

public int cwx2
local LRHC CW ROI window. (C-W) sets ROI to the CW ROI.


cwy2

public int cwy2
local LRHC CW ROI window. (C-W) sets ROI to the CW ROI.

Constructor Detail

AccROIwizardPopup

public AccROIwizardPopup(Accession cs,
                         DbSample dbS)
AccROIwizardPopup() - Constructor

Parameters:
cs - is an instance of the main class
dbS - is the sample to use
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.

Overrides:
getPreferredSize in class java.awt.Container
Returns:
frame size

setPixDatabase

public boolean setPixDatabase(DbSample dbS)
setPixDatabase() - setup the picture database sample

Parameters:
dbS - is the sample to use
Returns:
true if succeed

setupSampleROIs

private boolean setupSampleROIs()
setupSampleROIs() - setup the CW ROI and the Calibration Wedge ROI. Reset the state to unchanged.

Returns:
true if succeed

showROIimageGUI

public boolean showROIimageGUI()
showROIimageGUI() - show the Image Viewer GUI window

Returns:
true if succeed

buildImageGUI

public boolean buildImageGUI()
buildImageGUI() - Build the ImageViewer GUI


addMenuTree

private void addMenuTree(java.awt.Frame f,
                         java.awt.MenuBar mbar)
addMenuTree() - create pull down menus in menu bar

Parameters:
f - is frame
mbar - is MenuBar

showImgMsg

public void showImgMsg(java.lang.String msg)
showImgMsg() - display the msg in text area window

Parameters:
msg - to display

positionImageWindow

public void positionImageWindow()
positionImageWindow() - position image window on the screen


setMeasureSizeGUI

public void setMeasureSizeGUI(int size,
                              boolean recalcMeasurementsFlag,
                              boolean useCommonSpotSizeFlag)
setMeasureSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes

Parameters:
size - is the size X size window in the range of 3 to 29.
recalcMeasurementsFlag - to recompute the measurements with the new size
useCommonSpotSizeFlag - to use same size for all spot measurements

close

public void close(boolean tryToSaveFlag)
close() - close this popup and reset flags

Parameters:
tryToSaveFlag - try to save CW and NDCW if needed

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - closing down the window, get rid of the frame.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - is window closing event
See Also:
close(boolean)

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

update

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

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

paint

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

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

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged() - handle ImageScroller scroll events. Handle ImageScroller scroll events & cause repaint of canvas. If we are using the scroll bar for this canvas, then set the obj position for use by other canvas for the same image. Handle the delay scrollbar as well if it exists.

Parameters:
e - is adjustment event for scroll bars

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - is ItemEvent

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle button clicks

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - is action evet

setWindmpSizeGUI

public void setWindmpSizeGUI(int size)
setWindmpSizeGUI() - set checkbox radio button and Choice selected and process event for windmp size checkboxes

Parameters:
size - is the size X size window in the range of 3 to 21. If size is < 3, then set to none.

clearWorkingROI

public void clearWorkingROI()
clearWorkingROI() - clear the working ROI\ to -1's.


setROI

public boolean setROI(int rX1,
                      int rY1,
                      int rX2,
                      int rY2)
setROI() - set computing window region of interest (ROI)

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate
Returns:
true if succeed.

setROI2CW

public boolean setROI2CW(int rX1,
                         int rY1,
                         int rX2,
                         int rY2)
setROI2CW() - set region of interest (ROI) to Computing Window (CW)

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate
Returns:
true if succeed.

setROI2CALCW

public boolean setROI2CALCW(int rX1,
                            int rY1,
                            int rX2,
                            int rY2)
setROI2CALCW() - set Calibration wedge computing window ROI

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate
Returns:
true if succeed.

forceROIUpperAndLowerCorners

public boolean forceROIUpperAndLowerCorners()
forceROIUpperAndLowerCorners() - reorder the ROI so that (roiX1,roiY1) < (roiX2,roiY2)

Returns:
true if successful, false if ROI is not fully defined.

isValidROI

public boolean isValidROI()
isValidROI() - check if current region of interest (ROI) is valid

Returns:
true if valid

isValidROI

public boolean isValidROI(int rX1,
                          int rY1,
                          int rX2,
                          int rY2)
isValidROI() - check if current region of interest (ROI) is valid

Parameters:
rX1 - - ULHC x coordinate
rY1 - - ULHC y coordinate
rX2 - - LRHC x coordinate
rY2 - - LRHC y coordinate
Returns:
true if valid

isValidCW

public boolean isValidCW()
isValidCW() - check if current Computing Window (CW) is valid

Returns:
true if valid

pixNxNtoStr

public final java.lang.String pixNxNtoStr(int x,
                                          int y,
                                          int n,
                                          int radix,
                                          java.lang.String title)
pixNxNtoStr() - convert current char[] picture of size nXn to string.

Parameters:
x - is the center X of the neighborhood
y - is the center Y of the neighborhood
n - is the size of the (n X n) neighborhood (n is >=3 and is ODD!)
radix - is Util.SHOW_OCTAL, SHOW_DECIMAL, SHOW_HEX or SHOW_OD
title - is the header for the output window
Returns:
window else null if no data or problem