|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--PopupHPChooser
The class creates a GUI for selecting HP-X and HP-Y 'sets', HP-E 'list'. It lets users select subsets of samples from the set of all samples loaded in the database. Since HP-X and HP-Y sets are mutually exclusive, the data put into HP-X 'set' is not available to put into the HP-Y 'set'. The HP-E list' may be defined as an ordered list from a subset of the set of all samples.
The GUI uses 3 instances of the ChooserGUI tied together as described above and illustrated in the figure below. It makes copies of the HP sample lists in SampleSets hps.(msList, msListX, msListY, msListE) into
The user selected results are saved in local arrays: msListXo[], msListYo[], msListEo[], msListoXY[], msListoE[]. Then generate the corresponding string arrays sListXo[], sListYo[], sListEo[], sListoXY[], sListoE[]. The SELECTED lists are sListXo[], sListYo[], sListEo[]. The REMAINING lists are: sListoXY[] and sListoE[].If the user finally presses "Done", the results are saveed back in SampleSets hps.(msListX, msListY, msListE).
The following is the GUI Layout for HP chooser REMAINDERs SELECTEDs |------| |------| | HP | -> | HP-X | Up | rem | <- | | Down |------| |------| use -> |------| above <- | HP-Y | Up | | Down |------| |------| |------| | HP | -> | HP-E | Up | rem | <- | | Down |------| |------| -------------------------------- | info area for selected HP | -------------------------------- OK CANCEL RESET (control buttons)
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.
ChooserGUI
, Serialized FormInner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) int |
cgIdx
index of chooser instance in cgList[] |
private ChooserGUI[] |
cgList
[0:nChooser-1] list of chooserGUIs |
private java.awt.Font |
dataFont
font for data of popup chooser window |
private java.awt.Frame |
f
frame to install choosers |
(package private) int |
frameHeight
default frame size - must be here! |
(package private) int |
frameWidth
default frame size - must be here! |
private int |
hpMenuItemListSize
sorted list of HP menu size |
private SampleSets |
hps
link to global SampleSets instance |
(package private) int |
id
id # for this instance |
private java.awt.TextField |
infoTA1
first line of info about selected HP |
private java.awt.TextField |
infoTA2
second line of info about selected HP |
private java.awt.TextField |
infoTA3
third line of info about selected HP |
private java.awt.Font |
labelFont
font for labels of popup chooser window |
private MAExplorer |
mae
link to global MAExplorer instance |
private static int |
masterID
|
private MaHybridSample[] |
msList
List of ALL initial samples in DB |
private MaHybridSample[] |
msListEo
initial HP-E sample list on starting chooser |
private MaHybridSample[] |
msListrE
rem(E) = mxListo - msListEo |
private MaHybridSample[] |
msListrXY
rem(X+Y) = mxListo - msListXo - msListYo |
private MaHybridSample[] |
msListXo
initial HP-X sample list on starting chooser |
private MaHybridSample[] |
msListYo
initial HP-Y sample list on starting chooser |
(package private) int |
nChooser
number of ChooseGUI instances |
private int |
nHP
# all probes in the database |
private int |
nHPEf
# of final selected HP-E samples |
private int |
nHPEo
# of original HP-E selected samples |
private int |
nHPrE
# rem(E) = mxListo - msListEo |
private int |
nHPrXY
# rem(X+Y) = mxListo - msListXo - msListYo |
private int |
nHPXf
# of final selected HP-X samples |
private int |
nHPXo
# of original HP-X selected samples |
private int |
nHPYf
# of final selected HP-Y samples |
private int |
nHPYo
# of original HP-Y selected samples |
(package private) static int |
POPUP_HEIGHT
Height of frame holding popup HP chooser. |
(package private) static int |
POPUP_WIDTH
Width of of frame holding popup HP chooser. |
private java.lang.String[] |
sList
List of ALL initial samples in DB |
private java.lang.String[] |
sListEo
initial HP-E list on starting chooser |
private java.lang.String[] |
sListrE
rem(E) = msListo - msListEo |
private java.lang.String[] |
sListrXY
rem(X+Y) = msListo - msListXo - msListYo |
private java.lang.String[] |
sListXo
initial HP-X sample list on starting chooser |
private java.lang.String[] |
sListYo
initial HP-Y sample list on starting chooser |
(package private) int |
taCols
TextArea cols dimensions |
(package private) int |
taRows
TextArea rows dimensions |
private java.lang.String |
title
title of popup chooser window |
private java.awt.Font |
titleFont
font for title of popup chooser window |
Fields inherited from class java.awt.Frame |
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, warningString, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
PopupHPChooser(MAExplorer mae,
java.awt.Font titleFont,
java.awt.Font labelFont,
java.awt.Font dataFont,
int taRows,
int taCols)
PopupHPChooser() - Constructor. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - handle action events buttons and text areas. |
(package private) void |
addObj(java.awt.Container cont,
java.lang.Object arg,
int x,
int y,
int w,
int h,
double weightX,
double weightY)
addObj() - add object to GridBagLayout. |
(package private) void |
buildDataStructures()
buildDataStructures() - build the data structures used by the popup chooser. |
(package private) void |
buildHPchooserGUI(java.lang.String title)
buildHPchooserGUI() - create GUI for PopupHPChooser. |
(package private) void |
close()
close() - close the window. |
void |
keyPressed(java.awt.event.KeyEvent e)
keyPressed() - get key Pressed event - look for ESCAPE key to set STOP flag |
void |
keyReleased(java.awt.event.KeyEvent e)
keyReleased() - get key Released event |
void |
keyTyped(java.awt.event.KeyEvent e)
keyTyped() - get key typed event - look for ESCAPE key to set STOP flag |
(package private) void |
printChooserState(java.lang.String msg)
printChooserState() - print chooser state data. |
private void |
setMAEstateFromChooserData()
setMAEstateFromChooserData() - restore MAE state from chooser data. |
private boolean |
setupHP_XYEchooserLists()
setupHP_XYEchooserLists() - setup working HP-(X,Y,E) chooser lists. |
(package private) void |
updateInfo(ChooserGUI cGUI,
int idx,
java.lang.String sEntry)
updateInfo() - update the info text fields for selected HP Note: this should be called from ChooseGUI when an entry is picked. |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close the window |
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 |
|
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
private MAExplorer mae
private SampleSets hps
private static int masterID
int id
static final int POPUP_HEIGHT
static final int POPUP_WIDTH
private java.awt.Frame f
int frameWidth
int frameHeight
int cgIdx
int taRows
int taCols
int nChooser
private ChooserGUI[] cgList
private int nHPXo
private int nHPYo
private int nHPEo
private int nHP
private int nHPrXY
private int nHPrE
private int nHPXf
private int nHPYf
private int nHPEf
private int hpMenuItemListSize
private MaHybridSample[] msListXo
private MaHybridSample[] msListYo
private MaHybridSample[] msListEo
private MaHybridSample[] msList
private MaHybridSample[] msListrXY
private MaHybridSample[] msListrE
private java.lang.String[] sListXo
private java.lang.String[] sListYo
private java.lang.String[] sListEo
private java.lang.String[] sList
private java.lang.String[] sListrXY
private java.lang.String[] sListrE
private java.lang.String title
private java.awt.Font titleFont
private java.awt.Font labelFont
private java.awt.Font dataFont
private java.awt.TextField infoTA1
private java.awt.TextField infoTA2
private java.awt.TextField infoTA3
Constructor Detail |
PopupHPChooser(MAExplorer mae, java.awt.Font titleFont, java.awt.Font labelFont, java.awt.Font dataFont, int taRows, int taCols)
mae
- is instance of MAExplorertitleFont
- is the font for the titlelabelFont
- is the font for the labelsdataFont
- is the font for the datataRows
- is the TextArea rows dimensiontaCols
- is the TextArea cols dimensionbuildHPchooserGUI(java.lang.String)
Method Detail |
void buildHPchooserGUI(java.lang.String title)
title
- for the chooseraddObj(java.awt.Container, java.lang.Object, int, int, int, int, double, double)
,
buildDataStructures()
void addObj(java.awt.Container cont, java.lang.Object arg, int x, int y, int w, int h, double weightX, double weightY)
cont
- is panel, window, or scrollpanearg
- is the Label/Panelx
- is the x coord locationy
- is the y coord locationw
- is the cell widthh
- is the cell heightweightX
- is the row weightweightY
- is the col weightvoid buildDataStructures()
ChooserGUI
,
ChooserGUI.buildChooserGUI()
,
ChooserGUI.setListData(int, int, int, int, java.lang.String[], java.lang.String[])
,
ChooserGUI.setTitles(java.lang.String, java.lang.String)
,
printChooserState(java.lang.String)
,
setupHP_XYEchooserLists()
private boolean setupHP_XYEchooserLists()
private void setMAEstateFromChooserData()
Component.repaint()
void printChooserState(java.lang.String msg)
msg
- optional messagevoid updateInfo(ChooserGUI cGUI, int idx, java.lang.String sEntry)
cGUI
- is instance of ChooserGUI to useidx
- is the field to selectsEntry
- is the corresponding entry.Component.repaint()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- is action event for button pressChooserGUI.resetChooserGUI()
,
printChooserState(java.lang.String)
,
setMAEstateFromChooserData()
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- is window closing eventvoid close()
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void keyPressed(java.awt.event.KeyEvent e)
e
- is key pressed eventpublic void keyReleased(java.awt.event.KeyEvent e)
e
- is key released eventpublic void keyTyped(java.awt.event.KeyEvent e)
e
- is key typed event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |