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.AccessibleJDialog
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested 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, rootPaneCheckingEnabled
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields 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 TypeMethodDescriptionvoid
boolean
apply()
programmatically press the Apply buttonprotected boolean
override to allow subclasses to determine whether the Apply button should be enabledboolean
cancel()
programmatically press the Cancel buttonvoid
void
boolean
clickButton
(String buttonText) protected boolean
clickButton
(AbstractButton button) boolean
clickCheckBox
(String buttonText, boolean selected) boolean
clickRadioButton
(String buttonText, boolean selected) void
void
void
void
protected JRootPane
protected void
handle the enter keystrokevoid
handle the escape keystrokestatic RmaJDialog
get the active RMAJDialogstatic RmaJDialog
return 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 typeboolean
static TimeZone
Deprecated.use ServiceLookup.getTimeZoneDisplayService().getTimeZone(); Returns the TimeZone used by this dialog for Display purposesstatic int
Deprecated.use ServiceLookup.getUnitsDisplayService().getDisplayUnitsSystem();static RmaJDialog
return the open Dialog with the Title of titleboolean
boolean
boolean
boolean
boolean
ok()
programmatically press the OK buttonprotected void
registerEnterKey
(boolean register) register the enter key actionprotected void
registerEscapeKey
(boolean register) register the escape key actionvoid
sets the _cancelButtonString to "name".void
setComponentsEditable
(boolean b) void
setComponentsEditable
(Component[] comps, boolean editable) void
setDefaultHeight
(int height) Sets the default height of the dialog.void
setDefaultSize
(int width, int height) Sets the default size of the dialog.void
setDefaultWidth
(int width) Sets the default width of the dialog.static void
setDisplayScale
(int paramId, double scale) Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayScaleFactor(paramId, scale);void
setEditable
(boolean b) void
setIgnoreModifiedEvents
(boolean b) Set the ignoreModifiedEvents flag to true or falsevoid
set the dialogs location centered on its parent.void
setModified
(boolean modified) void
sets the _okButtonString to "name".void
setPrintLocations
(boolean yesNo) Debugging Construct to print out the demensions of the dialog on resizevoid
setSnapToDefaultSize
(boolean snapToDefaultSize) If true, sets this dialog to always snap to the default size if enlarged or shrunk.void
setSystemClosable
(boolean b) static void
setTimeZone
(TimeZone tz) Deprecated.use ServiceLookup.getTimeZoneDisplayService().setTimeZone(tz); Sets the timezone used for display purposesstatic void
setUnitSystem
(int unitSystem) Deprecated.use ServiceLookup.getUnitsDisplayService().setDisplayUnitSystem(unitSystem); Sets the unit system to be used by all open dialogs.void
setVisible
(boolean b) make sure the ok button is the default button when the dialog comes up.boolean
Deprecated.use ServiceLookup.getUnitsDisplayService().updateDisplayScale(c);boolean
Deprecated.use ServiceLookup.getTimeZoneDisplayService().updateTimeZone(c);boolean
Deprecated.use ServiceLookup.getUnitsDisplayService().updateUnitSystem(c);boolean
boolean
Methods 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, update
Methods inherited from class java.awt.Dialog
getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
Methods 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, toFront
Methods 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, validateTree
Methods 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:
createRootPane
in 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:
componentHidden
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
componentResized
- Specified by:
componentResized
in 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:
isModified
in interfaceModifiable
-
setModified
public void setModified(boolean modified) - Specified by:
setModified
in 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:
setVisible
in 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
-