Interface LocationSelectListener

All Known Implementing Classes:
DamageEditorDiagram, UnitDisplayPanel

public interface LocationSelectListener
Receives the location a user picked out of an armor diagram, such as by double-clicking a unit location in the unit display or the damage editor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    locationSelected(int location)
    Called when the user selects a unit location in an armor diagram.
    default boolean
    Whether a single click selects a location, rather than a double click.
  • Method Details

    • locationSelected

      void locationSelected(int location)
      Called when the user selects a unit location in an armor diagram.
      Parameters:
      location - the index of the selected location, as used by Entity
    • selectsOnSingleClick

      default boolean selectsOnSingleClick()
      Whether a single click selects a location, rather than a double click. The unit display uses a double click, because a single click there would switch tabs whenever the diagram was clicked. A diagram whose whole purpose is picking a location, such as the one in the damage editor, selects on a single click.
      Returns:
      true to be told about single clicks as well