|
|||||||
| 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.Dialog
|
+--javax.swing.JDialog
|
+--arlut.csd.JDialog.JCenterDialog
|
+--arlut.csd.JDialog.StringDialog
A simple customizable dialog with support for a variety of data field components.
For simple dialogs, use the included constructors. For more
complicated dialogs, including check boxes, choice lists, and text
fields, use a DialogRsrc object
to pass in a pre-defined dialog definition.
The ShowDialog method shows the current dialog, and returns a Hashtable of results, which map the label used in the dialog for individual data fields with the value entered into that field.
DialogRsrc, Serialized Form| Inner classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
| Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| 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) javax.swing.JPanel |
buttonPanel
|
(package private) javax.swing.JButton |
CancelButton
|
(package private) java.awt.GridBagConstraints |
compgbc
|
(package private) java.awt.GridBagLayout |
compgbl
|
(package private) java.util.Hashtable |
componentHash
|
(package private) java.util.Vector |
components
|
(package private) javax.swing.JPanel |
dataPanel
|
(package private) static boolean |
debug
|
(package private) boolean |
done
|
(package private) java.awt.GridBagConstraints |
gbc
|
(package private) java.awt.GridBagLayout |
gbl
|
(package private) java.awt.Image |
image
|
(package private) javax.swing.JLabel |
imageCanvas
|
(package private) javax.swing.JPanel |
mainPanel
|
(package private) java.util.Vector |
objects
|
(package private) javax.swing.JButton |
OKButton
|
(package private) javax.swing.JPanel |
panel
|
(package private) JMultiLineLabel |
textLabel
|
(package private) java.util.Hashtable |
valueHash
|
| Fields inherited from class arlut.csd.JDialog.JCenterDialog |
frame |
| Fields inherited from class javax.swing.JDialog |
accessibleContext, defaultCloseOperation, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
base, keepBlocking, modal, nameCounter, resizable, serialVersionUID, title |
| Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, state, warningString, weakThis, 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 |
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 javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
StringDialog(DialogRsrc Resource)
Constructor for more complicated StringDialog. |
|
StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text)
Simple constructor for a small dialog box with a Cancel button |
|
StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
boolean ShowCancel)
Simple constructor for a small dialog box |
|
StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel)
Simple constructor for a small dialog box |
|
StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel,
java.awt.Image image)
Simple constructor for a small dialog box |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle the ok and cancel buttons. |
private void |
addRow(javax.swing.JPanel parent,
javax.swing.JComponent comp,
java.lang.String label,
int row)
Convenience method to add a GUI component to this dialog. |
java.util.Hashtable |
DialogShow()
Display the dialog box, locks this thread while the dialog is being displayed, and returns a hashtable of data field values when the user closes the dialog box. |
private void |
loadValueHash()
This method is responsible for scanning all of the input fields in this dialog and loading their values into valueHash for DialogShow() to return. |
protected void |
registerCallbacks()
We want to make it so that when the user hits enter on the last string or password field in the dialog, the ok button is clicked. |
void |
windowActivated(java.awt.event.WindowEvent event)
|
void |
windowClosed(java.awt.event.WindowEvent event)
|
void |
windowClosing(java.awt.event.WindowEvent event)
|
void |
windowDeactivated(java.awt.event.WindowEvent event)
|
void |
windowDeiconified(java.awt.event.WindowEvent event)
|
void |
windowIconified(java.awt.event.WindowEvent event)
|
void |
windowOpened(java.awt.event.WindowEvent event)
|
| Methods inherited from class arlut.csd.JDialog.JCenterDialog |
pack, pack, place |
| Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, createRootPaneException, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Dialog |
|
| Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, eventEnabled, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, readObject, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, toBack, toFront, transferFocus, writeObject |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, removeAll, removeContainerListener, removeNotify, setFont, 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, processMouseEvent, processMouseMotionEvent, remove, 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 |
| Field Detail |
static final boolean debug
java.util.Hashtable componentHash
java.util.Hashtable valueHash
boolean done
javax.swing.JLabel imageCanvas
javax.swing.JButton OKButton
javax.swing.JButton CancelButton
javax.swing.JPanel panel
javax.swing.JPanel mainPanel
javax.swing.JPanel dataPanel
javax.swing.JPanel buttonPanel
JMultiLineLabel textLabel
java.awt.GridBagLayout gbl
java.awt.GridBagLayout compgbl
java.awt.GridBagConstraints gbc
java.awt.GridBagConstraints compgbc
java.awt.Image image
java.util.Vector objects
java.util.Vector components
| Constructor Detail |
public StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
boolean ShowCancel)
frame - Parent frame of the Dialog BoxTitle - Title of the Dialog BoxText - Text shown in the Dialog BoxShowCancel - if true, show a "Cancel" button
public StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text)
frame - Parent frame of the Dialog BoxTitle - Title of the Dialog BoxText - Text shown in the Dialog Box
public StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel)
frame - Parent frame of the Dialog BoxTitle - Title of the Dialog BoxText - Text shown in the Dialog BoxOK - String for "OK" buttonCancel - String for "Cancel" button
public StringDialog(java.awt.Frame frame,
java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel,
java.awt.Image image)
frame - Parent frame of the Dialog BoxTitle - Title of the Dialog BoxText - Text shown in the Dialog BoxOK - String for "OK" buttonCancel - String for "Cancel" buttonimage - Image to display next to textpublic StringDialog(DialogRsrc Resource)
Resource - Sets resource for Dialog box.| Method Detail |
protected void registerCallbacks()
public java.util.Hashtable DialogShow()
Display the dialog box, locks this thread while the dialog is being displayed, and returns a hashtable of data field values when the user closes the dialog box.
Use this instead of Dialog.show(). If Hashtable returned is null, then the cancel button was clicked. Otherwise, it will contain a hash of labels(String) to results (Object).
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerprivate void loadValueHash()
private final void addRow(javax.swing.JPanel parent,
javax.swing.JComponent comp,
java.lang.String label,
int row)
public void windowActivated(java.awt.event.WindowEvent event)
windowActivated in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent event)
windowClosed in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent event)
windowClosing in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent event)
windowIconified in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent event)
windowOpened in interface java.awt.event.WindowListener
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||