public class GenericRecallableDialog
extends java.awt.Dialog
implements java.awt.event.AdjustmentListener, java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.FocusListener, java.awt.event.WindowFocusListener
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityTypejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Container |
activePanel |
protected java.awt.GridBagConstraints |
c |
protected java.awt.Button |
cancel |
protected int |
cbIndex |
int |
CENTER |
protected java.util.Vector |
checkbox |
protected java.util.Vector |
choice |
protected int |
choiceIndex |
protected java.util.Vector |
defaultText |
protected java.util.Vector |
defaultValues |
int |
EAST |
protected java.awt.GridBagLayout |
grid |
protected java.util.Hashtable |
labels |
protected boolean |
macro |
protected java.lang.String |
macroOptions |
static int |
MAX_ITEMS
Maximum number of each component (numeric field, checkbox, etc).
|
protected java.awt.Label[] |
Messages |
protected int |
nfIndex |
protected java.util.Vector |
numberField |
protected java.awt.Button |
okay |
boolean |
placeDoneButLeftside |
protected double[] |
SBcurValues |
protected int |
sbIndex |
protected int |
SBlastTouched |
protected double[] |
SBmaxs |
protected double[] |
SBmins |
protected double[] |
SBscales |
protected int |
SBtotal |
protected java.awt.Scrollbar[] |
scrollbars |
protected int |
sfIndex |
protected java.util.Vector |
stringField |
protected java.awt.TextArea |
textArea1 |
protected java.awt.TextArea |
textArea2 |
protected java.awt.Component |
theLabel |
protected boolean |
wasCanceled |
int |
WEST |
protected boolean |
windowHasFocus |
protected int |
x |
protected int |
y |
| Constructor and Description |
|---|
GenericRecallableDialog(java.lang.String title) |
GenericRecallableDialog(java.lang.String title,
java.awt.Frame parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addButton(java.lang.String text)
Adds a button to the dialog window
|
void |
addButton(java.lang.String text,
int location) |
void |
addButtons(java.lang.String text1,
java.lang.String text2)
adds 2(3,4) buttons in a row to the dialog window.
|
void |
addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3) |
void |
addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3,
java.lang.String text4) |
void |
addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3,
java.lang.String text4,
java.lang.String text5) |
void |
addButtonToPanel(java.lang.String text,
java.awt.Panel panel,
java.awt.GridBagLayout grid,
int row) |
void |
addCanvas(java.awt.Canvas can) |
void |
addCanvas(java.awt.Canvas can,
int location) |
void |
addCheckbox(java.lang.String label,
boolean defaultValue)
Adds a checkbox.
|
void |
addCheckboxGroup(int rows,
int columns,
java.lang.String[] labels,
boolean[] defaultValues)
Adds a group of checkboxs using a grid layout.
|
void |
addChoice(java.lang.String label,
int nitems,
java.lang.String defaultItem) |
void |
addChoice(java.lang.String label,
int nitems,
java.lang.String defaultItem,
int location) |
void |
addChoice(java.lang.String label,
java.lang.String[] items,
java.lang.String defaultItem)
Adds a popup menu of choices.
|
void |
addChoice(java.lang.String label,
java.lang.String[] items,
java.lang.String defaultItem,
int location) |
void |
addMessage(java.lang.String text)
Adds a message consisting of one or more lines of text.
|
void |
addNumericField(java.lang.String label,
double defaultValue,
int digits)
Adds a numeric field.
|
void |
addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval)
Adds adjustable scrollbar field.
|
void |
addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval,
int maxClicks) |
void |
addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval,
int maxClicks,
int sliderWidth) |
void |
addStringField(java.lang.String label,
java.lang.String defaultText)
Adds an 8 column text field.
|
void |
addStringField(java.lang.String label,
java.lang.String defaultText,
int columns)
Adds a text field.
|
void |
addTextAreas(java.lang.String text1,
java.lang.String text2,
int rows,
int columns)
Adds one or two (side by side) text areas.
|
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e) |
void |
beginRowOfItems() |
void |
Cancel() |
void |
disableButton(int butindex) |
void |
disableCheckbox(int cbindex) |
void |
disableChoice(int choiceIndex) |
void |
enableButton(int butindex) |
void |
enableCheckbox(int cbindex) |
void |
enableChoice(int choiceIndex) |
void |
endRowOfItems() |
void |
focusGained(java.awt.event.FocusEvent e) |
void |
focusLost(java.awt.event.FocusEvent e) |
boolean |
getBooleanValue(int i)
access the value of the i'th checkbox
|
boolean |
getButtonValue(int i)
Returns the contents of button 'i' field.
|
int |
getChoiceIndexAt(int choiceAt)
WO 9/24/07: Returns the index of the selected item in the next popup menu.
|
java.lang.String |
getChoiceValue(int i) |
java.awt.Insets |
getInsets() |
boolean |
getNextBoolean()
Returns the state of the next checkbox.
|
boolean |
getNextButton()
Returns the contents of the next buttons_touched field.
|
java.lang.String |
getNextChoice()
Returns the selected item in the next popup menu.
|
int |
getNextChoiceIndex()
Returns the index (0..N-1) of the selected item in the next popup menu.
|
double |
getNextNumber()
Returns the contents of the next numeric field.
|
double |
getNextScrollBar()
Returns the contents of the next scrollbar field.
|
java.lang.String |
getNextString()
Returns the contents of the next text field.
|
java.lang.String |
getNextText()
Returns the contents of the next text area.
|
double |
getNumericValue(int i)
access the value of the i'th numeric field
|
double |
getScrollBarValue(int i)
Returns the contents of scrollbar field 'i'
|
protected java.lang.Double |
getValue(java.lang.String theText) |
void |
giveDoneButFocus() |
boolean |
hasFocus() |
void |
hideDialog() |
void |
hideScrollBar(int i)
disable/hide a scrollbar
|
void |
highlightButton(int butindex) |
boolean |
invalidNumber()
Returns true if one or more of the numeric fields contained an invalid number.
|
void |
itemStateChanged(java.awt.event.ItemEvent e) |
void |
keyPressed(java.awt.event.KeyEvent e)
the keyboard input (arrow keys) will be caught by whichever button
has the current focus, but will affect the scrollbar last touched.
|
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
paint(java.awt.Graphics g) |
void |
repopulateChoice(int choiceIndex,
java.lang.String[] newitems)
WO 2/3/11 repopulate the choice values
|
void |
setButtonLabel(int i,
java.lang.String newlabel) |
void |
setCheckboxValue(int i,
boolean newstate)
set the value of the i'th checkbox
|
void |
setChoice(int choiceIndex,
int itemAt)
WO 9/25/07 set the active item in the selected choice to the itemAt.
|
void |
setFocusButton(int butindex) |
void |
setMessage(int i,
java.lang.String newmsg) |
void |
setNumericField(int nfIndex,
float value) |
void |
setScrollBarLimits(int i,
int newmin,
int newmax) |
void |
setScrollBarUnitIncrement(int inc) |
void |
setScrollBarValue(int i,
double value)
Sets the contents of scrollbar 'i' field to 'value'
|
void |
setStringField(int sfIndex,
java.lang.String value)
WO 5/18/09 set the value in the selected stringField (sfIndex, ordered 0..N-1) to the 'value'
|
protected void |
setup() |
void |
showDialog()
changes from parent showDialog(): remove accept button
|
void |
textValueChanged(java.awt.event.TextEvent e) |
void |
unhideDialog() |
void |
unhighlightButton(int butindex) |
boolean |
wasCanceled()
Returns true if the user clicks on "Cancel".
|
void |
windowActivated(java.awt.event.WindowEvent e) |
void |
windowClosed(java.awt.event.WindowEvent e) |
void |
windowClosing(java.awt.event.WindowEvent e) |
void |
windowDeactivated(java.awt.event.WindowEvent e) |
void |
windowDeiconified(java.awt.event.WindowEvent e) |
void |
windowGainedFocus(java.awt.event.WindowEvent e) |
void |
windowIconified(java.awt.event.WindowEvent e) |
void |
windowLostFocus(java.awt.event.WindowEvent e) |
void |
windowOpened(java.awt.event.WindowEvent e) |
addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, 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, transferFocusDownCycle, update, validate, validateTreeaction, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, 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, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic final int WEST
public final int CENTER
public final int EAST
public static final int MAX_ITEMS
protected java.awt.Scrollbar[] scrollbars
protected double[] SBscales
protected double[] SBmins
protected double[] SBmaxs
protected double[] SBcurValues
protected int sbIndex
protected int SBtotal
protected int SBlastTouched
public boolean placeDoneButLeftside
protected java.util.Vector defaultValues
protected java.util.Vector defaultText
protected java.util.Vector numberField
protected java.util.Vector stringField
protected java.util.Vector checkbox
protected java.util.Vector choice
protected java.awt.Component theLabel
protected java.awt.Label[] Messages
protected java.awt.TextArea textArea1
protected java.awt.TextArea textArea2
protected java.awt.Button cancel
protected java.awt.Button okay
protected boolean wasCanceled
protected int x
protected int y
protected int nfIndex
protected int sfIndex
protected int cbIndex
protected int choiceIndex
protected java.awt.GridBagLayout grid
protected java.awt.GridBagConstraints c
protected java.util.Hashtable labels
protected boolean macro
protected java.lang.String macroOptions
protected boolean windowHasFocus
protected java.awt.Container activePanel
public GenericRecallableDialog(java.lang.String title)
public GenericRecallableDialog(java.lang.String title,
java.awt.Frame parent)
public void hideDialog()
public void unhideDialog()
public void showDialog()
public void giveDoneButFocus()
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void setFocusButton(int butindex)
public void disableButton(int butindex)
public void enableButton(int butindex)
public void highlightButton(int butindex)
public void unhighlightButton(int butindex)
public void addButton(java.lang.String text)
public void addButton(java.lang.String text,
int location)
public void addButtons(java.lang.String text1,
java.lang.String text2)
public void addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3)
public void addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3,
java.lang.String text4)
public void addButtons(java.lang.String text1,
java.lang.String text2,
java.lang.String text3,
java.lang.String text4,
java.lang.String text5)
public void addButtonToPanel(java.lang.String text,
java.awt.Panel panel,
java.awt.GridBagLayout grid,
int row)
public boolean getNextButton()
public boolean getButtonValue(int i)
public void setButtonLabel(int i,
java.lang.String newlabel)
public void addCanvas(java.awt.Canvas can)
public void addCanvas(java.awt.Canvas can,
int location)
public void addChoice(java.lang.String label,
int nitems,
java.lang.String defaultItem)
public void addChoice(java.lang.String label,
int nitems,
java.lang.String defaultItem,
int location)
public void addChoice(java.lang.String label,
java.lang.String[] items,
java.lang.String defaultItem,
int location)
public boolean getBooleanValue(int i)
public void setCheckboxValue(int i,
boolean newstate)
public java.lang.String getChoiceValue(int i)
public double getNumericValue(int i)
public void beginRowOfItems()
public void endRowOfItems()
public void addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval)
public void addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval,
int maxClicks)
public void addScrollBar(java.lang.String label,
double defaultValue,
int digits,
double minval,
double maxval,
int maxClicks,
int sliderWidth)
public void setScrollBarUnitIncrement(int inc)
public double getNextScrollBar()
public double getScrollBarValue(int i)
public void setScrollBarValue(int i,
double value)
public void setScrollBarLimits(int i,
int newmin,
int newmax)
public void hideScrollBar(int i)
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged in interface java.awt.event.AdjustmentListenerpublic void windowGainedFocus(java.awt.event.WindowEvent e)
windowGainedFocus in interface java.awt.event.WindowFocusListenerpublic void windowLostFocus(java.awt.event.WindowEvent e)
windowLostFocus in interface java.awt.event.WindowFocusListenerpublic boolean hasFocus()
hasFocus in class java.awt.Componentpublic void addNumericField(java.lang.String label,
double defaultValue,
int digits)
label - the labeldefaultValue - value to be initially displayeddigits - number of digits to right of decimal pointpublic void addStringField(java.lang.String label,
java.lang.String defaultText)
label - the labeldefaultText - the text initially displayedpublic void addStringField(java.lang.String label,
java.lang.String defaultText,
int columns)
label - the labeldefaultText - text initially displayedcolumns - width of the text fieldpublic void addCheckbox(java.lang.String label,
boolean defaultValue)
label - the labeldefaultValue - the initial statepublic void addCheckboxGroup(int rows,
int columns,
java.lang.String[] labels,
boolean[] defaultValues)
rows - the number of rowscolumns - the number of columnslabels - the labelsdefaultValues - the initial statespublic void disableCheckbox(int cbindex)
public void enableCheckbox(int cbindex)
public void disableChoice(int choiceIndex)
public void enableChoice(int choiceIndex)
public void addChoice(java.lang.String label,
java.lang.String[] items,
java.lang.String defaultItem)
label - the labelitems - the menu itemsdefaultItem - the menu item initially selectedpublic void addMessage(java.lang.String text)
public void setMessage(int i,
java.lang.String newmsg)
public void addTextAreas(java.lang.String text1,
java.lang.String text2,
int rows,
int columns)
text1 - initial contents of the first text areatext2 - initial contents of the second text area or nullrows - the number of rowscolumns - the number of columnspublic boolean wasCanceled()
public void Cancel()
public void setNumericField(int nfIndex,
float value)
public double getNextNumber()
protected java.lang.Double getValue(java.lang.String theText)
public boolean invalidNumber()
public void setStringField(int sfIndex,
java.lang.String value)
public java.lang.String getNextString()
public boolean getNextBoolean()
public void setChoice(int choiceIndex,
int itemAt)
public void repopulateChoice(int choiceIndex,
java.lang.String[] newitems)
public java.lang.String getNextChoice()
public int getNextChoiceIndex()
public int getChoiceIndexAt(int choiceAt)
public java.lang.String getNextText()
protected void setup()
public void textValueChanged(java.awt.event.TextEvent e)
textValueChanged in interface java.awt.event.TextListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerpublic java.awt.Insets getInsets()
getInsets in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class java.awt.Window