Search in sources :

Example 1 with PropertyUpdateEvent

use of org.eclipse.nebula.widgets.nattable.layer.event.PropertyUpdateEvent in project nebula.widgets.nattable by eclipse.

the class BlinkLayerTest method getPropertyChangeListener.

/**
 * Listen for updates and put them in the {@link UpdateEventsCache}.
 * BlinkLayer needs this cache to be updated in order to work.
 */
private PropertyChangeListener getPropertyChangeListener() {
    return new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            PropertyUpdateEvent<BlinkingRowDataFixture> updateEvent = new PropertyUpdateEvent<BlinkingRowDataFixture>(new DataLayerFixture(), (BlinkingRowDataFixture) event.getSource(), event.getPropertyName(), event.getOldValue(), event.getNewValue());
            BlinkLayerTest.this.layerUnderTest.handleLayerEvent(updateEvent);
        }
    };
}
Also used : BlinkingRowDataFixture(org.eclipse.nebula.widgets.nattable.dataset.fixture.data.BlinkingRowDataFixture) PropertyChangeEvent(java.beans.PropertyChangeEvent) PropertyChangeListener(java.beans.PropertyChangeListener) DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) PropertyUpdateEvent(org.eclipse.nebula.widgets.nattable.layer.event.PropertyUpdateEvent)

Aggregations

PropertyChangeEvent (java.beans.PropertyChangeEvent)1 PropertyChangeListener (java.beans.PropertyChangeListener)1 BlinkingRowDataFixture (org.eclipse.nebula.widgets.nattable.dataset.fixture.data.BlinkingRowDataFixture)1 PropertyUpdateEvent (org.eclipse.nebula.widgets.nattable.layer.event.PropertyUpdateEvent)1 DataLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture)1