Package rma.swing

Class 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

public class RmaJDialog extends JDialog implements ComponentListener, Modifiable
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:
  • Field Details

    • _fComponentsAdjusted

      protected boolean _fComponentsAdjusted
    • _buttonFL

      protected FocusListener _buttonFL
  • Constructor Details

    • RmaJDialog

      public RmaJDialog(Frame owner, String title)
    • RmaJDialog

      public RmaJDialog(Frame owner, String title, boolean modal)
    • RmaJDialog

      public RmaJDialog(Frame owner, boolean modal)
    • RmaJDialog

      public RmaJDialog(Dialog owner, String title)
    • RmaJDialog

      public RmaJDialog(Dialog owner, String title, boolean modal)
    • RmaJDialog

      public RmaJDialog(Dialog owner, boolean modal)
    • RmaJDialog

      public RmaJDialog(Window owner, boolean modal)
    • RmaJDialog

      public RmaJDialog()
    • RmaJDialog

      public RmaJDialog(Frame owner)
    • RmaJDialog

      public RmaJDialog(Dialog owner)
    • RmaJDialog

      public RmaJDialog(Window owner)
    • RmaJDialog

      public RmaJDialog(Window owner, String title)
    • RmaJDialog

      public RmaJDialog(Window owner, String title, boolean modal)
    • RmaJDialog

      public RmaJDialog(Window owner, String title, Dialog.ModalityType mt)
  • Method Details

    • createRootPane

      protected JRootPane createRootPane()
      Overrides:
      createRootPane in class JDialog
    • validateComponents

      public boolean validateComponents()
    • validateComponents

      public boolean validateComponents(Container c)
    • clearForm

      public void clearForm()
    • clearForm

      public void clearForm(Container c)
    • 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

      public void componentHidden(ComponentEvent e)
      Specified by:
      componentHidden in interface ComponentListener
    • componentMoved

      public void componentMoved(ComponentEvent e)
      Specified by:
      componentMoved in interface ComponentListener
    • componentShown

      public void componentShown(ComponentEvent e)
      Specified by:
      componentShown in interface ComponentListener
    • componentResized

      public void componentResized(ComponentEvent e)
      Specified by:
      componentResized in interface ComponentListener
    • 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 interface Modifiable
    • setModified

      public void setModified(boolean modified)
      Specified by:
      setModified in interface Modifiable
    • 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()
      Overrides:
      addNotify in class Dialog
    • 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 class Dialog
    • 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

      public void setOKButtonSearchString(String name)
      sets the _okButtonString to "name". This allows getComps() to look for strings other than "OK".
    • getOKButtonSearchString

      public String getOKButtonSearchString()
    • setCancelButtonSearchString

      public void setCancelButtonSearchString(String name)
      sets the _cancelButtonString to "name". This allows getComps() to look for strings other than "Cancel".
    • getCancelButtonSearchString

      public String getCancelButtonSearchString()
    • setComponentsEditable

      public void setComponentsEditable(boolean b)
    • setComponentsEditable

      public void setComponentsEditable(Component[] comps, boolean editable)
    • clickButton

      protected boolean clickButton(AbstractButton button)
    • clickButton

      public boolean clickButton(String buttonText)
    • clickRadioButton

      public boolean clickRadioButton(String buttonText, boolean selected)
    • clickCheckBox

      public boolean clickCheckBox(String buttonText, boolean selected)
    • getWindow

      public static RmaJDialog getWindow(String title)
      return the open Dialog with the Title of title
    • getOpenWindows

      public static Vector<RmaJDialog> getOpenWindows()
      Returns a Vector list of all open RMAJDialogs
    • getOpenWindowsOfClass

      public static <T extends RmaJDialog> List<T> getOpenWindowsOfClass(Class<T> cls)
      returns a List of open RmaJDialogs of the specified type
      Parameters:
      cls - the class of the RmaJDialog to set
      Returns:
    • setTimeZone

      @Deprecated public static void setTimeZone(TimeZone tz)
      Deprecated.
      use ServiceLookup.getTimeZoneDisplayService().setTimeZone(tz); Sets the timezone used for display purposes
    • getTimeZone

      @Deprecated public static TimeZone getTimeZone()
      Deprecated.
      use ServiceLookup.getTimeZoneDisplayService().getTimeZone(); Returns the TimeZone used by this dialog for Display purposes
    • getUnitSystem

      @Deprecated public static int getUnitSystem()
      Deprecated.
      use ServiceLookup.getUnitsDisplayService().getDisplayUnitsSystem();
      Returns:
    • setDisplayScale

      @Deprecated public static void setDisplayScale(int paramId, double scale)
      Deprecated.
      use ServiceLookup.getUnitsDisplayService().setDisplayScaleFactor(paramId, scale);
      Parameters:
      paramId -
      scale -
    • updateDisplayScale

      @Deprecated public boolean updateDisplayScale(Container c)
      Deprecated.
      use ServiceLookup.getUnitsDisplayService().updateDisplayScale(c);
      Parameters:
      c -
      Returns:
    • setUnitSystem

      @Deprecated public static void setUnitSystem(int unitSystem)
      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 public boolean updateUnitSystem(Container c)
      Deprecated.
      use ServiceLookup.getUnitsDisplayService().updateUnitSystem(c);
      Parameters:
      c -
      Returns:
    • updateTimeZone

      @Deprecated public boolean updateTimeZone(Container c)
      Deprecated.
      use ServiceLookup.getTimeZoneDisplayService().updateTimeZone(c);
      Parameters:
      c -
      Returns:
    • setSystemClosable

      public void setSystemClosable(boolean b)
    • isSystemClosable

      public boolean isSystemClosable()
    • getModalDialog

      public static RmaJDialog getModalDialog()
      return the topmost modal dialog that is visible.
      Returns:
      the top most modal dialog
    • getActiveDialog

      public static RmaJDialog getActiveDialog()
      get the active RMAJDialog
      Returns:
      the active dialog or null if there isn't one active