Module AM37

Class SimpleListItem

All Implemented Interfaces:
Toggleable, KeyEventListener
Direct Known Subclasses:
ListItem

public class SimpleListItem
extends ActiveItem
  • Field Details

    • item

      protected final java.lang.String item
      The item string
    • selected

      protected boolean selected
      Determines if this has been selected in the parent
  • Constructor Details

    • SimpleListItem

      public SimpleListItem​(WindowItem parent, CursorPosition initCoord, java.lang.String item)
      Default constructor

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

      Parameters:
      parent - the Window containing this
      initCoord - the item coordinates
      item - the object id
  • Method Details

    • getItem

      public java.lang.String getItem()
      item getter
      Returns:
      the ListItem item
    • highlight

      protected void highlight()
      Highlights the item, using a light color scheme
    • deselect

      public void deselect()
      Brings the item to its initial state, using the parent's background color
    • show

      public void show()
      Prints the object on the screen
      Overrides:
      show in class WindowItem
    • onSelect

      public void onSelect()
      Highlights the item, using a light color scheme
      Specified by:
      onSelect in class ActiveItem
    • onRelease

      public void onRelease()
      Brings back the item
      Specified by:
      onRelease in class ActiveItem