Class Concede

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

final class Concede extends KDialog
Class Concede allows a player to flee or concede before starting a Battle.
Author:
David Ripton
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • flee

      private final boolean flee
    • location

      private Point location
    • gui

      private final ClientGUI gui
    • ally

      private final Legion ally
    • attacker

      private final Legion attacker
    • defender

      private final Legion defender
    • saveWindow

      private final SaveWindow saveWindow
    • showMapButton

      private final JButton showMapButton
  • Constructor Details

  • Method Details

    • preventSpaceAction

      private void preventSpaceAction(JButton button, Action newAction)
      Prevent Space from triggering the firing of the action normally associated to the given button; trigger the given action instead. The "normal" action of the button can still be activated with mouse click or with the mnemonic key (on windows with Alt + the underlined character)
      Parameters:
      button -
      newAction -
    • notifyConcede

      public void notifyConcede()
      Make the user aware that there is a concede or flee dialog waiting for response. This is called by the doInsteadAction (which is fired when SPACE or ENTER is pressed). Make a beep, requests focus and puts it to front, and sets as default action the show Battle Map button.
    • showLegion

      private Box showLegion(Legion legion, boolean dead)
    • concede

      static void concede(ClientGUI gui, JFrame parentFrame, Legion ally, Legion enemy)
    • flee

      static void flee(ClientGUI gui, JFrame parentFrame, Legion ally, Legion enemy)
    • getAttacker

      public Legion getAttacker()
    • processAnswer

      private void processAnswer(boolean answer)