sk.uniba.euromath.gene
Interface IEditorDataReceiver

All Known Implementing Classes:
EditorSite

public interface IEditorDataReceiver

Receives data and renderers from GENE.

Author:
Martin Vysny

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

Method Detail

initReceiver

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


dataChanged

void dataChanged(Map<sk.baka.xml.gene.CoordinatorInputKey,GeneDataProvider.RendererSite> rendererKeys,
                 sk.baka.xml.gene.CoordinatorInputKey rootKey,
                 Map<sk.baka.xml.gene.CoordinatorInputKey,Set<sk.baka.xml.gene.CoordinatorInputKey>> nametreeHierarchy,
                 Map<String,sk.baka.xml.gene.CoordinatorInputKey> geneIdMapping,
                 Set<sk.baka.xml.gene.CoordinatorInputKey> newKeys,
                 Set<sk.baka.xml.gene.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-2006 null. All Rights Reserved.