Class AbstractMMLDialog

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
megamek.client.ui.dialogs.abstractDialogs.AbstractDialog
megameklab.ui.dialog.AbstractMMLDialog
All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
FloatingEquipmentDatabaseDialog

public abstract class AbstractMMLDialog extends megamek.client.ui.dialogs.abstractDialogs.AbstractDialog
This is the base class for dialogs in MML, inherited from MM. This class handles setting the UI, managing the X button, managing the escape key, and saving the dialog preferences.

Inheriting classes must call initialize() in their constructors and override createCenterPane().

See Also:
  • Constructor Details

    • AbstractMMLDialog

      protected AbstractMMLDialog(JFrame frame, String name, String title)
      This creates a non-modal AbstractMMLDialog using the default MML dialog resource bundle. This is the normal constructor to use for an AbstractMMLDialog.
    • AbstractMMLDialog

      protected AbstractMMLDialog(JFrame frame, boolean modal, String name, String title)
      This creates an AbstractMMLDialog using the default MML resource bundle. It allows one to create modal dialogs.
    • AbstractMMLDialog

      protected AbstractMMLDialog(JFrame frame, boolean modal, ResourceBundle resources, String name, String title)
      This creates an AbstractMMLDialog using the specified resource bundle. This is not recommended by default.
  • Method Details

    • setPreferences

      protected void setPreferences() throws Exception
      This override forces the preferences for this class to be tracked in MML instead of MegaMek
      Overrides:
      setPreferences in class megamek.client.ui.dialogs.abstractDialogs.AbstractDialog
      Throws:
      Exception - if there's an issue initializing the preferences. Normally this means a component has not had its name value set.