package siprp;

import javax.swing.text.JTextComponent;

import com.evolute.modules.spellchecker.EvoSpellChecker;
import com.evolute.modules.spellchecker.EvoSpellChecker.Dictionary;


public class SIPRPSpellChecker
{
	
	private static SIPRPSpellChecker instance = null;
	
	private final EvoSpellChecker spellChecker;
	
	private SIPRPSpellChecker()
	{
		this.spellChecker = new EvoSpellChecker( Dictionary.PT_PT );
	}
	
	public static SIPRPSpellChecker getInstance()
	{
		if( instance == null )
		{
			instance = new SIPRPSpellChecker();
		}
		return instance;
	}

	public void attachSpellCheckToComponent( JTextComponent fieldText )
	{
		spellChecker.attachSpellCheckToComponent( fieldText );
	}
	
}
