Module AM37

Class SingleChoiceListPane

All Implemented Interfaces:
Toggleable, KeyEventListener

public class SingleChoiceListPane
extends ActiveItem
  • Constructor Details

    • SingleChoiceListPane

      public SingleChoiceListPane​(WindowItem parent, CursorPosition initCoord, int width, int height, java.util.List<java.lang.String> options, java.lang.String id)
      Custom constructor

      Creates an item using custom settings
      The initial coordinates are relative to the object's parent

      Parameters:
      parent - the Dialog containing this
      initCoord - the item coordinates
      width - the object width
      height - the object height
      id - the object id
  • Method Details

    • getCli

      protected CLI getCli()
      cli getter
      Overrides:
      getCli in class WindowItem
      Returns:
      the parent's CLI attribute
    • onSelect

      public void onSelect()
      Defines the object behaviour when selected
      Specified by:
      onSelect in class ActiveItem
    • onRelease

      public void onRelease()
      Defines the object behaviour when released
      Specified by:
      onRelease in class ActiveItem
    • show

      public void show()
      Draws itself
      Overrides:
      show in class WindowItem
    • onArrowRight

      public void onArrowRight()
      Selects the next ActiveItem on the Dialog
    • onArrowLeft

      public void onArrowLeft()
      Selects the previous ActiveItem on the Dialog
    • onCarriageReturn

      public void onCarriageReturn()
      Performs an action based on the currently selected ActiveItem
    • onTab

      public void onTab()
      Selects the next ActiveItem on the Dialog
    • onArrowUp

      public void onArrowUp()
      Selects the previous ActiveItem on the Dialog
    • onArrowDown

      public void onArrowDown()
      Selects the next ActiveItem on the Dialog