[jsword-devel] proposal

DM Smith dmsmith555 at yahoo.com
Wed Sep 15 20:55:22 MST 2004


There are certain characters that are not permitted in Unicode or in 
XML. It makes sense that the routine would ignore those characters.

John Jacques wrote:

>DM Smith and Troy,
>
>I would like to make the following change to UniTextEdit.java
>
> void jTextArea1_keyTyped(KeyEvent e) {
>      char typedChar = e.getKeyChar();
>      String pushChar = null;
>      statusBar.setText("");
>
>      SWInputMethod inputMethod = (SWInputMethod)
>imComboBox.getSelectedItem();
>
>      pushChar = inputMethod.translate(typedChar);
>      if (inputMethod.getState() > 1) {
>          statusBar.setText("Compound '"+typedChar+"'");
>          e.consume();
>+      } else if( null == pushChar ) {
>      } else {
>          if (pushChar.length() > 1) {
>              e.consume();
>              jTextArea1.insert(pushChar,
>jTextArea1.getCaretPosition());
>          }
>          else e.setKeyChar(pushChar.charAt(0));
>      }
>  }
>
>My reason is as follows:
>
>I would like to be able to type characters in the current locale in the
>editor.  With the greek prepositions, for example, it would be best to
>have a different flash card for each case.  To accomplish this, I would
>like to indicate the case of the object of the preposition in the
>"word".
>
>	ὑπο,ὑπ',ὑφ' gen.
>
>My plan is to use a control sequence to change modes, something like
>ctrl-t.  Since the control sequence is not intended to generate a
>character, I would like to be able to return 'null' from the translate()
>method and have UniTextEditor.java ignore it.
>
>Is this acceptable?  Would it break other uses of UniTextEdit?
>
>
>_______________________________________________
>jsword-devel mailing list
>jsword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>  
>



More information about the jsword-devel mailing list