Q. We are interested in using KFC for our commercial application. How much does the KFC cost for commercial use?
It's free. Please read "Copyright" of KFC. You should display the KFC copyright notice on "About" dialogs (e.g. version information windows) and distribution materials. I have added the following APIs for convenience :-)
jp.kyasu.awt.Dialog#showKFCCopyright() jp.kyasu.awt.Dialog#showKFCCopyright(Frame f)
Q. Does KFC work on Internet Explorer 4.0?
Almost yes. But the rich text is displayed less well becase the FontMetrics of Internet Explorer 4.0 returns the incorrect value. Try FontMetrics Test.
Q. Is KFC a good starting point to implement a SGML or an XML editor?
I do not think so.
The document (rich text) model of KFC is very simple. The document is a sequence of paragraphs. Each paragraph has a text and style (paragraph style). The text is a sequence of characters that can have style (text style) and action. So, the document model of KFC is not enough to handle the structured document (SGML, XML) or Document Object Model (DOM) because they are based on the tree model. Also, HTML package in KFC (jp.kyasu.graphics.html package) renders HTML into rich text in deterministic way, but it generates HTML from rich text in heuristic way.
To handle the structured document or DOM, much rework on KFC should be done.
Q. The TextArea of KFC doesn't seem to do word wrapping correctly.
The TextComponent of KFC has following three ward wrapping mode:
jp.kyasu.awt.TextComponent.CHAR_WRAP jp.kyasu.awt.TextComponent.WORD_WRAP jp.kyasu.awt.TextComponent.NO_WRAPA default ward wrapping mode of the TextArea is CHAR_WRAP. If you want to use a TextArea as WORD_WRAP mode, please use the "setLineWrap()" method as following:
TextArea textArea = new TextArea(); textArea.setLineWrap(TextArea.WORD_WRAP);
Q. How do I use the spanish propeties?
KFC 1.1 includes the property files for english, japanese, spanish, and catalan locales. Spanish and catalan properties are provided by Francesc RosesLANG=es_ES; export LANG;To indicate the default locale ES in NT and OS/2 in english, you must use a static block:
[...] import java.util.*; [...] public class Notepad extends Pad { static { // Static block to specify your own Locale Locale.setDefault( new Locale("es", "ES") ); } public Notepad() { super(new TextEditor()); } // Constructor [...] } // end class Notepad
Q. I need to input German (,Norwegian ... etc.) national characters. The TextArea of KFC doesn't seem to accept any characters above 127. Are there any quick fixes for this?
This is fixed. The old answer was the following.
The TextComponent of KFC can dynamically change its key mapping.
For example:TextArea textArea = new TextArea(); Keymap keymap = textArea.getKeymap(); keymap.setKeyCharMap((char)128, // keyChar of KeyEvent "insert-character"); // key action name /* or keymap.setKeyCodeMap(KeyEvent.VK_XXX, // keyCode of KeyEvent "insert-character"); // key action name */ textArea.setKeymap(keymap);