Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jext.console
Class HistoryModel  view HistoryModel download HistoryModel.java

java.lang.Object
  extended byorg.jext.console.HistoryModel

public class HistoryModel
extends java.lang.Object


Field Summary
private  java.util.Vector data
           
private  int max
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max

private int max

data

private java.util.Vector data
Constructor Detail

HistoryModel

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

Method Detail

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