Class AlignmentExtension

java.lang.Object
ca.phon.app.session.editor.view.transcript.extensions.AlignmentExtension
All Implemented Interfaces:
TranscriptEditorExtension

public class AlignmentExtension extends Object implements TranscriptEditorExtension
An extension that provides phone alignment support to the TranscriptEditor
  • Field Details

  • Constructor Details

    • AlignmentExtension

      public AlignmentExtension()
  • Method Details

    • install

      public void install(TranscriptEditor editor)
      Specified by:
      install in interface TranscriptEditorExtension
    • getAlignmentAttributes

      public SimpleAttributeSet getAlignmentAttributes()
      Gets an attribute set containing a reference to the alignment component factory. Adding the contents of this attribute set to the attributes of an alignment tier will cause it to appear as the PhoneMapDisplay component instead of text
      Returns:
      an attribute set containing a reference to the alignment component factory
    • getFormattedAlignment

      public List<DefaultStyledDocument.ElementSpec> getFormattedAlignment(Record record, Tier<PhoneAlignment> alignmentTier, Transcriber transcriber, AttributeSet attrs)
      Gets a list of DefaultStyledDocument.ElementSpec that contains the data for the properly formatted alignment tier content
      Parameters:
      record - a reference to the record containing the alignment tier
      alignmentTier - the alignment tier to format
      attrs - the attributes to apply to the tier
      Returns:
      the list of DefaultStyledDocument.ElementSpec data
    • onTranscriptLocationChanged

      public void onTranscriptLocationChanged(EditorEvent<TranscriptEditor.TranscriptLocationChangeData> event)
    • calculateAlignmentParent

      public String calculateAlignmentParent()
      Calculates which tier the alignment tier line should be parented to
      Returns:
      the TierViewItem associated with the calculated parent tier
    • isSyllabificationVisible

      public boolean isSyllabificationVisible()
    • isAlignmentVisible

      public boolean isAlignmentVisible()
    • isAlignmentComponent

      public boolean isAlignmentComponent()
    • getAlignmentParent

      public String getAlignmentParent()