public class HistoryModel
extends java.lang.Object
| Constructor and Description |
|---|
HistoryModel(int max)
Creates a new history model, seizing it
according to the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(java.lang.String text)
When the user validate a new entry, we add it to the
history.
|
protected void |
finalize()
Patch
-> Memory management improvements : it may help the garbage collector.
|
java.lang.String |
getItem(int index)
When user press UP or DOWN, we need to get
a previous typed String, stored in the Vector.
|
int |
getSize()
As the user can use arrows to get up and down
in the list, we need to know its max capacity.
|
public HistoryModel(int max)
max - The maximum numbers of items this history can holdpublic void addItem(java.lang.String text)
text - The String to be added to the historypublic java.lang.String getItem(int index)
index - The index of the String to getpublic int getSize()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableCopyright ? 2002 Romain Guy.