Class AmountDialog

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
megamek.client.ui.dialogs.abstractDialogs.AbstractDialog
megamek.client.ui.dialogs.buttonDialogs.AbstractButtonDialog
megameklab.ui.dialog.AbstractMMLButtonDialog
megameklab.ui.dialog.AmountDialog
All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class AmountDialog extends AbstractMMLButtonDialog
This is a dialog for entering an amount. It is used in various places in MML, such as when transferring items between units.
See Also:
  • Method Details

    • showDialog

      public static int showDialog(JFrame frame, String itemName, int maxAmount, String actionName)
    • getAmount

      public int getAmount()
    • createCenterPane

      protected Container createCenterPane()
      Specified by:
      createCenterPane in class megamek.client.ui.dialogs.abstractDialogs.AbstractDialog
    • okAction

      protected void okAction()
      Overrides:
      okAction in class megamek.client.ui.dialogs.buttonDialogs.AbstractButtonDialog
    • cancelAction

      protected void cancelAction()
      Overrides:
      cancelAction in class megamek.client.ui.dialogs.abstractDialogs.AbstractDialog