Discussion:
Unicode character picker module
Jesse Glick
2002-08-01 02:18:00 UTC
Permalink
Here is a little module that you might find useful if you do a lot of
work with strange character sets in NetBeans, are frustrated with
misconfigured keyboards, or simply if you are very bored. :-)

http://contrib.netbeans.org/servlets/ProjectDownloadList

Look for insertunicode.nbm. After you install it, try the context menu
in the Source Editor. I tried to make it as keyboard-friendly as
possible, so start with Shift-F10. Tested in NB 3.4 using JDK 1.4 on Linux.

Handy if you want to name your Java methods in Thai, write XHTML pages
including Canadian Aboriginal Syllabics, ...the possibilities are endless.

-Jesse
--
Jesse Glick <mailto:***@sun.com> x22801
NetBeans, Open APIs <http://www.netbeans.org/>
Kishore, Sumit
2002-08-01 02:31:49 UTC
Permalink
Wow man! You rule at having free time on your hands :-) ... Seriously, a
handy utility.

I get this exception when I try it.

Sumit.


java.lang.NullPointerException
at
org.netbeans.modules.insertunicode.InsertUnicodeAction$1.actionPerformed(Unk
nown Source)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1820)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
19)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1092)
at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Basic
MenuItemUI.java:932)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1380)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
at java.awt.Container.dispatchEventImpl(Container.java:1423)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:190)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:144)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

==========================================
Sumit Kishore
ESX Cougar
(408) 875 0158
***@kla-tencor.com
http://sumit-kishore.tripod.com




-----Original Message-----
From: Jesse Glick [mailto:***@sun.com]
Sent: Wednesday, July 31, 2002 7:18 PM
To: ***@netbeans.org
Subject: [nbusers] Unicode character picker module


Here is a little module that you might find useful if you do a lot of
work with strange character sets in NetBeans, are frustrated with
misconfigured keyboards, or simply if you are very bored. :-)

http://contrib.netbeans.org/servlets/ProjectDownloadList

Look for insertunicode.nbm. After you install it, try the context menu
in the Source Editor. I tried to make it as keyboard-friendly as
possible, so start with Shift-F10. Tested in NB 3.4 using JDK 1.4 on Linux.

Handy if you want to name your Java methods in Thai, write XHTML pages
including Canadian Aboriginal Syllabics, ...the possibilities are endless.

-Jesse
--
Jesse Glick <mailto:***@sun.com> x22801
NetBeans, Open APIs <http://www.netbeans.org/>
Jesse Glick
2002-08-01 04:56:48 UTC
Permalink
Post by Kishore, Sumit
Wow man! You rule at having free time on your hands :-) ... Seriously, a
handy utility.
I get this exception when I try it.
java.lang.NullPointerException
at
org.netbeans.modules.insertunicode.InsertUnicodeAction$1.actionPerformed(Unk
nown Source)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
Huh... try building from sources (contrib/insertunicode/), I just
checked in a one-line patch that might fix it (and just make it beep).
Might be window-manager dependent, I'm not sure. Also remember I only
tried it on 1.4 with NB 3.4 on Linux using MDI mode; your mileage may
vary, but of course feel free to contribute patches.

Also download the revised version I posted (as an NBM, and source) about
half an hour ago: it shows the official Unicode name for a character as
well as the literal display, which is really helpful for
hard-to-decipher scripts. Might give you an OutOfMemoryError if you open
a lot of submenus and try to write Chinese, but hey, we are not small
children, we know how to modify -Xmx. :-)

If anyone feels like playing with it, just ask for Developer role in
contrib.netbeans.org, and try to make the keyboard accessibility at
least as good as it is now.

I avoided the traditional character-picker interface mainly because they
tend to be really cumbersome for use from a keyboard. But I can imagine
a dialog well-tuned for quick data entry as well as browsing, so you
could type e.g.

Alt-U 0 1 5 9 ENTER

to insert the second character in Petr Hrebejk's name. :-)

The Alt-U (for example) would pop open a dialog; 0 then 1 would select
the second 256-long code page (Latin Extended A and some of Latin
Extended B) and display it in a 16x16 grid; 5 would select the sixth
row; 9 would select LATIN SMALL LETTER R WITH CARON and display that
text in a status bar; ENTER would insert raw (or Alt-R, Alt-J, Alt-X,
with ENTER choosing the last one you used for speed). That would be
pretty slick.

-Jesse
--
Jesse Glick <mailto:***@sun.com> x22801
NetBeans, Open APIs <http://www.netbeans.org/>
Loading...