public class EditParametersDialog extends ComponentDialog implements ChangeListener
If the panels returned by EditorPaneFactory implement the CloseListener interface, then they are notified when this dialog is closed, and are informed of which button (if any) was used to close the dialog.
The dialog is modal, so that (in lieu of a proper undo mechanism) the Cancel button can properly undo any modifications that are made. This means that the statement that creates the dialog will not return until the user dismisses the dialog. The method buttonPressed() can then be called to find out whether the user clicked the Commit button or the Cancel button (or any other button specified in the constructor). Then you can access the component to determine what values were set by the user.
Yellow (neuendor) |
Yellow (eal) |
Modifier and Type | Class and Description |
---|---|
(package private) class |
EditParametersDialog.ChangeExecutedRunnable
A runnable for the change executed event.
|
(package private) class |
EditParametersDialog.ChangeFailedRunnable
A runnable for the change failed event.
|
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected java.awt.Frame |
_owner
The owner window.
|
protected Query |
_query
The query window for adding parameters.
|
protected NamedObj |
_target
The target object whose parameters are being edited.
|
_buttonPressed, _propChangeListener, _windowClosingAdapter, contents
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
EditParametersDialog(java.awt.Frame owner,
NamedObj target)
Construct a dialog with the specified owner and target.
|
EditParametersDialog(java.awt.Frame owner,
NamedObj target,
java.lang.String label)
Construct a dialog with the specified owner and target.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_handleClosing()
If the contents of this dialog implements the CloseListener
interface, then notify it that the window has closed.
|
protected ComponentDialog |
_openAddDialog(java.lang.String message,
java.lang.String name,
java.lang.String defValue,
java.lang.String className)
Open a dialog to add a new parameter.
|
void |
changeExecuted(ChangeRequest change)
React to the fact that a change has been successfully executed.
|
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
Notify the listener that a change has resulted in an exception.
|
void |
doLayoutAndPack()
Do the layout and then pack.
|
buttonPressed, dispose, setMessage
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, 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, paint, postEvent, processEvent, 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, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected java.awt.Frame _owner
protected Query _query
protected NamedObj _target
public EditParametersDialog(java.awt.Frame owner, NamedObj target)
owner
- The object that, per the user, appears to be
generating the dialog.target
- The object whose parameters are being edited.public EditParametersDialog(java.awt.Frame owner, NamedObj target, java.lang.String label)
owner
- The object that, per the user, appears to be
generating the dialog.target
- The object whose parameters are being edited.label
- The label for the dialog box.public void changeExecuted(ChangeRequest change)
changeExecuted
in interface ChangeListener
change
- The change that was executed.public void changeFailed(ChangeRequest change, java.lang.Exception exception)
changeFailed
in interface ChangeListener
change
- The change that was attempted.exception
- The exception that resulted.public void doLayoutAndPack()
protected void _handleClosing()
_handleClosing
in class ComponentDialog
protected ComponentDialog _openAddDialog(java.lang.String message, java.lang.String name, java.lang.String defValue, java.lang.String className)
message
- A message to place at the top, or null if none.name
- The default name.defValue
- The default value.className
- The default class name.