xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Re: How to convert int unicode to character/String
Date Tue, 27 Nov 2007 00:23:06 GMT
Hi Qian.

Qian Li:
> Currently I have a org.apache.batik.dom.events.DOMKeyEvent, I can use
> getCharCode() to get the input value, however it's in int value, does
> anyone know how I can convert this value into the actual
> character/String.

The value returned by getCharCode() is the Unicode character.  This
means that you can just cast it to a char:

  DOMKeyEvent evt = …;
  char c = (char) evt.getCharCode();

Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message