|
From: Arne L. <A.L...@ad...> - 2008-01-28 21:02:20
|
Hi Rogan,
you need to extend AsYouTypeTextComponentAdapter and override
adaptedValueChanged with something like this:
protected void adaptedValueChanged(Object newValue) {
super.adaptedValueChanged(((String)newValue).getBytes());
}
You also have to reimplement TextComponentBinding to use your Adapter
and to set the bytes, i.e. you have to change line 41 like this:
textComponent.setText(new
String((byte[])valueModel.getValue()));
and implement an appropriate Binder (take a look at TextAreaBinder).
<http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=appropriate>Of course,
if you need you have to handle encoding-specific conversions at the
places above.
Regards,
Arne
Rogan Dawes schrieb:
> Hi folks,
>
> I'd like to represent a byte[] field as a String in a JTextArea.
>
> Can anyone explain how to create such a Binder/Binding?
>
> Thanks
>
> Rogan
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Springframework-rcp-dev mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev
>
>
|