Hi Guys,

A Todd suggestion I have joined the dev list.

I had to do a quick and dirty hack to TableViewRowEditor to get it to fire a 
"Cancel" event when the escape key is hit. The Code is attached in case you 
are interested.

Please let me know if you don't want me posting this kind of stuff on this 
list.

Cheers,

Scott.
// Copyright 2008 SAEL Pty Ltd, Australia.

package calvinoPivot;

import java.util.ArrayList;
import org.apache.pivot.wtk.content.TableViewRowEditor;

public class CustomTableViewRowEditor extends TableViewRowEditor
{
    public interface Listener
    {
        public void cancelled();
    }

    ArrayList<Listener> _listeners = new ArrayList<Listener>();

    public ArrayList<Listener> getListeners()
    {
        return _listeners;
    }

    public void cancel()
    {
        super.cancel();

        for ( int index = 0; index < _listeners.size(); index ++ )
        {
            _listeners.get( index ).cancelled();
        }
    }
}

Reply via email to