Class TextEntryMenuEntry


  • public class TextEntryMenuEntry
    extends MenuEntry
    • Constructor Detail

      • TextEntryMenuEntry

        public TextEntryMenuEntry​(java.lang.String label,
                                  int ypos,
                                  int indent,
                                  int color,
                                  FontSize fontSize,
                                  java.lang.String entryText,
                                  int maxLength)
        Creates a text entry MenuEntry.
        Parameters:
        label -
        ypos -
        indent -
        color -
        fontSize -
    • Method Detail

      • getDisplayText

        public java.lang.String getDisplayText()
        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.
      • getEntryText

        public java.lang.String getEntryText()
        Gets the entered text.
        Returns:
        The text.
      • setEntryText

        public void setEntryText​(java.lang.String text)
        Sets the entered text.
        Parameters:
        text - The text.
      • addChar

        public void addChar​(char c)
        Adds a char to the entry.
        Parameters:
        c - The char.
      • removeChar

        public void removeChar()
        Removes the last char from the entered text.
      • isEditable

        public boolean isEditable()
        Checks, if a text can be entered for this entry.
        Overrides:
        isEditable in class MenuEntry
        Returns:
        true, if text editing is allowed.
      • isSelectable

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