com.jspell.gui
Class JSpellSwingTextComponentWrapper

java.lang.Object
  extended by com.jspell.gui.JSpellSwingTextComponentWrapper
All Implemented Interfaces:
JSpellTextComponent

public class JSpellSwingTextComponentWrapper
extends java.lang.Object
implements JSpellTextComponent

A wrapper class for JTextComponents.


Constructor Summary
JSpellSwingTextComponentWrapper(JSpellTextComponent text)
          Construct the wrapper.
JSpellSwingTextComponentWrapper(javax.swing.text.JTextComponent text)
          Construct the wrapper.
JSpellSwingTextComponentWrapper(java.awt.TextComponent text)
          Construct the wrapper.
 
Method Summary
 void deselect()
          Removes the highlight from the text component.
 java.awt.Frame getFrame()
          Get the Frame or parent Frame containing this text component.
 java.lang.String getText()
          Returns the text of the text component.
 java.awt.TextComponent getTextComponent()
          Returns the TextComponent object in this wrapper.
 void select(int begin, int end)
          Highlights the text in the text component.
 void setText(java.lang.String string)
          Sets the text in the text component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpellSwingTextComponentWrapper

public JSpellSwingTextComponentWrapper(javax.swing.text.JTextComponent text)
Construct the wrapper.

Parameters:
text - a JTextComponent object.

JSpellSwingTextComponentWrapper

public JSpellSwingTextComponentWrapper(java.awt.TextComponent text)
Construct the wrapper.

Parameters:
text - an AWT TextComponent object.

JSpellSwingTextComponentWrapper

public JSpellSwingTextComponentWrapper(JSpellTextComponent text)
Construct the wrapper.

Parameters:
text - a JSpellTextComponent object.
Method Detail

getTextComponent

public java.awt.TextComponent getTextComponent()
Returns the TextComponent object in this wrapper.

Specified by:
getTextComponent in interface JSpellTextComponent
Returns:
a TextComponent.

getText

public java.lang.String getText()
Returns the text of the text component.

Specified by:
getText in interface JSpellTextComponent
Returns:
a String.

setText

public void setText(java.lang.String string)
Sets the text in the text component.

Specified by:
setText in interface JSpellTextComponent
Parameters:
string - a String.

deselect

public void deselect()
Removes the highlight from the text component.

Specified by:
deselect in interface JSpellTextComponent

select

public void select(int begin,
                   int end)
Highlights the text in the text component.

Specified by:
select in interface JSpellTextComponent
Parameters:
begin - an int.
end - an int.

getFrame

public java.awt.Frame getFrame()
Get the Frame or parent Frame containing this text component.

Specified by:
getFrame in interface JSpellTextComponent
Returns:
a Frame object.


JSpell SDK - Spell Checker for the Java ™ Platform
Copyright © 2009 Page Scholar Inc, All Rights Reserved - http://www.jspell.com