Class BaseXHistory

java.lang.Object
org.basex.gui.layout.BaseXHistory

public final class BaseXHistory extends Object
This class remembers previous text inputs of a GUI component.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • MAX

      public static final int MAX
      Maximum number of history entries.
      See Also:
    • MAXCOMPACT

      public static final int MAXCOMPACT
      Maximum number of compact history.
      See Also:
  • Constructor Details

    • BaseXHistory

      public BaseXHistory(StringsOption history, Options options)
      Constructor.
      Parameters:
      history - history values
      options - options
  • Method Details

    • add

      public void add(String input)
      Adds the specified value on top of history and stores the history in the options. Empty values will be ignored.
      Parameters:
      input - new input
    • get

      public String get(boolean next)
      Returns a history value.
      Parameters:
      next - next/previous entry
      Returns:
      entry, or null if history is empty
    • values

      public String[] values()
      Returns all values.
      Returns:
      history values