Class BlinkLayer<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
org.eclipse.nebula.widgets.nattable.blink.BlinkLayer<T>
- Type Parameters:
T- Type of the Bean in the backing IDataProvider
- All Implemented Interfaces:
ILayer,ILayerListener,IUniqueIndexLayer,IPersistable
Blinks cells when they are updated. Returns blinking cell styles for the
cells which have been updated.
Every time its asked for config labels: Checks the UpdateEventsCache for
changes to the cell If a cell is updated The cell is tracked as 'blinking'
and blinking config labels are returned A TimerTask is started which will
stop the blinking after the blink period is over
-
Field Summary
FieldsFields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
underlyingLayerFields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainterFields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionBlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry) BlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry, boolean triggerBlinkOnRowUpdate) BlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry, boolean triggerBlinkOnRowUpdate, ScheduledExecutorService scheduler) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose any resource allocated by this layer.intgetColumnPositionByIndex(int columnIndex) getConfigLabelsByPosition(int columnPosition, int rowPosition) Returns the config labels for the cell at the given coordinates.intgetRowPositionByIndex(int rowIndex) voidhandleLayerEvent(ILayerEvent event) Handle layer event notification.resolveConfigTypes(ILayerCell cell, Object oldValue, Object newValue) Checks if there is aIBlinkingCellResolverregistered in theConfigRegistryand use it to add config type labels associated with a blinking cell to the label stack.voidsetBlinkDurationInMilis(int blinkDurationInMilis) voidsetBlinkingEnabled(boolean enabled) Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
configure, doCommand, getCellByPosition, getCellPainter, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositionsMethods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getProvidedLabels, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, configure, doCommand, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getProvidedLabels, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, hasLayerListener, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions, unregisterCommandHandler, unregisterPersistableMethods inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
loadState, saveState
-
Field Details
-
blinkingEnabled
protected boolean blinkingEnabled
-
-
Constructor Details
-
BlinkLayer
public BlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry) -
BlinkLayer
public BlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry, boolean triggerBlinkOnRowUpdate) -
BlinkLayer
public BlinkLayer(IUniqueIndexLayer dataLayer, IRowDataProvider<T> listDataProvider, IRowIdAccessor<T> rowIdAccessor, IColumnPropertyResolver columnPropertyResolver, IConfigRegistry configRegistry, boolean triggerBlinkOnRowUpdate, ScheduledExecutorService scheduler)
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:ILayerDispose any resource allocated by this layer.- Specified by:
disposein interfaceILayer- Overrides:
disposein classAbstractLayerTransform
-
getConfigLabelsByPosition
Description copied from interface:ILayerReturns the config labels for the cell at the given coordinates. Needed to retrieve the corresponding configurations out of theIConfigRegistry.- Specified by:
getConfigLabelsByPositionin interfaceILayer- Overrides:
getConfigLabelsByPositionin classAbstractLayerTransform- Parameters:
columnPosition- The column position of the cell.rowPosition- The row position of the cell.- Returns:
- The
LabelStackwith the config labels for the cell at the given coordinates.
-
resolveConfigTypes
Checks if there is aIBlinkingCellResolverregistered in theConfigRegistryand use it to add config type labels associated with a blinking cell to the label stack.- Parameters:
cell- the celloldValue- the old valuenewValue- the new value- Returns:
- a LabelStack containing resolved config types associated with the cell
-
handleLayerEvent
Description copied from class:AbstractLayerHandle layer event notification. Convert it to your context and propagate UP. If you override this method you MUST NOT FORGET to raise the event up the layer stack by callingsuper.fireLayerEvent(event)- unless you plan to eat the event yourself.- Specified by:
handleLayerEventin interfaceILayerListener- Overrides:
handleLayerEventin classAbstractLayer- Parameters:
event- the event
-
setBlinkingEnabled
public void setBlinkingEnabled(boolean enabled) -
getColumnPositionByIndex
public int getColumnPositionByIndex(int columnIndex) - Specified by:
getColumnPositionByIndexin interfaceIUniqueIndexLayer
-
getRowPositionByIndex
public int getRowPositionByIndex(int rowIndex) - Specified by:
getRowPositionByIndexin interfaceIUniqueIndexLayer
-
setBlinkDurationInMilis
public void setBlinkDurationInMilis(int blinkDurationInMilis)
-