Package rma.swing
Class RmaJDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
rma.swing.RmaJDialog
- All Implemented Interfaces:
ComponentListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,Modifiable
- Direct Known Subclasses:
AboutDialog,AbstractShapeImportDialog,AcknowledgeInterimTermsFileDialog,AiShapeFilePropertiesDialog,AiShapeGlyphOptionJDlg,AiShapeObjectDialog,ComputationTimeStepDialog,CoordinateTransformDialog,CreateRaster,DefaultPlotPropertiesDialog,DxfGlyphOptionDlg,ElevationGlyphOptionJDlg,ExportDialog,FilePropertiesJDialog,FindDialog,FindTextJDialog,FontChooser,G2dPropertiesDlg,GeoDialog,HelpDialog,HistogramOptionsDialog,ImageGlyphOptionsDlg,InsertDlg,InundationGroupDialog,LayoutPlotDialog,MarginJDialog,MoverDialog,NameDialog,NameMultiSelectDialog,NameSelectorDialog,NewMarkerPointDialog,NewWorkspaceSummaryDialog,PageSetupJDialog,PairedDataCurveSelector,PanelEditor,PlotPropertiesDialog,PluginAuthorDialog,PrintMultipleJDialog,PrintPropertiesDlg,ProfileAnimationDlg,ProgressDialog,ProgressIndicator,RasterImportProgressIndicator,RatingFunctionEditor,RenameDlg,RepeatDialog,ReplaceDialog,ResultsDialog,RmaJDateChooserDialog,RmaJTableExportDialog,RmaJTableFillDialog,RmaMessageBox,ScriptTaskInfoJDialog,SerializerEditDlg,ShapeGeoInfoDialog,ShapeImportProgressIndicator,ShapeQueryDialog,StreamAlignmentGlyphDialog,StreamJunctionEditor,StreamNodeDialog,StreamNodeEditorJDialog,TableRowFilterDialog,TcuDialog,TextEditDlg,TextFileEditorDialog,TimeWindowExtensionDialog,ToolBarButtonEditor,VCRControlEditor,WarningDlg,WizardDialog
extension of JDialog that will validate its components when
validateComponents() method is called.
Is capable of setting a minimum default X, Y size for the
dialog
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionRmaJDialog(Dialog owner) RmaJDialog(Dialog owner, boolean modal) RmaJDialog(Dialog owner, String title) RmaJDialog(Dialog owner, String title, boolean modal) RmaJDialog(Frame owner) RmaJDialog(Frame owner, boolean modal) RmaJDialog(Frame owner, String title) RmaJDialog(Frame owner, String title, boolean modal) RmaJDialog(Window owner) RmaJDialog(Window owner, boolean modal) RmaJDialog(Window owner, String title) RmaJDialog(Window owner, String title, boolean modal) RmaJDialog(Window owner, String title, Dialog.ModalityType mt) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanapply()programmatically press the Apply buttonprotected booleanoverride to allow subclasses to determine whether the Apply button should be enabledbooleancancel()programmatically press the Cancel buttonvoidvoidbooleanclickButton(String buttonText) protected booleanclickButton(AbstractButton button) booleanclickCheckBox(String buttonText, boolean selected) booleanclickRadioButton(String buttonText, boolean selected) voidvoidvoidvoidprotected JRootPaneprotected voidhandle the enter keystrokevoidhandle the escape keystrokestatic RmaJDialogget the active RMAJDialogstatic RmaJDialogreturn the topmost modal dialog that is visible.static Vector<RmaJDialog>Returns a Vector list of all open RMAJDialogsstatic <T extends RmaJDialog>
List<T>getOpenWindowsOfClass(Class<T> cls) returns a List of open RmaJDialogs of the specified typebooleanstatic TimeZoneDeprecated.use ServiceLookup.getTimeZoneDisplayService().getTimeZone(); Returns the TimeZone used by this dialog for Display purposesstatic intDeprecated.use ServiceLookup.getUnitsDisplayService().getDisplayUnitsSystem();static RmaJDialogreturn the open Dialog with the Title of titlebooleanbooleanbooleanbooleanbooleanok()programmatically press the OK buttonprotected voidregisterEnterKey(boolean register) register the enter key actionprotected voidregisterEscapeKey(boolean register) register the escape key actionvoidsets the _cancelButtonString to "name".voidsetComponentsEditable(boolean b) voidsetComponentsEditable(Component[] comps, boolean editable) voidsetDefaultHeight(int height) Sets the default height of the dialog.voidsetDefaultSize(int width, int height) Sets the default size of the dialog.voidsetDefaultWidth(int width) Sets the default width of the dialog.static voidsetDisplayScale(int paramId, double scale) Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayScaleFactor(paramId, scale);voidsetEditable(boolean b) voidsetIgnoreModifiedEvents(boolean b) Set the ignoreModifiedEvents flag to true or falsevoidset the dialogs location centered on its parent.voidsetModified(boolean modified) voidsets the _okButtonString to "name".voidsetPrintLocations(boolean yesNo) Debugging Construct to print out the demensions of the dialog on resizevoidsetSnapToDefaultSize(boolean snapToDefaultSize) If true, sets this dialog to always snap to the default size if enlarged or shrunk.voidsetSystemClosable(boolean b) static voidsetTimeZone(TimeZone tz) Deprecated.use ServiceLookup.getTimeZoneDisplayService().setTimeZone(tz); Sets the timezone used for display purposesstatic voidsetUnitSystem(int unitSystem) Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayUnitSystem(unitSystem); Sets the unit system to be used by all open dialogs.voidsetVisible(boolean b) make sure the ok button is the default button when the dialog comes up.booleanDeprecated.use ServiceLookup.getUnitsDisplayService().updateDisplayScale(c);booleanDeprecated.use ServiceLookup.getTimeZoneDisplayService().updateTimeZone(c);booleanDeprecated.use ServiceLookup.getUnitsDisplayService().updateUnitSystem(c);booleanbooleanMethods inherited from class javax.swing.JDialog
addImpl, 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, updateMethods inherited from class java.awt.Dialog
getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods inherited from class java.awt.Window
addPropertyChangeListener, 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, 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, toFrontMethods inherited from class java.awt.Container
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, validateTreeMethods 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
_fComponentsAdjusted
protected boolean _fComponentsAdjusted -
_buttonFL
-
-
Constructor Details
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
public RmaJDialog() -
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
RmaJDialog
-
-
Method Details
-
createRootPane
- Overrides:
createRootPanein classJDialog
-
validateComponents
public boolean validateComponents() -
validateComponents
-
clearForm
public void clearForm() -
clearForm
-
setDefaultHeight
public void setDefaultHeight(int height) Sets the default height of the dialog. If the dialog is resized smaller than the default height, it is resized to the default height.- Parameters:
height- the default height for the dialog.
-
setDefaultWidth
public void setDefaultWidth(int width) Sets the default width of the dialog. If the dialog is resized smaller than the default width, it is resized to the default width.- Parameters:
width- the default width for the dialog.
-
setDefaultSize
public void setDefaultSize(int width, int height) Sets the default size of the dialog. If the dialog is resized smaller than the default size, it is resized to the default size.- Parameters:
width- the default width for the dialog.height- the default height for the dialog.
-
setPrintLocations
public void setPrintLocations(boolean yesNo) Debugging Construct to print out the demensions of the dialog on resize -
componentHidden
- Specified by:
componentHiddenin interfaceComponentListener
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener
-
componentShown
- Specified by:
componentShownin interfaceComponentListener
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener
-
getSnapToDefaultSize
public boolean getSnapToDefaultSize() -
setSnapToDefaultSize
public void setSnapToDefaultSize(boolean snapToDefaultSize) If true, sets this dialog to always snap to the default size if enlarged or shrunk. -
setIgnoreModifiedEvents
public void setIgnoreModifiedEvents(boolean b) Set the ignoreModifiedEvents flag to true or false -
isIgnoreModifiedEvents
public boolean isIgnoreModifiedEvents() -
isModified
public boolean isModified()- Specified by:
isModifiedin interfaceModifiable
-
setModified
public void setModified(boolean modified) - Specified by:
setModifiedin interfaceModifiable
-
canApplyBeEnabled
protected boolean canApplyBeEnabled()override to allow subclasses to determine whether the Apply button should be enabled- Returns:
- true by default
-
setEditable
public void setEditable(boolean b) -
isEditable
public boolean isEditable() -
setLocation
public void setLocation()set the dialogs location centered on its parent. If it doesn't hava a parent then center it on the screen. -
registerEscapeKey
protected void registerEscapeKey(boolean register) register the escape key action -
registerEnterKey
protected void registerEnterKey(boolean register) register the enter key action -
addNotify
public void addNotify() -
enterKeyPressed
protected void enterKeyPressed()handle the enter keystroke -
escapeKeyPressed
public void escapeKeyPressed()handle the escape keystroke -
setVisible
public void setVisible(boolean b) make sure the ok button is the default button when the dialog comes up.- Overrides:
setVisiblein classDialog
-
ok
public boolean ok()programmatically press the OK button- Returns:
- : true if the dialog has an OK button
-
apply
public boolean apply()programmatically press the Apply button- Returns:
- : true if the dialog has an Apply button
-
cancel
public boolean cancel()programmatically press the Cancel button- Returns:
- : true if the dialog has a Cancel button
-
setOKButtonSearchString
sets the _okButtonString to "name". This allows getComps() to look for strings other than "OK". -
getOKButtonSearchString
-
setCancelButtonSearchString
sets the _cancelButtonString to "name". This allows getComps() to look for strings other than "Cancel". -
getCancelButtonSearchString
-
setComponentsEditable
public void setComponentsEditable(boolean b) -
setComponentsEditable
-
clickButton
-
clickButton
-
clickRadioButton
-
clickCheckBox
-
getWindow
return the open Dialog with the Title of title -
getOpenWindows
Returns a Vector list of all open RMAJDialogs -
getOpenWindowsOfClass
returns a List of open RmaJDialogs of the specified type- Parameters:
cls- the class of the RmaJDialog to set- Returns:
-
setTimeZone
Deprecated.use ServiceLookup.getTimeZoneDisplayService().setTimeZone(tz); Sets the timezone used for display purposes -
getTimeZone
Deprecated.use ServiceLookup.getTimeZoneDisplayService().getTimeZone(); Returns the TimeZone used by this dialog for Display purposes -
getUnitSystem
Deprecated.use ServiceLookup.getUnitsDisplayService().getDisplayUnitsSystem();- Returns:
-
setDisplayScale
Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayScaleFactor(paramId, scale);- Parameters:
paramId-scale-
-
updateDisplayScale
Deprecated.use ServiceLookup.getUnitsDisplayService().updateDisplayScale(c);- Parameters:
c-- Returns:
-
setUnitSystem
Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayUnitSystem(unitSystem); Sets the unit system to be used by all open dialogs. This method fires an event to all open dialogs to update. All -
updateUnitSystem
Deprecated.use ServiceLookup.getUnitsDisplayService().updateUnitSystem(c);- Parameters:
c-- Returns:
-
updateTimeZone
Deprecated.use ServiceLookup.getTimeZoneDisplayService().updateTimeZone(c);- Parameters:
c-- Returns:
-
setSystemClosable
public void setSystemClosable(boolean b) -
isSystemClosable
public boolean isSystemClosable() -
getModalDialog
return the topmost modal dialog that is visible.- Returns:
- the top most modal dialog
-
getActiveDialog
get the active RMAJDialog- Returns:
- the active dialog or null if there isn't one active
-