KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SnowMailClient > keyboard > CompletionBuffer


1 package SnowMailClient.keyboard;
2
3 import java.util.*;
4
5 public final class CompletionBuffer
6 {
7   final StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
8
9
10   public CompletionBuffer()
11   {
12
13   } // Constructor
14

15   /** add the chars to the buffer
16   */

17   public void addChars(String JavaDoc chars)
18   {
19     buffer.append(chars);
20   }
21
22   public int getBufferLength() { return buffer.length(); }
23
24   public void resetBuffer()
25   {
26     buffer.setLength(0);
27   }
28
29   public String JavaDoc getChars() { return buffer.toString(); }
30   public String JavaDoc toString() { return getChars(); }
31
32 } // CompletionBuffer
Popular Tags