Package org.basex.gui.layout
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-24, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description BaseXHistory(StringsOption key, Options options)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String input)
Adds the specified value on top of history and stores the history in the options.String
get(boolean next)
Returns a history value.String[]
values()
Returns all values.
-
-
-
Field Detail
-
MAX
public static final int MAX
Maximum number of history entries.- See Also:
- Constant Field Values
-
MAXPAGE
public static final int MAXPAGE
Maximum number per page.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseXHistory
public BaseXHistory(StringsOption key, Options options)
Constructor.- Parameters:
key
- key to history valuesoptions
- options
-
-
Method Detail
-
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
-
-