Search in sources :

Example 6 with VisualRefreshEvent

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

the class GlazedListsEventLayer method getEventNotifier.

/**
 * Fires a NatTable refresh event, if any glazed list events have occurred.
 */
protected Runnable getEventNotifier() {
    return new Runnable() {

        @Override
        public void run() {
            if (GlazedListsEventLayer.this.eventsToProcess && GlazedListsEventLayer.this.active) {
                ILayerEvent layerEvent;
                if (GlazedListsEventLayer.this.structuralChangeEventsToProcess) {
                    layerEvent = new RowStructuralRefreshEvent(getUnderlyingLayer());
                } else {
                    layerEvent = new VisualRefreshEvent(getUnderlyingLayer());
                }
                fireEventFromSWTDisplayThread(layerEvent);
                GlazedListsEventLayer.this.eventsToProcess = false;
                GlazedListsEventLayer.this.structuralChangeEventsToProcess = false;
            }
        }
    };
}
Also used : ILayerEvent(org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent) VisualRefreshEvent(org.eclipse.nebula.widgets.nattable.layer.event.VisualRefreshEvent) RowStructuralRefreshEvent(org.eclipse.nebula.widgets.nattable.layer.event.RowStructuralRefreshEvent)

Example 7 with VisualRefreshEvent

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

the class EnableFormulaEvaluationCommandHandler method doCommand.

@Override
public boolean doCommand(ILayer targetLayer, EnableFormulaEvaluationCommand command) {
    this.formulaDataProvider.setFormulaEvaluationEnabled(true);
    targetLayer.fireLayerEvent(new VisualRefreshEvent(targetLayer));
    return true;
}
Also used : VisualRefreshEvent(org.eclipse.nebula.widgets.nattable.layer.event.VisualRefreshEvent)

Aggregations

VisualRefreshEvent (org.eclipse.nebula.widgets.nattable.layer.event.VisualRefreshEvent)7 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 UpdateDataCommand (org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand)2 LabelStack (org.eclipse.nebula.widgets.nattable.layer.LabelStack)1 ColumnVisualUpdateEvent (org.eclipse.nebula.widgets.nattable.layer.event.ColumnVisualUpdateEvent)1 ILayerEvent (org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent)1 RowStructuralRefreshEvent (org.eclipse.nebula.widgets.nattable.layer.event.RowStructuralRefreshEvent)1 Style (org.eclipse.nebula.widgets.nattable.style.Style)1 ColumnStyleEditorDialog (org.eclipse.nebula.widgets.nattable.style.editor.ColumnStyleEditorDialog)1