org.eclipse.nebula.widgets.nattable.extension.glazedlists
Class DetailGlazedListsEventLayer<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
org.eclipse.nebula.widgets.nattable.extension.glazedlists.DetailGlazedListsEventLayer<T>
- Type Parameters:
T - Type of the bean in the backing list.
- All Implemented Interfaces:
- ca.odell.glazedlists.event.ListEventListener<T>, PropertyChangeListener, EventListener, ILayer, ILayerListener, IUniqueIndexLayer, IPersistable
public class DetailGlazedListsEventLayer<T>
- extends AbstractLayerTransform
- implements IUniqueIndexLayer, ca.odell.glazedlists.event.ListEventListener<T>, PropertyChangeListener
This layer acts as the event listener for:
- Glazed list events -
ListEvent
- Bean updates - PropertyChangeEvent(s)
Compared to the GlazedListsEventLayer, this layer does not conflate events
and only fire a single RowStructuralRefreshEvent for all events within 100ms.
Instead it will fire a corresponding NatTable event with the detail
information for every ListEvent fired by the GlazedLists immediately.
- Author:
- Dirk Fauth
| Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform |
configure, dispose, doCommand, getCellByPosition, getCellPainter, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPositionResizable, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions |
| Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer |
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable |
| Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer |
addLayerListener, configure, dispose, doCommand, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, hasLayerListener, isColumnPositionResizable, isRowPositionResizable, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions, unregisterCommandHandler, unregisterPersistable |
DetailGlazedListsEventLayer
public DetailGlazedListsEventLayer(IUniqueIndexLayer underlyingLayer,
ca.odell.glazedlists.EventList<T> eventList)
- Create a new
DetailGlazedListsEventLayer which is in fact a
ListEventListener that listens to GlazedLists events and
translate them into events that are understandable by the NatTable.
- Parameters:
underlyingLayer - The underlying layer of type IUniqueIndexLayereventList - The EventList this layer should be added as listener.
listChanged
public void listChanged(ca.odell.glazedlists.event.ListEvent<T> event)
- GlazedLists event handling. Will transform received GlazedLists
ListEvents into corresponding NatTable RowStructuralChangeEvents. Ensures
that no other changes can be made to the GlazedLists instance until the
events are processed in NatTable itself. This is necessary to avoid
concurrent modifications which will lead to asynchronous states of
NatTable and GlazedLists.
- Specified by:
listChanged in interface ca.odell.glazedlists.event.ListEventListener<T>
propertyChange
public void propertyChange(PropertyChangeEvent event)
- Object property updated event
- Specified by:
propertyChange in interface PropertyChangeListener
setEventList
public void setEventList(ca.odell.glazedlists.EventList<T> newEventList)
- Change the underlying
EventList this layer is listening to.
- Parameters:
newEventList - the EventList to listen on.
getColumnPositionByIndex
public int getColumnPositionByIndex(int columnIndex)
- Specified by:
getColumnPositionByIndex in interface IUniqueIndexLayer
getRowPositionByIndex
public int getRowPositionByIndex(int rowIndex)
- Specified by:
getRowPositionByIndex in interface IUniqueIndexLayer
Copyright © 2015. All rights reserved.