Class AlignmentExtension
java.lang.Object
ca.phon.app.session.editor.view.transcript.extensions.AlignmentExtension
- All Implemented Interfaces:
TranscriptEditorExtension
An extension that provides phone alignment support to the
TranscriptEditor-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final booleanstatic final Stringstatic final booleanstatic final Stringstatic final TierViewItem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildAlignmentBatch(TranscriptBatchBuilder batchBuilder, AttributeSet attrs) Calculates which tier the alignment tier line should be parented toGets an attribute set containing a reference to the alignment component factory.getFormattedAlignment(Record record, Tier<PhoneAlignment> alignmentTier, Transcriber transcriber, AttributeSet attrs) Gets a list ofDefaultStyledDocument.ElementSpecthat contains the data for the properly formatted alignment tier contentvoidinstall(TranscriptEditor editor) booleanbooleanbooleanvoidonTranscriptLocationChanged(TranscriptElementLocation oldLocation, TranscriptElementLocation newLocation)
-
Field Details
-
ALIGNMENT_IS_VISIBLE
- See Also:
-
ALIGNMENT_IS_VISIBLE_DEFAULT
public static final boolean ALIGNMENT_IS_VISIBLE_DEFAULT- See Also:
-
ALIGNMENT_IS_COMPONENT
- See Also:
-
ALIGNMENT_IS_COMPONENT_DEFAULT
public static final boolean ALIGNMENT_IS_COMPONENT_DEFAULT- See Also:
-
ALIGNMENT_PARENT
- See Also:
-
ALIGNMENT_PARENT_DEFAULT
-
-
Constructor Details
-
AlignmentExtension
public AlignmentExtension()
-
-
Method Details
-
install
- Specified by:
installin interfaceTranscriptEditorExtension
-
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 thePhoneMapDisplaycomponent instead of text- Returns:
- an attribute set containing a reference to the alignment component factory
-
buildAlignmentBatch
-
getFormattedAlignment
public List<DefaultStyledDocument.ElementSpec> getFormattedAlignment(Record record, Tier<PhoneAlignment> alignmentTier, Transcriber transcriber, AttributeSet attrs) Gets a list ofDefaultStyledDocument.ElementSpecthat contains the data for the properly formatted alignment tier content- Parameters:
record- a reference to the record containing the alignment tieralignmentTier- the alignment tier to formatattrs- the attributes to apply to the tier- Returns:
- the list of
DefaultStyledDocument.ElementSpecdata
-
onTranscriptLocationChanged
public void onTranscriptLocationChanged(TranscriptElementLocation oldLocation, TranscriptElementLocation newLocation) -
calculateAlignmentParent
Calculates which tier the alignment tier line should be parented to- Returns:
- the
TierViewItemassociated with the calculated parent tier
-
isSyllabificationVisible
public boolean isSyllabificationVisible() -
isAlignmentVisible
public boolean isAlignmentVisible() -
isAlignmentComponent
public boolean isAlignmentComponent() -
getAlignmentParent
-