Accession
Class AccACCwizardPopup

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.AccACCwizardPopup
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

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

Class AccACCwizardPopup implements a popup GUI to create and edit the sample annotation used in the accessioning program. NOTE: in the future this will be depricated in favor of using PEDRo or a similar XML database editor program.

 [TODO] 
 For accession information, this code will either invoke
    a) initial single accession information Q&A window, or 
    a.1) Make dynamic list of acc fields. Refactor so can add/remove
         fields from Table file. Integrate into Accession.xml.
         [CHECK] effect on other Open2Dprot applications. Make
         hash table of (field names, field values) for extensions.
    b) a merged PEDRo/MIAPE Q&A.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.

Version:
$Date: 2005/10/20 11:11:05 $ $Revision: 1.19 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home, Serialized Form

Nested Class Summary
 
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
 DbAccession acc
          Accession database instance if opened
private  java.awt.Adjustable aH
           
private  java.awt.Adjustable aV
           
 java.lang.String baseImageFile
          base name of the image for use in the title
 boolean changedAccFieldsDataFlag
          Flag indicating that the data fields were edited
 java.lang.String[] changedValueData
          Changed user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.
 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
private  java.awt.Label[] dataLabel
          Left [0:nData-1] labels if not using checkbox
private  java.awt.Color[] dataLabelColor
          Label color [0:nData-1] Colors if used
private  java.awt.TextField[] dataTextField
          Right [0:nData-1] TextFields if used
 DbSample dbS
          Name of sample to display
 java.lang.String dispName
          Name of image to display
static java.awt.Color dynamicColor
          Color of dynamic labels
 java.awt.Menu editMenu
          "Edit" pull down Menu list
private  java.awt.ScrollPane editPane
          Scrollable edit pane that holds the gridPanel
 java.lang.String[] fieldNameData
          FieldName data [0:nData-1] has a Label with the data.
 java.awt.Menu fileMenu
          "File" pull down Menu list
 java.lang.String fontFamily
           
private  java.awt.Panel gridPanel
          Where put the grid of (Label,TextField) name value pairs
 java.lang.String[] helpData
          Optional help data [0:nData-1] if not null, then this is info on the corresponding fieldNameData.
 java.lang.String[] helpList
          list of help info for each accession DB field
 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
private  int MAX_TEXT_FIELD_WIDTH
           
(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 nData
          # of name-value pair data items
(package private) static int NROWS
          size of the text area in characters
static java.awt.Color requireColor
          Color of require labels
(package private) static long serialVersionUID
          frame id
 java.awt.Font smallFont
           
private  java.awt.ScrollPane sp
          Scroll pane to hold the Name-Value scrollable panel
private  int textAreaFontSize
          font size
 java.awt.Font textFieldFont
           
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
 java.lang.String[] valueData
          Value user data [0:nData-1] for a TextField with this data on the right
 int VIEW_HEIGHT
          Height of the frame
 int VIEW_WIDTH
          Width of the frame
 int viewHeight
           
 int viewWidth
          Size of the viewport in the scrollable window
 
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
AccACCwizardPopup(Accession cs, java.lang.String baseImageFile)
          AccACCwizardPopup() - 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 buildAccWizardGUI()
          buildAccWizardGUI() - Build the ImageViewer GUI
 boolean buildListOfSamplesSubmenus(java.awt.Menu smnu, java.lang.String preface, java.lang.String omitSample)
          buildListOfSamplesSubmenus() - rebuild submenus list of samples from entries in the accession database.
 void close(boolean tryToSaveFlag)
          close() - get the data into newData, close this popup and reset flags
 java.lang.String[] getNewValueDataResults()
          getNewValueDataResults() - get changedValueData[] from the text fields.
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.
private  boolean initAccEditGUI(java.lang.String dName)
          initAccEditGUI() - init the accession fields GUI editor
 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 mouseClicked(java.awt.event.MouseEvent mouseEvent)
           
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
           
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
           
 void mousePressed(java.awt.event.MouseEvent e)
          mousePressed() - display data
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
           
 void paint(java.awt.Graphics g)
          paint() - repaint scrollable canvas in region defined by scroll bars
 void positionImageWindow()
          positionImageWindow() - position image window on the screen
 boolean setNameValueEditGUI(java.lang.String dName)
          setNameValueEditGUI() - show the Image Viewer GUI window
 boolean setNewValueData(java.lang.String[] newValueData)
          setNewValueData() - set new valueData[] into the local database and dataTextField.
 void setRowLabelColors(java.awt.Color requireColor, java.awt.Color dynamicColor)
          setRowLabelColors() - assign the required and dynamic label colors.
 boolean setSampleDatabase(java.lang.String[] helpList, java.lang.String dispName, DbSample dbS)
          setSampleDatabase() - setup the list of predefined samples available to the GUI.
 void setSampleToEdit(java.lang.String sampleName)
          setSampleToEdit() - set checkbox radio button and choice selected for sample to edit
private  boolean setupSampleAccessionFieldData()
          setupSampleAccessionFieldData() - setup the accession DB field data for this sample.
 void showMsg(java.lang.String msg)
          showMsg() - display the msg in text area window
 void update(java.awt.Graphics g)
          update() - update without background the scrollable canvas
 boolean updateChangedData()
          updateChangedData() - test if user has changed the table data fields Then copy text fields to changedValueData[[0:nData-1].
 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


baseImageFile

public java.lang.String baseImageFile
base name of the image for use in the title


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

MAX_TEXT_FIELD_WIDTH

private final int MAX_TEXT_FIELD_WIDTH
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


editMenu

public java.awt.Menu editMenu
"Edit" pull down Menu list


helpMenu

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


editPane

private java.awt.ScrollPane editPane
Scrollable edit pane that holds the gridPanel


gridPanel

private java.awt.Panel gridPanel
Where put the grid of (Label,TextField) name value pairs


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 Name-Value scrollable panel


aH

private java.awt.Adjustable aH

aV

private java.awt.Adjustable aV

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

textFieldFont

public java.awt.Font textFieldFont

dispName

public java.lang.String dispName
Name of image to display


dbS

public DbSample dbS
Name of sample to display


acc

public DbAccession acc
Accession database instance if opened


nData

public int nData
# of name-value pair data items


fieldNameData

public java.lang.String[] fieldNameData
FieldName data [0:nData-1] has a Label with the data.


helpData

public java.lang.String[] helpData
Optional help data [0:nData-1] if not null, then this is info on the corresponding fieldNameData.


valueData

public java.lang.String[] valueData
Value user data [0:nData-1] for a TextField with this data on the right


changedValueData

public java.lang.String[] changedValueData
Changed user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.


dataLabel

private java.awt.Label[] dataLabel
Left [0:nData-1] labels if not using checkbox


dataLabelColor

private java.awt.Color[] dataLabelColor
Label color [0:nData-1] Colors if used


dataTextField

private java.awt.TextField[] dataTextField
Right [0:nData-1] TextFields if used


helpList

public java.lang.String[] helpList
list of help info for each accession DB field


isVisibleFlag

public boolean isVisibleFlag
Set true if window is visible


changedAccFieldsDataFlag

public boolean changedAccFieldsDataFlag
Flag indicating that the data fields were edited


useLogCB

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


useLogFlag

public boolean useLogFlag
set from "Use log" checkbox


logReportFlag

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


viewWidth

public int viewWidth
Size of the viewport in the scrollable window


viewHeight

public int viewHeight

requireColor

public static java.awt.Color requireColor
Color of require labels


dynamicColor

public static java.awt.Color dynamicColor
Color of dynamic labels

Constructor Detail

AccACCwizardPopup

public AccACCwizardPopup(Accession cs,
                         java.lang.String baseImageFile)
AccACCwizardPopup() - Constructor

Parameters:
cs - is an instance of the main class
baseImageFile - is the base name of the image
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

setSampleDatabase

public boolean setSampleDatabase(java.lang.String[] helpList,
                                 java.lang.String dispName,
                                 DbSample dbS)
setSampleDatabase() - setup the list of predefined samples available to the GUI.
 Image names BY CONVENTION:
 all Rsamples are even (i.e, 0, 2, 4)
 all Samples are odd (i.e., 1, 3, 5)

Parameters:
helpList - - list of help info for each accession DB field
defaultPixName - is the default pix name
dbS - is the DbSample to edit.
Returns:
true if succeed

setupSampleAccessionFieldData

private boolean setupSampleAccessionFieldData()
setupSampleAccessionFieldData() - setup the accession DB field data for this sample. Reset the state to unchanged.

Returns:
true if succeed

initAccEditGUI

private boolean initAccEditGUI(java.lang.String dName)
initAccEditGUI() - init the accession fields GUI editor

Parameters:
dName - is the sample to edit
Returns:
true if succeed

setNameValueEditGUI

public boolean setNameValueEditGUI(java.lang.String dName)
setNameValueEditGUI() - show the Image Viewer GUI window

Returns:
true if succeed

setRowLabelColors

public void setRowLabelColors(java.awt.Color requireColor,
                              java.awt.Color dynamicColor)
setRowLabelColors() - assign the required and dynamic label colors.

Parameters:
requireColor - assign required data color
dynamicColor - assign dynamic data color

buildAccWizardGUI

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


buildListOfSamplesSubmenus

public boolean buildListOfSamplesSubmenus(java.awt.Menu smnu,
                                          java.lang.String preface,
                                          java.lang.String omitSample)
buildListOfSamplesSubmenus() - rebuild submenus list of samples from entries in the accession database. Omit a particular sample if omitSample is not null. NOTE: it does NOT do a pack() or repaint().

Parameters:
smnu - is submenu to remove all entries and rebuild
preface - to add to the menu command if not null
omitSample - to leave out of new menus if not null and in list
true - if suceed

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

showMsg

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

Parameters:
msg - to display

positionImageWindow

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


updateChangedData

public boolean updateChangedData()
updateChangedData() - test if user has changed the table data fields Then copy text fields to changedValueData[[0:nData-1].

Returns:
true if data has changed from original ValueData[[0:nData-1] data.

close

public void close(boolean tryToSaveFlag)
close() - get the data into newData, close this popup and reset flags


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

setSampleToEdit

public void setSampleToEdit(java.lang.String sampleName)
setSampleToEdit() - set checkbox radio button and choice selected for sample to edit

Parameters:
sampleName - is the name name

getNewValueDataResults

public java.lang.String[] getNewValueDataResults()
getNewValueDataResults() - get changedValueData[] from the text fields. Then compare it against valueData[]. If it is different then return changedValueData[] else return null.

Returns:
changed data, null if no change

setNewValueData

public boolean setNewValueData(java.lang.String[] newValueData)
setNewValueData() - set new valueData[] into the local database and dataTextField.

Parameters:
newValueData - array to save in the GUI text fields.
Returns:
true if succeed

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

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

mouseClicked

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

mouseEntered

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

mouseExited

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

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseReleased in interface java.awt.event.MouseListener