net.sourceforge.nite.gui.transcriptionviewer
Interface DisplayStrategy

All Known Implementing Classes:
AbstractDisplayStrategy, JastDisplayStrategy, MergedViewDisplayStrategy, NEDisplayStrategy, NEDisplayStrategyMulti, OntologyColourDisplayStrategy, StringInsertDisplayStrategy, TextStyleDisplayStrategy

public interface DisplayStrategy

DisplayStrategy implementations are used as delegates to display information annotated on speech transcriptions in a NTranscriptionView.

The single most important class in this package is the NTranscriptionView class. It has been designed to display speech transcriptions from a corpus of interactions, display extra information annotated on these transcriptions (e.g. dialogue acts or adjacency pairs) and provide a variety of GUI interface methods for selecting transcriptions and/or annotations.

When the basic transcription text has been displayed in the NTranscriptionView, implementations of this DisplayStrategy interface are called to alter the displayed text in order to visualize the extra annotated information. To do this three methods are defined in the interface:

  1. init(NTranscriptionView ntv)
    Upon creation this method should be called so the DisplayStrategy can perform any necessary initialization.
  2. display(NOMElement element)
    This method is called to make the DisplayStrategy display the given element. This may for instance involve changing the font or colour of the text to which this annotation element pertains (or e.g. placing brackets around it).
  3. undisplay(NOMElement element)
    This method provides functionality to undo the display of annotation elements, i.e. remove the relevant styles and inserted text.

A DisplayStrategy uses a TransToAnnoMap to determine which Transcription elements (and therefore NTextElements) should be decorated because they represent the transcription elements for an annotation elements (setTransToAnnoMap).

Author:
Dennis Reidsma, Natasa Jovanovic, Dennis Hofs

Method Summary
 boolean display(NOMElement element)
          This method is called to make the DisplayStrategy display the given element.
 void init(NTranscriptionView ntv)
          When a new DisplayStrategy is created, this method should be called so the DisplayStrategy can perform any necessary initialization.
 void setTransToAnnoMap(TransToAnnoMap newmap)
           
 void undisplay(NOMElement element)
          This method provides functionality to undo the display of annotation elements, i.e.
 

Method Detail

init

void init(NTranscriptionView ntv)
When a new DisplayStrategy is created, this method should be called so the DisplayStrategy can perform any necessary initialization.


display

boolean display(NOMElement element)
This method is called to make the DisplayStrategy display the given element. This may for instance involve changing the font or colour of the text to which this annotation element pertains (or e.g. placing brackets around it).

Returns:
true if displayed successful,

undisplay

void undisplay(NOMElement element)
This method provides functionality to undo the display of annotation elements, i.e. remove the relevant styles and inserted text.


setTransToAnnoMap

void setTransToAnnoMap(TransToAnnoMap newmap)