java.lang.Object
org.jext.console.HistoryModel
- public class HistoryModel
- extends java.lang.Object
|
Constructor Summary |
HistoryModel(int max)
Creates a new history model, seizing it
according to the specified size. |
|
Method Summary |
void |
addItem(java.lang.String text)
When the user validate a new entry, we add it to the
history. |
private void |
addItemToEnd(java.lang.String item)
We can need to add an item directly at the end of
the list. |
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. |
max
private int max
data
private java.util.Vector data
HistoryModel
public HistoryModel(int max)
- Creates a new history model, seizing it
according to the specified size.
addItem
public void addItem(java.lang.String text)
- When the user validate a new entry, we add it to the
history.
getItem
public java.lang.String getItem(int index)
- When user press UP or DOWN, we need to get
a previous typed String, stored in the Vector.
getSize
public int getSize()
- As the user can use arrows to get up and down
in the list, we need to know its max capacity.
addItemToEnd
private void addItemToEnd(java.lang.String item)
- We can need to add an item directly at the end of
the list.
finalize
protected void finalize()
throws java.lang.Throwable
- Patch
-> Memory management improvements : it may help the garbage collector.
-> Author : Julien Ponge (julien@izforge.com)
-> Date : 23, May 2001