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 String
static final boolean
static final String
static final boolean
static final String
static final TierViewItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates 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.ElementSpec
that contains the data for the properly formatted alignment tier contentvoid
install
(TranscriptEditor editor) boolean
boolean
boolean
void
-
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:
install
in 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 thePhoneMapDisplay
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 ofDefaultStyledDocument.ElementSpec
that 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.ElementSpec
data
-
onTranscriptLocationChanged
public void onTranscriptLocationChanged(EditorEvent<TranscriptEditor.TranscriptLocationChangeData> event) -
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
-