net.sf.intltyper.lib
Interface GUIAdapter

All Known Implementing Classes:
SwingPanel

public interface GUIAdapter

Interface for the IntlTyper lib to communicate with the GUI (a text component).


Method Summary
 boolean canDisplay(char c)
          Called to determin whether the text component can display a specific character.
 void changeText(int delete, java.lang.String insert)
          Called to indicate that the text in the text component should be changed.
 void disableInput()
          Called to indicate that the input box is no longer needed.
 void enableInput(java.lang.String prompt)
          Called to indicate that the text component should enable an input box to input IntlTyper specific information.
 

Method Detail

changeText

public void changeText(int delete,
                       java.lang.String insert)
Called to indicate that the text in the text component should be changed.

Parameters:
delete - number of characters to delete left of cursor position
insert - text to insert at cursor position

enableInput

public void enableInput(java.lang.String prompt)
Called to indicate that the text component should enable an input box to input IntlTyper specific information. The input box should be focused automatically.

Parameters:
prompt - the text in front of that input box

disableInput

public void disableInput()
Called to indicate that the input box is no longer needed. This should unfocus the input box.


canDisplay

public boolean canDisplay(char c)
Called to determin whether the text component can display a specific character.

Parameters:
c - the character to display
Returns:
whether the component can display it