Hi,
I've made a gwt gui-app with 5 buttons and added mouseoverhandlers for these and
would like to use something like:
button.addMouseOverHandler(Object object, new MouseOverHandler()
{
@Override
public void onMouseOver(MouseOverEvent event) {
(button)object.getElement().getStyle().setOpacity( mouseOverOpacity);
}
});
instead of:
button1.addMouseOverHandler(new MouseOverHandler()
{
@Override
public void onMouseOver(MouseOverEvent event) {
button1.getElement().getStyle().setOpacity(mouseOv erOpacity);
}
});
button2.addMouseOverHandler(new MouseOverHandler()
{
@Override
public void onMouseOver(MouseOverEvent event) {
button2.getElement().getStyle().setOpacity(mouseOv erOpacity);
}
});
....
i.e avoiding to repeat same code for every button.
Is that possible to do and if so , how?
Regards
stab