org.jext.console
Class HistoryModel

java.lang.Object
  extended byorg.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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryModel

public HistoryModel(int max)
Creates a new history model, seizing it according to the specified size.

Parameters:
max - The maximum numbers of items this history can hold
Method Detail

addItem

public void addItem(java.lang.String text)
When the user validate a new entry, we add it to the history.

Parameters:
text - The String to be added 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.

Parameters:
index - The index of the String to get
Returns:
A String corresponding to a previous entry

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.

Returns:
Maximum capacity of the history

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

Throws:
java.lang.Throwable


Copyright ? 2002 Romain Guy.