Class PickCarry

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

final class PickCarry extends KDialog
Chooses between multiple carry options.
Author:
David Ripton
  • Field Details

  • Constructor Details

    • PickCarry

      PickCarry(JFrame parentFrame, ClientGUI clientGui, int carryDamage, Set<String> choices)
      Each choice is a String of form "Warbear in Plains Hex G3"
  • Method Details

    • addButton

      private void addButton(String text)
    • findCarryChoiceForHex

      public String findCarryChoiceForHex(String hex)
      Parameters:
      hex - String The short string denoting a hex on the battle map, eg. A1 or D5 Client calls this when user clicked on a hex (or chit) instead of the dialog. Check whether the clicked hex is a potential carry and if yes, return choice the description string
    • handleCarryToDescription

      public void handleCarryToDescription(String desc)
      Called by click on one one of the buttons (from actionPerformed) or, from battleMap via Client, if a chit was clicked which is a potential carry target.
      Parameters:
      desc - String denoting a carry target choice