Class SelectionMenuEntry


  • public class SelectionMenuEntry
    extends MenuEntry
    • Constructor Detail

      • SelectionMenuEntry

        public SelectionMenuEntry​(java.lang.String label,
                                  java.lang.String[] options,
                                  int ypos,
                                  int indent,
                                  int color,
                                  FontSize fontSize)
    • Method Detail

      • getDisplayText

        public java.lang.String getDisplayText()
        Description copied from class: MenuEntry
        Gets the current text to display.
        Overrides:
        getDisplayText in class MenuEntry
        Returns:
        The text to display
      • getDisplayColor

        public int getDisplayColor​(boolean mouseOver)
        Gets the entries display color.
        Overrides:
        getDisplayColor in class MenuEntry
        Returns:
        The color.
      • getSelectionIndex

        public int getSelectionIndex()
        Gets the selected index if multiple options can be selected.
        Returns:
        The selected index.
      • setSelectionIndex

        public void setSelectionIndex​(int index)
        Sets the selected index.
        Parameters:
        index - The new index.
      • getSelection

        public java.lang.String getSelection()
        Gets the currently selected option.
        Returns:
        The selected option.
      • switchFore

        public int switchFore()
        Switches to the next option.
        Returns:
        index of the selected option.
      • switchBack

        public int switchBack()
        Switches to the previous option.
        Returns:
        index of the selected option.
      • getEntries

        public java.lang.String[] getEntries()
      • setEntries

        public void setEntries​(java.lang.String[] options)
      • isSelectable

        public boolean isSelectable()
        Checks, if the entry is selectable.
        Overrides:
        isSelectable in class MenuEntry
        Returns:
        true, if entry is selectable.