Hi,
I created my own Binding IconBiding based on the LabelBinding. In my form I add this binding to the formBuilder and all is ok.
Now, I want to refresh it because the icon has changed. How I can do it?
Thanks
Dominique
Hi,
I created my own Binding IconBiding based on the LabelBinding. In my form I add this binding to the formBuilder and all is ok.
Now, I want to refresh it because the icon has changed. How I can do it?
Thanks
Dominique
you have to implement valueModelChanged(Object) of LabelBinding:
Code:protected void valueModelChanged(Object newValue) { label.setIcon((Icon)newValue); }
___
Mathias
This done, but how I can call it or trigger it from my AbstractForm class.
Cheers
Dominique
you do this through formmodel:
formModel.getValueModel("iconfield").setValue(newI con);
___
Mathias
Hello,
Excuse me but I don't see the use case of IconBinding ? (No doubt there is).
Thank you,
Christophe.
Thanks Mathias it works ;-)
Christophe: In my case I have to scan a document and when the scanning is finished I would like to show it on the screen, the only way I found up to now (may be there is another way) is to transform the java.awt.image i get into a java.swing.ImageIcon and to display it I use the JLabel.setIcon.
May be you have another idea?
Regards
Dominique
Thank you for these precisions.
Christophe.