|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.intltyper.lib.GUIHelper
Class that contains all the gui-specific code which is not specific to a special GUI environment. This is the class the GUI will communicate with most of the time.
Field Summary | |
private java.lang.String |
autotype
|
private int |
autotypeLook
|
private GUIAdapter |
ga
|
private IntlTyperFacade |
itf
|
private KeySequenceList |
ksl
|
private int |
mode
|
private java.lang.String |
prefix
|
private java.lang.String |
shortPrefix
|
private java.lang.String |
todefine
|
private boolean |
useUnicodeMap
|
Constructor Summary | |
protected |
GUIHelper(IntlTyperFacade itf,
GUIAdapter ga)
Creates a GUIHelper. |
Method Summary | |
private void |
changeTextX(int delete,
java.lang.String insert)
Internal method handling both loading config files and changing text. |
int |
getNecessaryContextLength()
Determines how much context is required for textAdded(java.lang.String, int) . |
private void |
handleCommand(java.lang.String cmd)
Handler for IntlTyper commands |
void |
inputChanged(java.lang.String newInput)
Called by the text component's input field when the input has changed. |
void |
inputConfirmed(java.lang.String newInput)
Called by the text component's input box when the input has been confirmed (by the return key) |
void |
loadConfig(java.lang.String cfg)
Loads a configuration. |
private void |
recalcAutoType()
Recalculates the needed context length for AutoType. |
void |
saveConfig(java.lang.String to)
Saves a configuration. |
static java.lang.String[] |
split(java.lang.String tosplit,
java.lang.String sep)
Utility method to split a String at separators. |
void |
textAdded(java.lang.String context,
int length)
Called by the text component when text has been added. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private GUIAdapter ga
private KeySequenceList ksl
private int mode
private java.lang.String shortPrefix
private java.lang.String prefix
private java.lang.String todefine
private java.lang.String autotype
private int autotypeLook
private boolean useUnicodeMap
private IntlTyperFacade itf
Constructor Detail |
protected GUIHelper(IntlTyperFacade itf, GUIAdapter ga)
itf
- the facade that created for this GuiHelperga
- the GUIAdapter to communicate withIntlTyperFacade.buildGUIHelper(GUIAdapter)
Method Detail |
public void textAdded(java.lang.String context, int length)
context
- The last few characters before the cursorlength
- The length of the inserted text.getNecessaryContextLength()
public int getNecessaryContextLength()
textAdded(java.lang.String, int)
.
public void inputChanged(java.lang.String newInput)
newInput
- the new input valuepublic void inputConfirmed(java.lang.String newInput)
newInput
- the new input valueprivate void handleCommand(java.lang.String cmd)
private void recalcAutoType()
public void saveConfig(java.lang.String to)
to
- name of the KeySequence where the configuration
should be savedpublic void loadConfig(java.lang.String cfg)
cfg
- name of the KeySequencs containing the configuration
to loadprivate void changeTextX(int delete, java.lang.String insert)
public static java.lang.String[] split(java.lang.String tosplit, java.lang.String sep)
tosplit
- The string to splitsep
- Separator to split at
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |