sk.uniba.euromath.editor
Interface IEditorDataReceiver

All Known Implementing Classes:
EditorSite

public interface IEditorDataReceiver

Receives data and renderers from GENE.

Author:
Martin Vysny

Method Summary
 void dataChanged(Map<CoordinatorInputKey,GeneDataProvider.RendererSite> rendererKeys, CoordinatorInputKey rootKey, Map<CoordinatorInputKey,Set<CoordinatorInputKey>> nametreeHierarchy, Map<String,CoordinatorInputKey> geneIdMapping, Set<CoordinatorInputKey> newKeys, Set<CoordinatorInputKey> deletedKeys)
           Editor site instance receives data change events using this method.
 void initReceiver(ExportHelper helper)
          Initializes the receiver.
 

Method Detail

initReceiver

void initReceiver(ExportHelper helper)
Initializes the receiver. Called only once.

Parameters:
helper - the helper instance.

dataChanged

void dataChanged(Map<CoordinatorInputKey,GeneDataProvider.RendererSite> rendererKeys,
                 CoordinatorInputKey rootKey,
                 Map<CoordinatorInputKey,Set<CoordinatorInputKey>> nametreeHierarchy,
                 Map<String,CoordinatorInputKey> geneIdMapping,
                 Set<CoordinatorInputKey> newKeys,
                 Set<CoordinatorInputKey> deletedKeys)
                 throws EditorException

Editor site instance receives data change events using this method.

Parameters must NOT be changed. For more info on the parameters see GeneDataProvider class.

Parameters:
rendererKeys - Maps input pipe ID to a renderer instance. Shows current state - keys recently deleted (keys present in the deletedKeys set) are not present.
rootKey - The root key of the hierarchy. It is not expected to be changed between dataChanged calls, only in extreme situation when whole document is scraped and recreated.
nametreeHierarchy - The nametree (key) hierarchy. Maps key to a set of its children. If key is missing from the map, maps to null value or an empty set then the nametree does not have any children. Shows current state - keys recently deleted (keys present in the deletedKeys set) are not present.
geneIdMapping - Maps GENE-generated ids to the coordinator input key instance. Used by renderer context to map from GENE id (provided to the renderer) to child renderer instance. Shows current state - keys recently deleted (keys present in the deletedKeys set) are not present.
newKeys - Contains set of new keys (keys that were not introduced in previous GENE output processing).
deletedKeys - Contains set of keys that were introduced in previous GENE output processing but they are missing in current data.
Throws:
EditorException - if fatal exception occurs. Editor errors should be handled by the receiver properly (for example by replacing the editor canvas with an Error banner).


Copyright 2003-2003-2006 null. All Rights Reserved.