jmathlib.ui.swing
Class AutoCompletion

java.lang.Object
  extended by jmathlib.ui.swing.AutoCompletion

public class AutoCompletion
extends java.lang.Object


Field Summary
private  java.lang.String[] list
          A sorted array with function names.
(package private) static AutoCompletion runningReference
           
 
Constructor Summary
AutoCompletion()
           
 
Method Summary
private  int firstIndexOfMatchedString(java.lang.String prefix)
           
 java.lang.String[] getMatched(java.lang.String prefix)
          Return those functions starting with the prefix.
private  int lastIndexOfMatchedString(java.lang.String prefix, int startingPoint)
           
 void load()
           
 void load(java.lang.String[] fileDirectories, java.lang.String[] fileExtensions)
           
private  java.util.Vector recursiveLoad(java.io.File directory, java.lang.String[] fileExtensions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runningReference

static AutoCompletion runningReference

list

private java.lang.String[] list
A sorted array with function names.

Constructor Detail

AutoCompletion

public AutoCompletion()
Method Detail

load

public void load()

load

public void load(java.lang.String[] fileDirectories,
                 java.lang.String[] fileExtensions)

recursiveLoad

private java.util.Vector recursiveLoad(java.io.File directory,
                                       java.lang.String[] fileExtensions)

getMatched

public java.lang.String[] getMatched(java.lang.String prefix)
Return those functions starting with the prefix.

Parameters:
prefix - Prefix of the function name.
Returns:
An array of function (full) names. If nothing can be matched, it returns null

firstIndexOfMatchedString

private int firstIndexOfMatchedString(java.lang.String prefix)

lastIndexOfMatchedString

private int lastIndexOfMatchedString(java.lang.String prefix,
                                     int startingPoint)

FOOTER

BOTTOM