I want to know if there is a JavaDoc for DictionaryForMids?
Can you tell me What purpose is "class SelectionMode inside class StringColourItemTextPart" if there is no any JavaDoc.
In addition to the documentation on the web pages, there are usually comments in the source code. Unfortunately this is not the case for most of the StringColourItem class. That's why we need a code review of StringColourItem, see http://dictionarymid.sourceforge.net/forum/index.php?topic=145.0 (http://dictionarymid.sourceforge.net/forum/index.php?topic=145.0)
To my knowledge the meaning of the SelectionMode values is the following:
- none: does not allow to select the content
- singleString: the selection is done for the string (or word) where the pointer is clicked, typically via a touchpad
- all: the selection is done for the whole content where the pointer is clicked
Could you test the selection feature of StringColourItem ? If you can confirm that this explanation is correct, then I will add this explanation in the source.
Hope that helps,
Gert
I just think that class is to complex. Well, I will review and report it.
Already any results ? Some support that you could give to the DictionaryForMIDs project ?
Gert
I got a little result, about class StringColourItemTextPart, the FontStyle styleParam and SelectionMode seletionModeParam are never used in paint method.
StringColourItemTextPart(String textParam, Color colourParam, FontStyle styleParam, SelectionMode seletionModeParam)
Ok ! Let us know when you have something that we can use for the DictionaryForMIDs project.
Regards,
Gert
I found bitmap font classes are very slow, the main reason as below in class BitmapFont:
1. byte width = dataIn.readByte(); in public boolean loadFont() throws Exception
For Chinese or Japanese, almost characaters in same width, so this implementation isn't needed.
2. In public boolean loadChars() throws Exception, the same png file is read more than one time, this is also lower performance. I did a test to show a UTF-8 text file (about 47K) on my device emulator, the png files are read about 1500 times, but all pnf files are only 437, if only read one time and process all images in png file, the speed can be faster about x1.5 than current.
Say, do you now have a version of DfM on your platform for public release ?
Regards,
Gert